tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Joakim Hartikainen <Joakim.Hartikainen () ey ! se>
To: tru64-unix-managers
Subject: SUMMARY: How to disable suspend when using emacs ?
Date: Fri, 15 Sep 1995 11:52:25 +0000	[thread overview]
Message-ID: <96075323306585.tru64-unix-managers.marc@archive.invalid> (raw)

Hi,

and thanks for the suggestions, I haven't been able to test the solutions
yet, but here are the answer I got from the net.

From: gjb@luc.ac.be (Geert Jan Bex)

Who suggest to remap the ctrl-S key to something else, he also have a .emacs
file to send if I want to.
----------------------------------------------------------------------------

From: "Edward C. Bailey" <ed@moocow.niehs.nih.gov>

    It's is probably useless to try to get rid of Xon/Xoff flow control;
it's just too widely used.  You can take the other approach, which is to
tell emacs to *not* use ^s/^q for anything.  This is done by remapping
these keys to other keys.  Below is a part of my .emacs file.  It remaps ^s
to ^\, and ^q to ^^.  It is somewhat annoying, particularly if you have
many different systems you use emacs on, but I find that putting it in
every system's .emacs files makes it easier to deal with.  I don't know if
you need the "set-input-mode" line or not, so try it both with and without,
and use whichever works better for you.  :-)  Good luck!

                                    Ed

(defun flowfix ()
  (interactive)
  (let ((the-table (make-string 128 0)))
    ;; Default is to translate each character into itself.
    (let ((i 0))
      (while (< i 128)
	(aset the-table i i)
	(setq i (1+ i))))
    ;; Swap C-s with C-\
    (aset the-table ?\C-\\ ?\C-s)
    (aset the-table ?\C-s ?\C-\\)
    ;; Swap C-q with C-^
    (aset the-table ?\C-^ ?\C-q)
    (aset the-table ?\C-q ?\C-^)
    (setq keyboard-translate-table the-table))
  (setq terminal-mode-hook '(lambda ()
			      (setq terminal-escape-char 17)))
)

;; Remap ^S and ^Q to be ^\ and ^^...

(flowfix)

;; Use regular flow control...

(set-input-mode nil t t)
----------------------------------------------------------------------------


From: ski@sdl.psych.wright.edu (Scott Isabelle)
 
 I use the following commands in an .emacs file to remap the
 `Ctrl-s' key-stroke to  `Ctrl-\,'
 so the Emacs command `incremental-search-forward' is bound
 to the key-stroke `Ctrl-\' instead of `Ctrl-s',
 and the usual key-stroke sequence for the 'save-buffer' command,
 `Ctrl-x Ctrl-s,'  becomes  `Ctrl-x Ctrl-\.'
 
 
 Put the following 3 lines in a file called .emacs in 
 your home directory on the unix host:
 
     ;; remap C-s to C-\\, for network terminals
     (global-set-key "\C-\\" 'isearch-forward)
     (define-key ctl-x-map "\C-\\" 'save-buffer)
----------------------------------------------------------------------------
 

From: Chris Bamber : chris@dexel.co.za : +27 11 709-7072 : UNIX Support Group :

;  Inits needed to make search, save-buffer,
;  and toggle-read-only when
;  Ctrl/s and Ctrl/q won't work

(define-key global-map "\C-\\" 'isearch-forward)       ; define a key for
                                                       ; isearch-forward

(defconst search-repeat-char ?\C-\\                    ; define the constant
"Character to repeat incremental search forwards.")    ; needed to enable
                                                       ; repeating searches
                                                       ; in the forward
                                                       ; direction

(define-key ctl-x-map "q" 'toggle-read-only)           ; redefine a key for
                                                       ; toggling read only

(define-key esc-map "s" 'save-buffer)                  ; redefine a key for
                                                       ; saving a buffer

----------------------------------------------------------------------------


Thanks for the help.

	/Joakim

+---------------------------------------------+-------------------------------+
| Joakim Hartikainen                          | Phone: +46 8 613 9000, 9315   |
| Ernst & Young, Sweden                       |                               |
| E-mail: Joakim.Hartikainen@ey.se            |                               |
+---------------------------------------------+-------------------------------+

                 reply	other threads:[~1995-09-15 11:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox