unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: I can't yank regexp for/into isearch-forward-regexp's pmpt
Date: Fri, 04 Aug 2006 08:05:43 -0600	[thread overview]
Message-ID: <eavk97$7ht$1@sea.gmane.org> (raw)
In-Reply-To: <eat0jq$g3a$1@sea.gmane.org>

Kevin Rodgers wrote:
> You might be able to do what you want with a little hacking:
> 
> (defun isearch-yank-kill-as-regexp ()
>   "Like `isearch-yank-kill', except during regular expression search:
> Search for the text that matches the string (as a regexp) instead of
> searching for the literal string itself."
>   (let ((isearch-regexp nil))
>     (isearch-yank-kill)))
> 
> (define-key isearch-mode-map "\M-z" 'isearch-yank-kill-as-regexp)

Drew Adams points out that we need an (interactive) form between
isearch-yank-kill-as-regexp's argument list and its doc string.

He also reports:

| 2. For some reason, when using `C-M-s' followed by `M-z', the search seems
| to always start at the end of the buffer. So, it first fails, and then it
| can succeed on overwrap search (repeating `C-s'). This problem doesn't 
occur
| for simple `C-s' search. I'm not sure why this happens.

I suspect it has something to do with the global binding of M-z to
zap-to-char and/or the squirrely business with isearch-other-meta-char,
which I don't understand.  Does the problem go away if you bind a
different meta-character or a control-character to
isearch-yank-kill-as-regexp?

-- 
Kevin

  reply	other threads:[~2006-08-04 14:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-03  3:40 I can't yank regexp for/into isearch-forward-regexp's pmpt David Combs
2006-08-03 14:18 ` Kevin Rodgers
2006-08-04 14:05   ` Kevin Rodgers [this message]
2006-08-04 16:37     ` Drew Adams
     [not found] ` <mailman.4806.1154614770.9609.help-gnu-emacs@gnu.org>
2006-08-13  1:10   ` David Combs

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='eavk97$7ht$1@sea.gmane.org' \
    --to=ihs_4664@yahoo.com \
    /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).