all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* quick 'perform last replace again'
@ 2008-04-21 10:12 Phil Carmody
  2008-04-21 11:49 ` David Kastrup
  0 siblings, 1 reply; 7+ messages in thread
From: Phil Carmody @ 2008-04-21 10:12 UTC (permalink / raw)
  To: help-gnu-emacs

Subject line seems to describe the question succinctly.

I've been inserting some typedefs in some C code, and using 
query-replace to turn uint8_t's into whatever_t's. However,
I'm only changing a small proportion of each match, so it 
became a drag. I'd rather just have the ability to move and 
scroll around the file (so _not_ in query-replace mode), and 
when I spot something that needs to be changed I'd like to 
just move the cursor onto the line containing it, press some 
magic key sequence, and have it replace either the first 
(or all) instances of the most-recently-used match with the
most-recently-used replacement on the current line. I do not
want to be left in query-replace mode - I want to then 
continue editing.

And by 'match' I don't mean the most recently used incremental
search, I mean the last thing used as a FROM-STRING in a 
replace-string or query-replace.

I'm quite prepared to have a solution which wraps those
functions in order to store some state.

It looks like it should be quite an easy task, but I'm
exceptionally rusty currently.

Cheers,
Phil
-- 
Dear aunt, let's set so double the killer delete select all.
-- Microsoft voice recognition live demonstration


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

end of thread, other threads:[~2008-04-22 13:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-21 10:12 quick 'perform last replace again' Phil Carmody
2008-04-21 11:49 ` David Kastrup
2008-04-21 20:15   ` Phil Carmody
2008-04-21 20:43     ` David Kastrup
2008-04-21 20:45       ` Sven Joachim
2008-04-22 13:58         ` Joel J. Adamson
2008-04-21 21:33     ` Peter Dyballa

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.