From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.help Subject: Re: regex search - easy keystroke for next? Date: Tue, 3 May 2011 18:42:26 +0200 Message-ID: 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=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1304440978 12104 80.91.229.12 (3 May 2011 16:42:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 May 2011 16:42:58 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org To: AngusC Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 03 18:42:53 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 1QHIgX-0004Gx-8b for geh-help-gnu-emacs@m.gmane.org; Tue, 03 May 2011 18:42:53 +0200 Original-Received: from localhost ([::1]:41409 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHIgW-0000b8-S5 for geh-help-gnu-emacs@m.gmane.org; Tue, 03 May 2011 12:42:52 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:54216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHIgR-0000b1-Mg for Help-gnu-emacs@gnu.org; Tue, 03 May 2011 12:42:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHIgQ-00075n-UL for Help-gnu-emacs@gnu.org; Tue, 03 May 2011 12:42:47 -0400 Original-Received: from mail-vx0-f169.google.com ([209.85.220.169]:59008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHIgQ-00075j-S9 for Help-gnu-emacs@gnu.org; Tue, 03 May 2011 12:42:46 -0400 Original-Received: by vxk20 with SMTP id 20so281882vxk.0 for ; Tue, 03 May 2011 09:42:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=GZK3jMSARCi2e+hTH+rJ6UtA/520EXJucQMUJd74wqk=; b=GuXw2VyesQYk6BpopT5OnyNgsX/AriWjnM4PmtXBE26PQaq9tpRmi0LJFq1ANqdGhV dAVMeJpo7pJMboagvV9P67g86YPTQ5/KU1d/qWrSOIKBAqTV/CvBUV6/tDl7m8W4tsfU C1w+RjKtkZka+hURfhQnK0+wxEHgH+JqGV8uY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=NHH6Q0n+bVOsfMlFYaUWu3DRbi+z+A8oxv8l95lhb5gljE6mYVaL9gaC+RM7WUTaa1 qjK5sPdQWU8rqVTvCRR2d7ekpOqEAe1TPH+R5sbV32K8r0tTroesiP7iQyGdDqTfQFAU HaH/UEZkgDmMPr/ctk8+WlKjVZdei8iE/yWog= Original-Received: by 10.52.97.41 with SMTP id dx9mr76135vdb.97.1304440966085; Tue, 03 May 2011 09:42:46 -0700 (PDT) Original-Received: by 10.52.159.70 with HTTP; Tue, 3 May 2011 09:42:26 -0700 (PDT) In-Reply-To: <31534241.post@talk.nabble.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.220.169 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:80908 Archived-At: 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 yo= u >>> are >>> on first instance found, you have to type same keystroke AGAIN to get t= o >>> next instance? =A0But that is quite a keystroke. =A0Is there not a next= key? >>> =A0n >>> or something similar? >>> >>> Couldn't find on internet search. =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. =A0It is so much less awkward than spanning the three keys= :) > Since I'm bored, I wrote something for you: (define-key isearch-mode-map (kbd "n") 'isearch-repeat-forward) (define-key isearch-mode-map (kbd "p") 'isearch-repeat-backward) Put that in your ~/.emacs and you will be able to use 'n' to repeat the search forward and 'p' for backward. --=20 Deniz Dogan