Making ctrl-S send some funny escape sequence

Making ctrl-S send some funny escape sequence

Post by Bernie Cose » Sun, 02 Dec 1990 10:01:00



I tried this and it doesn't quite work.  The magic control chars in
incremental search mode (which is the point of this, isn't it, to get
your favorite search when you type ctrl-S) are defined to be *char*.
Thus, when I type ctrl-S, ctrl-S it doesn't re-search.  If anyone
knows of a way to fix the incremental search guys to take
sequences or something instead of "just chars", please let me know.

(also, I discovered, not even 'meta' works: I tried making the research
char be meta-S just to see what happens.  Well, the obvious (after you
think about it for a while): I have no way to type "meta-S".  I have
a *command* that'll make-believe it is meta-S (escape followed by
S), but that is NOT the same thing as a real meta-S, and so doesn't work.

  /Bernie


Bolt, Beranek & Newman, Inc         USENET:    bbnccv!bpc
Cambridge, MA   02238               Telco:     (617) 497-3503

 
 
 

Making ctrl-S send some funny escape sequence

Post by Israel Pink » Sun, 02 Dec 1990 12:29:00



>I tried this and it doesn't quite work.  The magic control chars in
>incremental search mode (which is the point of this, isn't it, to get
>your favorite search when you type ctrl-S) are defined to be *char*.
>Thus, when I type ctrl-S, ctrl-S it doesn't re-search.  If anyone
>knows of a way to fix the incremental search guys to take
>sequences or something instead of "just chars", please let me know.

This is a portion of my .emacs file:

(global-set-key "\C-^" 'isearch-forward)
(global-set-key "\C-\\" 'quoted-insert)
(global-set-key "\C-x\C-\\" 'toggle-read-only)
(global-set-key "\C-x\C-^" 'save-buffer)

(setq search-quote-char 28)
(setq search-repeat-char 30)

(global-unset-key "\C-q")
(global-unset-key "\C-s")

This sets search to be C-^ (C-` or C-6 on many terminals).  It also moves
the quote character to C-\.  (I also move C-X C-S and C-X C-Q.)  The next
lines modify the smae characters inside the search.  The last lines unset
C-S and C-Q so that when the terminal send them, they are ignored.  (Well,
almost.  Emacs still seems to see them and screen refreshes are buggy.)

-Israel
--
----------------------------------------------------------------------
UUCP:   {amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!pinkas

CSNET:  pinkas%mipos3.intel.com

 
 
 

Making ctrl-S send some funny escape sequence

Post by Bernie Cose » Sun, 02 Dec 1990 11:33:00



> This is a portion of my .emacs file:
> (global-set-key "\C-^" 'isearch-forward)
> (global-set-key "\C-\\" 'quoted-insert)

...etc

You miss the point: if the diehard ^S lovers were willing to MOVE
search, then this religious war would have ceased being a problem
YEARS ago: ^S would have long since been back in the realm of
terminal-control-chars.  The whole point of the
I-can't-live-without-search-on-^S crowd is that they WANT SEARCH ON
^S...

now, someone suggested that one might be able to have his cake
and eat it, too, by letting the ^S/^Q stuff stay hidden in the terminal
control protocol and 'fixing' your terminal to send something else
when you hold-down-the-CTRL-key-and-hit-S.  I was only pointing out
that as far as I've been able to puzzle out, even THAT doesn't work,
because you still can't get the "research-forward" control to use your
new sequence.

  /Bernie

 
 
 

1. escaping from escape-sequences in eshell..

<Problem: Escaping from the escape-sequences in eshell that result
when shell-commands result in escape-sequences.. because of
colors.. Can one use ansi-color? >

I (after sending mails to authors) just saw on groups.google.com, that
my question was a VFAQ.  Sorry to the authors.

However, the VFAQ-answer  seems to lead the user to believe that there
is no escape from those escape-sequences..

However, there *is* an escape (although you won't get color, but
atleast you will get rid of those escape-characters ) -->

Put the foll. in yr .emacs:

(require 'ansi-color)
(defvar eshell-preoutput-filter-functions nil)
(add-to-list 'eshell-preoutput-filter-functions 'ansi-color-filter-apply)

and all those escape-sequences go away (due to commands like gls..)

You continue to get colorized output for normal eshell-commands like
"ls"..

2. xXSL losing images?

3. shell mode and funny escape charactors

4. Epson 800 - horizontal black lines.

5. Ansi Escape sequences

6. Unable to reinstall Money 2002

7. Shell escape sequences in xemacs window on win2000

8. How to print multi-page layout in ArcView 3.0a (3x3 A4, 2x3 A1 ...

9. Escape Sequence Filter for Compilate Mode

10. Escape Sequences for Key Bindings

11. escape sequences

12. Using global-set-key to define escape key sequences?

13. emacs-virtual.ti (was Escape sequences)