From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: AngusC Newsgroups: gmane.emacs.help Subject: Re: regex search - easy keystroke for next? Date: Tue, 3 May 2011 10:07:57 -0700 (PDT) Message-ID: <31534512.post@talk.nabble.com> References: <31533940.post@talk.nabble.com> <31534241.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1304442497 22025 80.91.229.12 (3 May 2011 17:08:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 May 2011 17:08:17 +0000 (UTC) To: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 03 19:08:12 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QHJ4w-00031u-36 for geh-help-gnu-emacs@m.gmane.org; Tue, 03 May 2011 19:08:06 +0200 Original-Received: from localhost ([::1]:42270 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHJ4v-0006Rb-GE for geh-help-gnu-emacs@m.gmane.org; Tue, 03 May 2011 13:08:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHJ4p-0006Qw-PN for Help-gnu-emacs@gnu.org; Tue, 03 May 2011 13:08:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHJ4o-0003eV-AG for Help-gnu-emacs@gnu.org; Tue, 03 May 2011 13:07:59 -0400 Original-Received: from sam.nabble.com ([216.139.236.26]:37532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHJ4o-0003dj-57 for Help-gnu-emacs@gnu.org; Tue, 03 May 2011 13:07:58 -0400 Original-Received: from isper.nabble.com ([192.168.236.156]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from ) id 1QHJ4n-0007Wh-6d for Help-gnu-emacs@gnu.org; Tue, 03 May 2011 10:07:57 -0700 In-Reply-To: X-Nabble-From: anguscomber@gmail.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 216.139.236.26 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80909 Archived-At: Deniz Dogan-3 wrote: >=20 > 2011/5/3 AngusC : >> >> >> Deniz Dogan-3 wrote: >>> >>> 2011/5/3 AngusC : >>>> >>>> Hello >>>> >>>> Am I correct in thinking that if you use a regex search ie C-M-s, if >>>> you >>>> are >>>> on first instance found, you have to type same keystroke AGAIN to get >>>> to >>>> next instance? =C2=A0But that is quite a keystroke. =C2=A0Is there not= a next >>>> key? >>>> =C2=A0n >>>> or something similar? >>>> >>>> Couldn't find on internet search. =C2=A0Let me know. >>>> >>>> Thanks. >>>> >>>> Angus >>>> >>> >>> Actually, you can just use C-s and C-r to go to the next or previous >>> match as long as you've used C-M-s the first time. If you want other >>> keys than that you'd have to modify isearch-mode-map. >>> >>> >> Great, thanks. =C2=A0It is so much less awkward than spanning the three = keys >> :) >> >=20 > Since I'm bored, I wrote something for you: >=20 > (define-key isearch-mode-map (kbd "n") 'isearch-repeat-forward) > (define-key isearch-mode-map (kbd "p") 'isearch-repeat-backward) >=20 > Put that in your ~/.emacs and you will be able to use 'n' to repeat > the search forward and 'p' for backward. >=20 > --=20 > Deniz Dogan >=20 Hey, glad you were bored :) Thanks. I must also learn some lisp. --=20 View this message in context: http://old.nabble.com/regex-search---easy-key= stroke-for-next--tp31533940p31534512.html Sent from the Emacs - Help mailing list archive at Nabble.com.