From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Unknown Newsgroups: gmane.emacs.help Subject: Re: replace C-s with C-f Date: Tue, 18 Feb 2003 01:42:17 GMT Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: main.gmane.org 1045532592 11559 80.91.224.249 (18 Feb 2003 01:43:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 18 Feb 2003 01:43:12 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18kwms-000307-00 for ; Tue, 18 Feb 2003 02:43:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18kwp9-00016M-01 for gnu-help-gnu-emacs@m.gmane.org; Mon, 17 Feb 2003 20:45:31 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!news03.bloor.is.net.cable.rogers.com!news04.bloor.is.net.cable.rogers.com.POSTED!not-for-mail Original-From: Le Wang Original-Newsgroups: gnu.emacs.help Original-Lines: 55 User-Agent: KNode/0.7.1 Original-NNTP-Posting-Host: 24.192.182.203 Original-X-Complaints-To: abuse@rogers.com Original-X-Trace: news04.bloor.is.net.cable.rogers.com 1045532537 24.192.182.203 (Mon, 17 Feb 2003 20:42:17 EST) Original-NNTP-Posting-Date: Mon, 17 Feb 2003 20:42:17 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:110318 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:6820 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6820 David Kastrup wrote: > Bruce Ingalls writes: > >> David Kastrup wrote: >> > Bruce Ingalls writes: >> > >> >>I bound C-f to isearch-forward, as follows: >> >> >> >> (global-set-key [(control s)] 'save-buffer) >> >> (global-set-key [(control f)] 'isearch-forward) >> >> >> >>The bindings work, but when I want to continue a search, >> >>by hitting C-f again, it instead stops & restarts the search. >> >> >>What is the best way to handle this? >> ...> So the answer is obvious: add your stuff to isearch-mode-map. >> >> Thanks for the help. I have problems with the syntax. >> At least the following compiled :) >> >> (append 'isearch-mode-map '(define-key map "\C-f" 'isearch-repeat-forward)) > > What nonsense. How about looking up the functions you are using with > C-h f ? > > In this case, I'd try something like > (eval-after-load 'isearch > (define-key isearch-mode-map ?\C-f 'isearch-repeat-forward)) > Here is a sniplet from my init file. It's commented out, because I've wholly given up on making Emacs work how I wish. It's obviously much smarter than me. I'd advise you to do the same. ;) ... ;*old code* >>>>>>>>>>>>>>>>>>> ;(global-set-key [(control f)] 'isearch-forward-regexp) ;(global-set-key [(control F)] 'isearch-backward-regexp) ;(global-set-key [(control r)] 'query-replace-regexp) ;(mapcar ; '(lambda (map) ; (define-key map [(control f)] 'isearch-repeat-forward) ; (define-key map [(control F)] 'isearch-repeat-backward) ; (define-key map [(tab)] 'isearch-complete) ; (define-key map [(control s)] (lookup-key ; global-map ; [(control s)])) ; (define-key map [(control r)] (lookup-key ; global-map ; [(control r)]))) ; (list isearch-mode-map minibuffer-local-isearch-map)) -- Le