all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Yanking regular expression to regular expression search minibuffer or to regular expression search / replace minibuffer
@ 2009-05-20 23:41 glen.d.scott
  2009-05-22 12:53 ` Michael Heerdegen
  0 siblings, 1 reply; 3+ messages in thread
From: glen.d.scott @ 2009-05-20 23:41 UTC (permalink / raw)
  To: help-gnu-emacs

   I have tried to yank to a regular expression search replace
minibuffer, and also to a regular expression search minibuffer with M-
y, but am not meeting with success.

   When I yank the text:
[^A-Z0-9_]

  to a regular expression search minibuffer with the shortcut M-y, the
text that is placed in the minibuffer to search for is the text:
\[\^A-Z0-9_]

(note the leading \ characters before the [ and before the ^
characters)

   When I try to yank the same regexp to the search replace
minibuffer, I get an error:
Previous command was not a yank

and the text does not get yanked into the minibuffer at all.

   What is the way to yank a regular expression into the regular
expression search minibuffer, or even better, into the search /
replace minibuffer?

Thanks,
Glen Scott


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

* Re: Yanking regular expression to regular expression search minibuffer or to regular expression search / replace minibuffer
  2009-05-20 23:41 Yanking regular expression to regular expression search minibuffer or to regular expression search / replace minibuffer glen.d.scott
@ 2009-05-22 12:53 ` Michael Heerdegen
  2009-05-22 20:24   ` glen.d.scott
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Heerdegen @ 2009-05-22 12:53 UTC (permalink / raw)
  To: help-gnu-emacs

glen.d.scott@gmail.com writes:

>    I have tried to yank to a regular expression search replace
> minibuffer, and also to a regular expression search minibuffer with M-
> y, but am not meeting with success.
>
>    When I yank the text:
> [^A-Z0-9_]
>
>   to a regular expression search minibuffer with the shortcut M-y, the
> text that is placed in the minibuffer to search for is the text:
> \[\^A-Z0-9_]
>
> (note the leading \ characters before the [ and before the ^
> characters)
>
>    When I try to yank the same regexp to the search replace
> minibuffer, I get an error:
> Previous command was not a yank
>
> and the text does not get yanked into the minibuffer at all.
>
>    What is the way to yank a regular expression into the regular
> expression search minibuffer, or even better, into the search /
> replace minibuffer?
>
> Thanks,
> Glen Scott

I think M-e is what you are looking for.


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

* Re: Yanking regular expression to regular expression search  minibuffer or to regular expression search / replace minibuffer
  2009-05-22 12:53 ` Michael Heerdegen
@ 2009-05-22 20:24   ` glen.d.scott
  0 siblings, 0 replies; 3+ messages in thread
From: glen.d.scott @ 2009-05-22 20:24 UTC (permalink / raw)
  To: help-gnu-emacs

> glen.d.sc...@gmail.com writes:
> >    What is the way to yank a regular expression into the regular
> > expression search minibuffer, or even better, into the search /
> > replace minibuffer?

On May 22, 5:53 am, Michael Heerdegen <ab...@127.0.0.1> wrote:
> I think M-e is what you are looking for.

   Thank you Michael! You're right!

   When typing into the minibuffer for a regular expression search,
hitting M-e goes into an edit mode for the minibuffer where you can
use commands such as C-y to yank regular expressions (or anything
else).

   About my question on how to yank a regular expression into the
search / replace minibuffer, silly me! I missed the fact that the
minibuffer for search / replace directly allows one to use C-y to do a
yank. Once you've done the C-y, it is possible to use M-y to cycle
back through the kill ring (just like regular editing in a standard
buffer). No wonder emacs was giving me the "Previous command was not a
yank" error when trying to directly start with an M-y!!!


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

end of thread, other threads:[~2009-05-22 20:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-20 23:41 Yanking regular expression to regular expression search minibuffer or to regular expression search / replace minibuffer glen.d.scott
2009-05-22 12:53 ` Michael Heerdegen
2009-05-22 20:24   ` glen.d.scott

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.