From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: efficient replacing =?utf-8?Q?=E2=80=93?= really faster compared to using the mouse? Date: Sun, 12 Aug 2012 10:49:55 +0800 Message-ID: <87ipcokeng.fsf@ericabrahamsen.net> References: <86vcgpmv1b.fsf@w2139spb.ru.yotateam.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1344739821 20080 80.91.229.3 (12 Aug 2012 02:50:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 12 Aug 2012 02: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 Sun Aug 12 04:50:22 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T0OFx-0007Hk-KE for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Aug 2012 04:50:21 +0200 Original-Received: from localhost ([::1]:36628 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0OFw-0006BE-RN for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Aug 2012 22:50:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0OFs-0006B9-6P for help-gnu-emacs@gnu.org; Sat, 11 Aug 2012 22:50:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0OFr-000178-2u for help-gnu-emacs@gnu.org; Sat, 11 Aug 2012 22:50:16 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:43594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0OFq-000172-T4 for help-gnu-emacs@gnu.org; Sat, 11 Aug 2012 22:50:15 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T0OFn-0006x6-10 for help-gnu-emacs@gnu.org; Sun, 12 Aug 2012 04:50:11 +0200 Original-Received: from 114.250.122.171 ([114.250.122.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 12 Aug 2012 04:50:10 +0200 Original-Received: from eric by 114.250.122.171 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 12 Aug 2012 04:50:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 114.250.122.171 X-Pgp-Key: http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0xC98BAE7B99D0D373 X-Pgp-Fingerprint: 8E19 28A9 2B51 0C67 565D DB34 C98B AE7B 99D0 D373 User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) Cancel-Lock: sha1:KJOaf8mfaYz6BROzUwWs4ByQCyU= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:86315 Archived-At: On Sat, Aug 11 2012, Filipp Gunbin wrote: >> What would be perfect in this particular case, would be a search-function that lets me edit the replacement-string after each occurrence. >> >> You would search for xyz, toggle through all the occurrences and for each occurrence you can type in an individual replacement string. >> >> (like M-% xyz ent 1 spc 1 spc 1 spc 2 spc 2 spc 2 spc 2 …..) >> >> >> Is there something like this? > > That's exactly the thing I wrote about in > http://lists.gnu.org/archive/html/help-gnu-emacs/2012-08/msg00149.html. Emacs > saves the last replacement so you only have to change it at the > beginning of the section. One more (!) option, is to use a keyboard macro to do this. When recording, delete the string you want to replace, then hit `C-u C-x q', which will query you for the new string. `C-M-c' to tell it you're done. Now every time you run the macro, it will stop at the same place and ask you for a new string. I guess functionally no different from Filipp's solution, but a good thing to know about. See (emacs) Keyboard Macro Query -- GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.11) of 2012-08-06 on pellet