home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!mintaka.lcs.mit.edu!lynx!random.ccs.northeastern.edu!news
- From: ratinox@splinter.coe.northeastern.edu (Richard Pieri)
- Newsgroups: comp.emacs
- Subject: Re: isearch-forward bound to C-V doesn't repeat (and Flow Control!)
- Message-ID: <RATINOX.92Dec12174649@splinter.coe.northeastern.edu>
- Date: 12 Dec 92 22:47:44 GMT
- Article-I.D.: splinter.RATINOX.92Dec12174649
- References: <ROB.92Dec5233929@fosters.med.utah.edu>
- Sender: news@random.ccs.northeastern.edu
- Reply-To: ratinox@meceng.coe.northeastern.edu
- Distribution: comp.emacs
- Organization: 3WA, Boston Office. Or Nu Meta Chi. Take your pick.
- Lines: 52
- In-Reply-To: rob@fosters.med.utah.edu's message of 5 Dec 92 23: 39:29
- Nntp-Posting-Host: splinter.coe.northeastern.edu
- X-Posting-Software: GNUS 3.14.1 [ NNTP-based News Reader for GNU Emacs ]
- X-Signature-Virus-Protection: Version 1.51
- X-Get-A-Clue: Have two, they're small.
-
- >>>>> In article <ROB.92Dec5233929@fosters.med.utah.edu>,
- >>>>> rob@fosters.med.utah.edu (Rob Sargent) writes:
-
- RS> Because I'm coming in from home via a modem/terminal-server I needed
- RS> to hook isearch onto some non-flow control character and I chose V. I
- RS> got rather peculiar behavior. It would only search as long as I was
- RS> typing. Subsequent C-V's cleared the mini-buffer and restarted the
- RS> search as if no previous search had ever been done.
-
- Because in the minibuffer's own keymap, which is different from the
- "default" keymap, C-v is bound to scroll-up, the normal "default"
- binding.
-
- RS> C-R however continued to function normally!
-
- Of course, because C-r has the same binding in both keymaps, as does C-s.
-
- RS> Obvioulsy there are some features of global-set-key that I have
- RS> yet to master. (And my boss want an emacs tutorial tomorrow!!)
-
- C-letter keys shouldn't be bound to things, as a general rule, since
- just about all of them are already bound to something. I do have a
- similar problem, though, so I have C-\ remapped (which overrides
- global-set-key, btw) to do C-s and C-] to do C-q. Here's the code that
- does it:
-
- ;; until DAC fixes the #$% modems
- (progn
- (setq keyboard-translate-table (make-string 128 1))
- (let ((i 0))
- (while (< i 128)
- (aset keyboard-translate-table i i)
- (setq i (1+ i)))))
-
- ; Cause C-s/C-q to be used for flow control.
- ; To get C-s, type C-\ (control-backslash)
- ; To get C-q, type C-] (control-right-bracket)
- ; These work by translating C-\ to C-S before Emacs looks at them, so they
- ; work even from inside I-search mode
-
- (aset keyboard-translate-table ?\C-\\ ?\C-S)
- (aset keyboard-translate-table ?\C-\] ?\C-Q)
-
- Note that this will cause problems with telnet sessions with C-] being
- the telnet escape character. Ah, well.
-
- --Rat
- ||||| | | | | | | | | | | | | | | | | | | | | | | |||||
- Northeastern's Stainless Steel Rat ratinox@meceng.coe.northeastern.edu
- 40,000 men and women every day/Another 40,000 comin' every day/Come on
- baby/Baby take my hand/We'll be able to fly/Baby I'm your man
- --Blue Oyster Cult, (Don't Fear) The Reaper
-