[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: I can't yank regexp for/into isearch-forward-regexp's pmpt
From: |
Drew Adams |
Subject: |
RE: I can't yank regexp for/into isearch-forward-regexp's pmpt |
Date: |
Fri, 4 Aug 2006 09:37:14 -0700 |
> (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)
| 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?
No, I get the same result with just `C-o', instead of `M-z':
(define-key isearch-mode-map "\C-o" 'isearch-yank-kill-as-regexp)