From: Michael Heerdegen <michael_heerdegen@web.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Modified isearch
Date: Thu, 23 Jan 2014 19:01:52 +0100 [thread overview]
Message-ID: <8761pawp9r.fsf@web.de> (raw)
In-Reply-To: lbr64l$1ruo$1@adenine.netfront.net
Peter West <lists@pbw.id.au> writes:
> What I want to do is to invoke normal isearch and isearch-regexp
> functions (forward functions at least), and have the mark reset to the
> beginning of the matched text. So I tried this:
>
>
> (define-key search-map (kbd "C-c R") 'my-set-mark-point-around-isearch)
> (defun my-set-mark-point-around-isearch ()
> "Do a forward search and set mark to the beginning of the
> search-term."
> (interactive)
> (isearch-forward)
> (push-mark isearch-other-end))
>
>
> No luck.
Works well for me. When I hit C-x C-x is see that the mark has been set
accordingly. Or do you want the region to be activated? Then use the
third argument of `push-mark'.
Regards,
Michael.
prev parent reply other threads:[~2014-01-23 18:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 13:40 Modified isearch Peter West
2014-01-23 17:28 ` Drew Adams
2014-01-24 23:12 ` Peter West
2014-01-25 1:24 ` Drew Adams
2014-01-23 18:01 ` Michael Heerdegen [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8761pawp9r.fsf@web.de \
--to=michael_heerdegen@web.de \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).