* regexp-replace default
@ 2008-10-15 21:17 Joe
2008-10-15 21:44 ` David Kastrup
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Joe @ 2008-10-15 21:17 UTC (permalink / raw)
To: help-gnu-emacs
Hey all,
Hopefully a simple question for the emacs wizards out there. Say I do
a regexp-relace of:
M-x replace-regexp
Replace regexp: foo
Replace regexp with: bar
But then I realize I actually wanted foo to baz. When I do M-x
replace-regexp it shows me the default
M-x replace-regexp
Replace regexp (default foo -> bar):
Is there someway to get the default text and edit that instead of
typing it in again?
Thanks,
Joe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: regexp-replace default
2008-10-15 21:17 regexp-replace default Joe
@ 2008-10-15 21:44 ` David Kastrup
2008-10-15 21:45 ` Drew Adams
2008-10-15 21:57 ` Xah
2 siblings, 0 replies; 4+ messages in thread
From: David Kastrup @ 2008-10-15 21:44 UTC (permalink / raw)
To: help-gnu-emacs
Joe <joesmoe10@gmail.com> writes:
> Hey all,
> Hopefully a simple question for the emacs wizards out there. Say I do
> a regexp-relace of:
>
> M-x replace-regexp
> Replace regexp: foo
> Replace regexp with: bar
>
> But then I realize I actually wanted foo to baz. When I do M-x
> replace-regexp it shows me the default
>
> M-x replace-regexp
> Replace regexp (default foo -> bar):
>
> Is there someway to get the default text and edit that instead of
> typing it in again?
M-p
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: regexp-replace default
2008-10-15 21:17 regexp-replace default Joe
2008-10-15 21:44 ` David Kastrup
@ 2008-10-15 21:45 ` Drew Adams
2008-10-15 21:57 ` Xah
2 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2008-10-15 21:45 UTC (permalink / raw)
To: 'Joe', help-gnu-emacs
> Hopefully a simple question for the emacs wizards out there. Say I do
> a regexp-relace of:
>
> M-x replace-regexp
> Replace regexp: foo
> Replace regexp with: bar
>
> But then I realize I actually wanted foo to baz. When I do M-x
> replace-regexp it shows me the default
>
> M-x replace-regexp
> Replace regexp (default foo -> bar):
>
> Is there someway to get the default text and edit that instead of
> typing it in again?
Normally in Emacs `C-n' inserts the default value into the minibuffer for
editing/RET.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: regexp-replace default
2008-10-15 21:17 regexp-replace default Joe
2008-10-15 21:44 ` David Kastrup
2008-10-15 21:45 ` Drew Adams
@ 2008-10-15 21:57 ` Xah
2 siblings, 0 replies; 4+ messages in thread
From: Xah @ 2008-10-15 21:57 UTC (permalink / raw)
To: help-gnu-emacs
On Oct 15, 2:17 pm, Joe <joesmo...@gmail.com> wrote:
> Hey all,
> Hopefully a simple question for the emacs wizards out there. Say I do
> a regexp-relace of:
>
> M-x replace-regexp
> Replace regexp: foo
> Replace regexp with: bar
>
> But then I realize I actually wanted foo to baz. When I do M-x
> replace-regexp it shows me the default
>
> M-x replace-regexp
> Replace regexp (default foo -> bar):
>
> Is there someway to get the default text and edit that instead of
> typing it in again?
You can press the up/down arrow to go back/forth promp value history.
Other than that, there's no builtin way to simply edit default find/
replace pair.
Xah
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-15 21:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15 21:17 regexp-replace default Joe
2008-10-15 21:44 ` David Kastrup
2008-10-15 21:45 ` Drew Adams
2008-10-15 21:57 ` Xah
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).