[comp.emacs] I-Search errors inside emacstool

abair@oakhill.UUCP (11/21/87)

After using GNU Emacs 18.47 for several weeks under the emacstool, I have
run across what appears to be a minor bug.  When doing the search everything
works fine until you want to quit, then if you use one of the cursor keys 
it quits the search, but puts a '[C' or some other letter based on which
key you push after the text it found.

This looks like the search code has bound the keys such that it does not
know about the emacstool coding of the function keys.  It appears to be
getting the ESC from the function key, which quits the search, but then it
takes the [C as text input.

I must admit that I have not looked at the .el file, but then I really do
not understand that much of the GNU lisp, so I probably would not learn
much anyway.  I have read the manual, but have not found anything I am 
doing wrong.  This is not a big problem, just a pain, so if anyone knows
what I am doing wrong or if there is a fix, please email or post the
information.

Thanks,
Alan Bair
UUCP: ut-sally!oakhill!abair

jk3k+@ANDREW.CMU.EDU ("Joseph G. Keane") (11/22/87)

Your evaluation is correct; the ESC quits the search and doesn't act as a
prefix.  The solution is to change the search exit character.  In my .emacs i
have `(setq search-exit-char ?

jk3k+@ANDREW.CMU.EDU.UUCP (11/22/87)

My previous post seems to have been truncated.  I said: in my .emacs i have

jk3k+@ANDREW.CMU.EDU ("Joseph G. Keane") (11/22/87)

So i have to escape my backslashes, huh?  As i was saying, in my .emacs i have
`(setq search-exit-char ?\C-])' so i can exit with control-]; you may prefer a
different character.  This also makes ESC-< work right.

Indeed there are many places where destructive functions can cause problems,
but here i think it's quite appropriate since you want to _change the default
list_.  This will not `invariably lead to disaster', and is probably more a
matter of style.

--Joe

lewis@rocky.STANFORD.EDU (Bil Lewis) (11/23/87)

Posting-Front-End: GNU Emacs 18.36.1 of Fri Feb  6 1987 on rocky (berkeley-unix)


A,
  Yep, you've just run into a common complaint/problem to which there is
no good solution.   Putting commands on function keys by appropriately
binding ESC-<something> is a neat thing to to & I love it.  Unfortunately,
there is no way to tell Emacs that what you REALLY want is a single-keystroke
command to be read from that function key, not ESC-[f or something.

  You do not want to redefine ESC inside of an I-Search because you really
do want to be able to use it as ``end of search''.  If you can redefine
what the function keys send, there is hope for you.  Otherwise, just
get used to typing ESC FN-KEY.

-Bil
-- 

alarson@srcsip.UUCP (Aaron Larson) (11/24/87)

Posting-Front-End: GNU Emacs 18.41.15 of Thu Oct 15 1987 on pavo (berkeley-unix)


I've found that a much better search-exit-character than ESC is ^L.  Too
many commands begin with ESC, especially function keys, and if you are in
the habbit of typing other characters to exit search mode (^F or ^B for
example) then you will find that ESC causes the rather undesirable side
effect of occasionally inserting characters into you file.  ^L does not
have this problem, and repeated ^L's are relatively harmless.
-- 

Aaron Larson  MN65-2300              Software Technology
Honeywell Systems & Research Center  (612) 782-7308
3660 Technology Drive
Mpls, MN  55418                      {philabs,ihnp4,dayton,mmm}!srcsip!alarson

drw@culdev1.UUCP (Dale Worley) (11/25/87)

Is there any way to alter the characters produced by the function keys
in emacstool and similar Sun programs?  I used to use Kermit as a
terminal emulator on a PC, and I rebound a bunch of keys to C-x C-y (mumble)
so they would act atomically w.r.t. isearch, etc.

Dale
-- 
Dale Worley    Cullinet Software      ARPA: culdev1!drw@eddie.mit.edu
UUCP: ...!seismo!harvard!mit-eddie!culdev1!drw
If you get fed twice a day, how bad can life be?