logs archiveIRC Archive / Freenode / #emacs / 2010 / February / 11 / 1
specksynder
I have a weird problem - I bound a function(that inserts some string into the buffer) to M-f5 using (global-set-key [M-f5] 'some-function) , but the key binding does not seem to work.
I can use M-x some-function, and that works well
dim
specksynder: C-h c M-F5, and use (kbd "M-F5") I'd say
specksynder
How can I debug key binding errors? C-h b lists M-f5 as being bound to the function, but it doesnt work though
dim: thanks, I will try with kbd then
dim
Debugger entered--Lisp error: (error "M- must prefix a single character, not f5")
well, find out the right syntax then :)
tsp
Has emacs really not been changed since Nov/Dec 09, or is that just the git repository getting out of sync?
kodein
the latter.
I believe "the git repository" borked when the switch to bzr was made
tsp
oh they're on bzr now?
I was just about to checkout the cvs :)
ams
might be a good idea to subscribe to emacs-devel if you are going to use the latest
tsp
O
         

specksynder
Ah, dim, didn't see that in my Message buffer before. Will keep at it
tsp
I'm just curious about the changelog
not so much running the latest, I'm a hardcore ed user
every time I try emacs I always go back some days/weeks later
dim
maybe you have to think about how to best use it, and see if changing your approach to editing files is something you're ready to do
specksynder
,ed
fsbot
ed -- [0] the best editor in the world for doing simple editing tasks
[1] at http://www.emacswiki.org/cgi-bin/wiki.pl?TheTruePath,
[2] the standard editor O_o,
[3] a few magnitudes slimmer than emacs.,
[4] the greatest WYGIWYG editor of all.,
[5] at http://emacswiki.org/emacs/ed, ..[Type ,more]
specksynder
,more
fsbot
[6] a superior user interface for the browser edbrowse
tsp
I usually just use edbrowse if it's there
but it's not going to be able to handle the long lines in the project I want to work on
kodein
,edbrowse
fsbot
I think edbrowse is [0] now in debian
[1] http://edbrowse.sourceforge.net/
tsp
basically a textmode browser for the blind
dim
ed is like one-line at a time vi, that's it?
kodein
cool.
tsp
yeah
kodein
vi is a fancier ex
tsp
I've been using ed in one form or another ever since I found it on my first slackware system
specksynder
no way that anyone still uses ed
arm
dim: more or less, it has a really limited set of commands
specksynder: I use ed for some things
dim
ed is an way better than bzcat :)
tsp
specksynder: I don't know many others that do other than myself
         

specksynder
arm: for instance?
dim
I guess full screen editing is overrated if you're blind
kodein
I, for one, use ed for editing ssh knownhosts :)
arm
specksynder: editing my full of comments /etc/mpd.conf for example, I just v/^[ \t]#/n and then edit the line number I need
tsp
vim has all the cool cursor motion commands, but how is the screen reader supposed to know that w is next word rather than typing a w
emacspeak can advise forward-word and speak it, which avoids that problem
specksynder
I am bored of foods with High Fructose Corn Syrup in them
arm
specksynder: why
specksynder
arm: everyone else is doing it
arm
specksynder: I'm more tired of foods with soy lecitin
specksynder
arm: I need something more contrarian
arm
(because soy lecitin is sh*t)
specksynder
soy lecitin? what's that?
,lecitin
fsbot
specksynder, Can you are more explicit?
specksynder
,google soy leciting
fsbot
[google] http://www.livestrong.com/soy-products-and-thyroid/
http://curezone.org/forums/search.asp%3Fq%3Dlecithin
specksynder
rudybot: quote
rudybot
specksynder: Let's have an Opium war.
jlf
(Action) wonders if specksynder knows google also has a web interface
cluck
jlf: i wish they had a restful api for everyone of their services, it sure would make a hell of a lot of tasks easier to accomplish
jlf
i expect that would be bad for their revenue
tsp
I wonder if emacs could act as a vnc client, but for only the keyboard
cluck
jlf: not necessarily
jlf
cluck: many fewer ad impressions, no?
bpalmer
cluck: if you aren't too strict about what constitutes REST, they typically do.
cluck: (and being strict about what constitutes REST is strict adherence to dogme 95)
RaceCondition
can emacs detect when a modifier key is released?
tsp
I don't think so
RaceCondition
tsp: maybe only at a low level?
tsp
not sure, if it did emacspeak probably would've taken advantage of it by now
RaceCondition
hmm, weird... it's such a simple thing really
and could be used for quite a few things...
ams
RaceCondition: not really
tsp
it can't detect one being pressed either
RaceCondition
a remnant of the old dumb keyboards :P
ams
RaceCondition: more like how keyboards work.
bpalmer
RaceCondition: it's simple if you're reading keyboard scan codes directly, perhaps. Typically programs are just getting keys with modifier flags set on them, though.
cj
how do I figure out what a key is bound to? I think M-p is bound to something, but I'm not certain...
RaceCondition
like in what way? :P the OS knows very well about individual keys being pressed or released
cj
RaceCondition: :) in a bufer
in lkb-mode in this case
tsp
cj: c-h k m-p, IIRC
RaceCondition
cj: -h k
cj: C-h k M-p
oops, didn't see tsp's response
cj
super, thanks.
jlf
hmm, maybe you could pass modifier up/down events to emacs via dbus
cj
how do I tell M-p to only mean (perltidy-buffer) in cperl-mode buffers?
RaceCondition
cj: actually I discovered the manual is very clear and easy to read
cj: well structured as well
bpalmer
RaceCondition: yes, but you capitalized them correctly :) ( case matters in key sequences, because s-X and S-X mean different things)
RaceCondition
cj: as a hint: you use a cperl-mode hook to make the binding
bpalmer: yeah, but C- and -c not :P
tsp
(Action) turns the channel off for a bit
RaceCondition
for yourself or for everybody?
cj
tsp: I'm thinking /ignore RaceCondition might be sufficient
jlf
it's dangerous to ignore race conditions!
RaceCondition
cj: what?
cj
jlf: luckily there is case sensitivity!
tsp
it's not anyone, it's the constant speech that's going overtop of the download I'm trying to monitor
RaceCondition
tsp: and you use emacs for both IRC and web browsing? :P
jgh
Oh wow.
I just noticed what happened.
The Mathworks no longer allows GPL code on its servers.
tsp
raceCondition: no, mirc for irc, just a plain terminal in ssh for a vm
jgh
Sorry, wrong channel.
tsp
no emacs here yet
problem is I use a vm for ssh since screen readers and win7 don't like each other. mirc is on the host, so I have to get out of the vm, switch to mirc and hit f4 to shut it up
s/screen readers/ssh clients, screen readers
RaceCondition
tsp: why do you use windows anyway? :P
tsp
linux accessibility is sh*t
RaceCondition
how about a mac?
tsp
we barely have firefox there
mac is almost as bad
RaceCondition: worse in some areas, the terminal on osx doesn't speak worth a damn
all the blindies insist it works just fine, they haven't used a real environment
else they don't use it day in and day out
RaceCondition
tsp: you're blind?
tsp
yep
RaceCondition
one thing I can't stand in Windows is that there's no zoom
in OS X I can just Ctrl-scroll
anywhere, anytime
tsp
oh
RaceCondition
(I have an eye-problem)
tsp
raceCondition: do you use tts? or just zoom things
RaceCondition
tsp: what's tts?
tsp
text to speech
RaceCondition
no, never used that
I mean, my eyes are OK, I need big text (glasses don't help)
tsp
you're lucky
I have to listen to everything
jgh
Little bastards: http://www.mathworks.com/matlabcentral/FX_transition_faq.html
RaceCondition
a year ago my eyesight was too good, and then I got the keratoconus... nobody knows why
(why am I saying this in #emacs)
(Action) sets /ignore on self
tsp
Why not? channels can go wildly offtopic sometimes
RaceCondition
yeah, I know, but still :P
tsp: do you also code?
tsp
sort of
RaceCondition
how? (assuming you weren't joking about your blindness)
tsp
I'm not a great coder by any means but I've coded python, shell, perl, etc
I just do, python's indents are iritating but nothing that l in ed can't solve
^def func():$ vs ^ return 1$, I can count from teh ^ to the first character or just remember where I am
RaceCondition
tsp: you could use a translator or smth that translates from curly braces to tabs/spaces
tsp
I've tried, but they disrupt my workflow. I like being able to just !python filename.py
the brace systems would kill the line numbers of errors too
RaceCondition
probably...
damd
most programming languages that are popular with the kids are ugly in one way or another
RaceCondition
tsp: I assume you keep a good mindmap of everything you got in a code file/project?
damd: so which ones are not?
tsp
nope
RaceCondition: I could probably do that though
kensanata
I wonder whether you could use the standard display table to translate TAB to some other string that would sound ok on the screen reader.
damd
RaceCondition: good question, i can't think of a single "mainstream" language that i find beautiful
tsp
I have so much stuff. I lost 80gb accidentally and it hasn't made a dent in it
RaceCondition
damd: Python probably comes closest
jlf
tsp: istr perl has source filters that could do something like that
tsp
though the 80gb that was probably the most important I just don't know it yet
damd
RaceCondition: yes, i think so
tsp
perl is just weird
damd
RaceCondition: although python can be a mess too sometimes, especially when you try to do smart stuff with lambdas
jlf
true enough
damd
map(lambda x: reduce(lambda y: ...
RaceCondition
damd: its lambdas suck
kodein
if you try to be too smart, you will mess up. that is a universal truth,r eally
Aethaeryn
python ftw
tsp
Perl is good because I don't have to indent my code, I haven't got into the language side of it all that much
damd
kodein: i disagree
RaceCondition
tsp: you don't have to indent Lisp either
jlf
kodein: kernighan has a good quote about that
tsp
that too
RaceCondition
tsp: you can just have one big line of lisp
jlf
,g kernighan debugging
fsbot
Aethaeryn
tsp: Most good code I've seen is indented anyway, thus defeating the point of "I don't have to indent"
kodein
jlf: yes
damd
it's not that i find the whitespace dependency silly, it makes sense, but unfortunately doesn't lend itself well to higher-order functions
RaceCondition
tsp: and with all the semantic navigation Emacs gives you...
bpalmer
basically, there's very little code that's more readable with lambdas than with named inner functions, but the opposite is not true.
Aethaeryn
It is easier to obsfucate code if you don't have to indent though
damd
bpalmer: i think that depends on how terse the syntax for lambdas are
tsp
Aethaeryn: I'm blind, so indents just get in the way except where I can do /^{ to find the start of a function in C
damd
e.g. haskell: ("foo"++) python: (lambda x: "foo" + x) (or something)
(Action) ...a slayer of conversations.
bpalmer
damd: I don't :) Mathematicians name lots of higher-order functions.
damd
bpalmer: what do you mean?
bpalmer
and math notation raises terseness to an art form.
RaceCondition
Haskell has that cool function composition, yeah :P
damd
RaceCondition: this was not an example of function composition, it's merely a syntactical quirk: (+3) is the exact same thing as (\x -> x + 3)
syntactical quirk? i don't know what that means.
i'm trying to say "syntax is good"
e.g. python and c# make you work harder to use lambdas and i actually find that python is the worst in this case
« prev 1 2 3 4 5 6 7 8 9 10 next »