[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Emacspeak X and non-X keyboard issues



Hi Raman,

here is a test for your memory......

Back in about 1998, when I was a new user, I had some problems with
emacspeak and the handling of some characters under X that caused an
error. I'm not sure if you remember it or not. At the time, my
familiarity with emacs, elisp and emacspeak was too limited to know
how to fix this - or even find how to investigate it effectively.
However, I'm now thinking my skill may have improved enough to track
this down and with luck, find a fix.

An example is when you run M-x term. Running this under a non X
windows environment has no problems. However, when you run it under X,
you get an error each time you try to do something which generates one
of the special characters, such as backspace or up/down arrow keys. In
fact, you get an error as soon as the term mode starts. The output
from the debugger is as follows

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p return)
  term-emulate-terminal(#<process terminal> "//home/tcross/Mail
\n")

This only occurs under X and only when running emacspeak. It does not
occur without X or without emacspeak. It also does not occur is you
run under X but within an xterm using the -nw switch.

Anyway, I'm raising this issue again as it is now causing me problems
with slime mode. The error is different, but I suspect the cause is
the same and again, it only occurs when running slime mode under X. If
I run under a console or I run from within an xterminal with the -nw
switch, you don't get the error. The error I get with slime (from the
debugger) is as follows -

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p backspace)
  emacspeak-self-insert-command(1)
  call-interactively(emacspeak-self-insert-command)

The slime package needs an emacspeak module to allow it decent voice
support. I recently started doing this and then on the weekend ran
into this problem again. It wasn't an issue last time I used slime,
but both emacs 22 and slime have had an upgrade since then, plus I
have had to switch from using cmucl to sbcl. This means unfortunately,
I'm not sure exactly which piece of the equation has triggered this
problem, but as it seems the same as the term problem, fixing one will
likely either fix the other or provide guidance on how to do it. 

What I'm hoping for is any guidance you can give to help narrow down
my search space a bit. From looking at dribble files and view lossage,
it seems that under console and xterm, a backspace is represented with
the traditional ^H - or more specifically, the ascii number. However,
under X Windows, it seems to be represented by the symbol <backspace>.
The same seems to hold for other "special" characters like return, up,
down, left and right. I'm not up on the key mapping differences
between X and non-X environments, but do vaguely remember reading
something about this some time ago.

Any advice on possible things to look for or where the fix should be
would be appreciated. For example, I suspect it is somehow tied in
with comint mode as the problem only seems to occur whith modes that
are interacting with a comint process. If my SWAG (Scientific Wild
Arse Guess) is correct, to obtain consistency, we possibly may need
some sort of mapping which will provide consistency in what functions
see. 

For the rest of the list, if any of you run emacspeak under X, but not
within a terminal emulator like xterm, I'd be intrested if you
experience the same problem when running M-x term. To test, set debug
on error to true and then just start term. You should get an error
straight after being asked if term should use bash (or whatever
default shell your system has). Hitting return will generate the
error. If you don't get an error, enter a letter into term and hit
backspace and see if that generates an error. If you cannot generate
the error, I definitely want to hear from you as this may help
identify what is different between my systems and yours. If you do get
the error, it wold be good to hear as that means its less likely to be
something specific to my installations (i'm pretty confident it isn't
a local config problem as I've been able to reproduce it on different
systems and under specific circumstances etc.

Tim{.n+i)y%hZu޲',椖+-ݙi)y+z,,j.n7˛m+i

Emacspeak Files | Subscribe | Unsubscribe | Search