From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.help Subject: Re: efficient replacing =?utf-8?Q?=E2=80=93?= really faster compared to using the mouse? Date: Fri, 10 Aug 2012 20:00:47 +0400 Message-ID: <86a9y2ohxs.fsf@w2139spb.ru.yotateam.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1344614470 591 80.91.229.3 (10 Aug 2012 16:01:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Aug 2012 16:01:10 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Ferdinand Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 10 18:01:10 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 1Szre5-0005Jf-3r for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Aug 2012 18:01:05 +0200 Original-Received: from localhost ([::1]:49687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Szre3-0007TP-KQ for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Aug 2012 12:01:03 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Szrdw-0007Sz-SB for help-gnu-emacs@gnu.org; Fri, 10 Aug 2012 12:00:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Szrdv-0005JL-MO for help-gnu-emacs@gnu.org; Fri, 10 Aug 2012 12:00:56 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:49483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Szrdv-0005HI-Ez for help-gnu-emacs@gnu.org; Fri, 10 Aug 2012 12:00:55 -0400 Original-Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 6F0FE20D0A; Fri, 10 Aug 2012 12:00:49 -0400 (EDT) Original-Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute3.internal (MEProxy); Fri, 10 Aug 2012 12:00:49 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= from:to:cc:subject:in-reply-to:date:message-id:mime-version :content-type; s=mesmtp; bh=jtHExS963emsSLa7eDAxJYXlZaE=; b=A2Ol jR6ubHkJ0DEmnB28tUpbbpQ+4qeKaCJHeo812OPL2grXhaVnaFKiLXl959sOYIrZ 6wwPrchwXQQtvrsVrOv8TqLE1NLuBUk72kaRkTI3GKx6fVq84r4zPPwnxZ+6aBKs 8NwnWGaQyMATOS91T0Dg6D0Y4gHoZOwdrEIvbns= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-type; s=smtpout; bh=jtHExS963em sSLa7eDAxJYXlZaE=; b=rr9JVCKi3cuRuhp1hWWGp04n/RodWf2bkf4yDVo5u5f 9+uCqCqgqOrRhIx0TB3hAyI5IsUbS96meR5jVDVoTbnJCbiBM1friW3faHzLSiQi XzsFFFptrxiPoC4X/vvip8IxAkxh821N6cZ6v4jabSojzRtKg9bAplNx0KpiTAp4 = X-Sasl-enc: 7EK0SbyYPqBNJH62wJIG8D6A4M6BCl1PJ54Il/nhpy79 1344614449 Original-Received: from w2139spb.ru.yotateam.com (unknown [94.25.210.15]) by mail.messagingengine.com (Postfix) with ESMTPA id C1EE88E01F7; Fri, 10 Aug 2012 12:00:48 -0400 (EDT) In-Reply-To: (message from Ferdinand on Fri, 10 Aug 2012 17:21:48 +0200) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.111.4.29 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:86294 Archived-At: Ferdinand writes: > In emacs I just have no idea how to do this in a reasonable amount of time. > Only to navigate to the next block with C-n / C-p and to get to the > right place in the line with C-b / C-f takes a lot of time. You could use incremental search (C-s and C-r) to jump faster, but this still would be inefficient, of course. > So what am I doing wrong here? > How do you solve such edits in emacs efficiently? You can do M-x query-replace-regexp (bound to C-M-%). Type in the regexp when asked: "xyz[[:digit:]]+" (without quotes) and the replacement: "xyz1". Then continuously press until you get to another section. At this time press "e", edit the replacement string to xyz2 and begin pressing again. Refer to "(emacs) Query Replace" info node for more information. You could also record a macros which is a very natural way in Emacs to perform complex repetitive editing. Read more about that in the manual. Editing via a keyboard only is really faster! -- Filipp Gunbin