all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* I can't yank regexp for/into isearch-forward-regexp's pmpt
@ 2006-08-03  3:40 David Combs
  2006-08-03 14:18 ` Kevin Rodgers
       [not found] ` <mailman.4806.1154614770.9609.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: David Combs @ 2006-08-03  3:40 UTC (permalink / raw)


Subject: I can't yank regexp for/into isearch-forward-regexp's pmpt

[  ESC C-s runs the command isearch-forward-regexp  ]

My problem:


Doing isearch-forward-regexp against the line (note the "x"):

     "aaa  aaaa   aaaaaaaa   aaaaa   aaaaax    aa"

  , via the regexp "x", works fine -- and does so REGARDLESS
  of whether the regexp is:

    (a) typed-in the "x" by hand or
    (b) *META*-YANKED-in (ie via "M-y" -- not a plain "y").

However, when yanked-in, none of *these* (for trying to match
FIVE "a's") will match that *same* 
"aaaaaa aaa..." string (at least not for me!):

---- candidate regexps to try with C-y and/or M-y:

1: "a{5}"
2: "a\{5\}"      <<--- works fine IF prompt answered TYPED-IN BY HAND.
3: "a\\{5\\}"
4: "a\\\{5\\\}"

But *none* of the four work (for me) via yank, ie regionize
the regexp, grab it via M-w, put POINT somewhere before that
"aaaaa"-string, and then, as above, do the M-C-s 
(ie isearch-forward-regexp), and respond to its prompt
with M-y.

(Well, it does match, but not that "aaaaaa..."-line,
but rather the very one of the four trial-regexps
I had just grabbed -- as if it were a straight
*non*-regexp search!)


[ But note: the grab-regexp then yank back as prompt-response works
  JUST FINE, not with issearch-whatever, but with M-x OCCUR, 
  and for it's prompt, all it needs is just a PLAIN "C-y"! ]

Please, guys, what's up?


All I want to do is to be able to save into a file some regexps I find useful,
and then be able to use them merely by grabbing one via M-w, and then
answer the prompt by merely yanking or even meta-yanking it into or as
the prompt-response.


Please, what am I doing wrong?

Thanks!


Is there any good way to *explain* it in some tutorial-way that I (or any
user) a rule or technique for doing this with *any* regexp-prompting-for
command, eg that will work equally for *both*:

    M-x occur

    isearch-forward-regexp

    isearch-forward

    M-x query-replace-regexp

    etc, etc


 AND also, what rules for back-slashing a regexp as needed
     for *any* of the above.

Thanks again,

David

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-08-13  1:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.