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

Emacspeak term mode errors



Hi Raman,

The point about the cursor moving left through the use of the arrow
keys is a point I overlooked. I wonder though if you need to test for
the column position and row if you have already confirmed the key
entered by the user was a delete? At this point, I'm not even sure
what is sent under the console when you hit the arrow keys. 

I noticed you have changed the comparisons to use eq rather than the
equal sign. This has certainly improved things as you now don't get a beep
or a backtrace when you try to run M-x term. However, we need to add
the symbolic names to the test as well. For example, now when you hit
backspace, emacspeak says "newline". I believe this is because the
test is falling through past the condition which checks for the user
hitting the backspace key as it doesn't match 127. We probably need an
or comparison i.e.

((and (or (eq last-input-event 127)
          (eq last-input-event 'backspace))
      (....

As you are not running X at the moment, I will look at this on the
weekend and work out which symbolic names need to be added to the
conditionals.  

regards,

Tim

T. V. Raman writes:
 > 
 > 
 >     Tim> The other area which I'd like some guideance on is the
 >     Tim> way term-emulate-terminal's defadvice is testing for
 >     Tim> certain conditions.  To my naive eye, it looks like the
 >     Tim> test is somewhat over engineered and we could simplify
 >     Tim> it a bit, but experience has tought me that usually it
 >     Tim> is me who is missing some subtlety regarding what is
 >     Tim> going on. As an example, the following test is performed
 >     Tim> to determine if the user has hit backspace
 >     Tim> 
 >     Tim> ((and (= last-input-event 127) (= new-row
 >     Tim> emacspeak-eterm-row) (= -1 (- new-column
 >     Tim> emacspeak-eterm-column)) current-char) (....
 >     Tim> 
 > 
 > The above is not over-engineered. 
 > You can have the cursor move left when the user did not in fact
 > backspace, e.g. when you move the cursor left in vi.
 > 
 > In general there are two good regression tests to check things
 > with when playing with the advice on term-emulate-terminal:
 > 
 > A) VI
 > B) lynx -- especially its config options
 >     Tim> I'm thinking that if we assume the only way the new
 >     Tim> column would be one less than the previous column and we
 >     Tim> are on the same row, then the user entered a
 >     Tim> backspace. Therefore, we cold simplify things by doing
 >     Tim> 
 >     Tim> ((and (= new-row emacspeak-eterm-row) (= -1 (-
 >     Tim> new-column emacspeak-eterm-column))) (....
 >     Tim> 
 >     Tim> but maybe I'm missing some subtle issue, such as process
 >     Tim> line filtering etc. Obviously, I can work this out
 >     Tim> through trial and error, but why re-invent the wheel if
 >     Tim> it can be avoided.
 >     Tim> 
 >     Tim> Tim
 >     Tim> 
 >     Tim> -----------------------------------------------------------------------------
 >     Tim> To unsubscribe from the emacspeak list or change your
 >     Tim> address on the emacspeak list send mail to
 >     Tim> "emacspeak-request@xxxxxxxxxxx" with a subject of
 >     Tim> "unsubscribe" or "help"
 > 
 > -- 
 > Best Regards,
 > --raman
 > 
 >       
 > Email:  raman@xxxxxxxxxxx
 > WWW:    http://emacspeak.sf.net/raman/
 > AIM:    emacspeak       GTalk: tv.raman.tv@xxxxxxxxxxx
 > PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
 > Google: tv+raman 
 > IRC:    irc://irc.freenode.net/#emacs

-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help"


Emacspeak Files | Subscribe | Unsubscribe | Search