all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: AngusC <anguscomber@gmail.com>
To: Help-gnu-emacs@gnu.org
Subject: Re: regex search - easy keystroke for next?
Date: Tue, 3 May 2011 10:07:57 -0700 (PDT)	[thread overview]
Message-ID: <31534512.post@talk.nabble.com> (raw)
In-Reply-To: <BANLkTi=SuzGgTJufDU7fy-+BUzkm4KW7Ew@mail.gmail.com>



Deniz Dogan-3 wrote:
> 
> 2011/5/3 AngusC <anguscomber@gmail.com>:
>>
>>
>> Deniz Dogan-3 wrote:
>>>
>>> 2011/5/3 AngusC <anguscomber@gmail.com>:
>>>>
>>>> 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?  But that is quite a keystroke.  Is there not a next
>>>> key?
>>>>  n
>>>> or something similar?
>>>>
>>>> Couldn't find on internet search.  Let 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.  It 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.
> 
> -- 
> Deniz Dogan
> 

Hey, glad you were bored :)  Thanks.

I must also learn some lisp.



-- 
View this message in context: http://old.nabble.com/regex-search---easy-keystroke-for-next--tp31533940p31534512.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




  reply	other threads:[~2011-05-03 17:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 16:06 regex search - easy keystroke for next? AngusC
2011-05-03 16:33 ` Deniz Dogan
2011-05-03 16:39   ` AngusC
2011-05-03 16:42     ` Deniz Dogan
2011-05-03 17:07       ` AngusC [this message]
2011-05-06  3:22       ` Le Wang
2011-05-06  5:08         ` Deniz Dogan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=31534512.post@talk.nabble.com \
    --to=anguscomber@gmail.com \
    --cc=Help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.