From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Phil Carmody Newsgroups: gmane.emacs.help Subject: quick 'perform last replace again' Date: 21 Apr 2008 13:12:26 +0300 Organization: Saunalahti Customer Message-ID: <873apfikj9.fsf@nonospaz.fatphil.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208785821 26689 80.91.229.12 (21 Apr 2008 13:50:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Apr 2008 13:50:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 21 15:50:56 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JnwPN-0006xi-EP for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Apr 2008 15:50:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JnwOF-0006uy-Ux for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Apr 2008 09:49:04 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder.news-service.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder2.news.saunalahti.fi!reader1.news.saunalahti.fi!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Original-NNTP-Posting-Host: 83.143.57.195 Original-X-Complaints-To: newsmaster@saunalahti.com Original-X-Trace: reader1.news.saunalahti.fi 1208772773 83.143.57.195 (Mon, 21 Apr 2008 13:12:53 EEST) Original-NNTP-Posting-Date: Mon, 21 Apr 2008 13:12:53 EEST Original-Xref: shelby.stanford.edu gnu.emacs.help:158082 X-Mailman-Approved-At: Mon, 21 Apr 2008 09:47:24 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:53451 Archived-At: 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