From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Per_Starb=C3=A4ck?= Newsgroups: gmane.emacs.devel Subject: Re: Speed of keyboard macro execution? Date: Sun, 13 Dec 2015 00:20:24 +0100 Message-ID: References: <20151209163954.0cefcc7f@jabberwock.cb.piermont.com> <87si3bcltu.fsf@isaac.fritz.box> <20151209180343.5a67c0e7@jabberwock.cb.piermont.com> <83r3iu9rvp.fsf@gnu.org> <20151210120051.6be8201f@jabberwock.cb.piermont.com> <87k2omciy2.fsf@isaac.fritz.box> <20151210123312.39c417c9@jabberwock.cb.piermont.com> <83lh929omw.fsf@gnu.org> <87k2omta6x.fsf@fencepost.gnu.org> <83d1ue9lns.fsf@gnu.org> <87fuzat7ot.fsf@fencepost.gnu.org> <837fkm9ire.fsf@gnu.org> <20151210151631.3b07c461@jabberwock.cb.piermont.com> <87twnqrqgx.fsf@fencepost.gnu.org> <87h9jqrpa9.fsf@fencepost.gnu.org> <878u51swr0.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1449962439 16775 80.91.229.3 (12 Dec 2015 23:20:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Dec 2015 23:20:39 +0000 (UTC) Cc: Eli Zaretskii , "emacs-devel@gnu.org" , "Perry E. Metzger" To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 13 00:20:38 2015 Return-path: Envelope-to: ged-emacs-devel@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 1a7tSv-0000iR-8a for ged-emacs-devel@m.gmane.org; Sun, 13 Dec 2015 00:20:37 +0100 Original-Received: from localhost ([::1]:53334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7tSu-0003Jz-0z for ged-emacs-devel@m.gmane.org; Sat, 12 Dec 2015 18:20:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7tSo-0003Jg-86 for emacs-devel@gnu.org; Sat, 12 Dec 2015 18:20:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7tSn-0000ps-5L for emacs-devel@gnu.org; Sat, 12 Dec 2015 18:20:30 -0500 Original-Received: from mail-vk0-x22c.google.com ([2607:f8b0:400c:c05::22c]:34676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7tSj-0000p7-CB; Sat, 12 Dec 2015 18:20:25 -0500 Original-Received: by vkgj66 with SMTP id j66so39171628vkg.1; Sat, 12 Dec 2015 15:20:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=WdG5EqMkRXnIRKTKZkWL4qHiPVsM+cnARRYP5XkfeVA=; b=x7bEmjfiQVk2XBPggreVOLfXkgheK5pJzc/7uP+L3AbYBep6o9MmeZQf39M7feISSe vcEl4OTajOhXOIiynArPwixJ98OfazI5yedBg5/p0Xf41OJm3y2GANkwnh17HEplTifR KKJ0hpVwRFUw51A9umek4CDbBsC/4Oh19KdWej/3EacsQHepejvkec+XiCjD7CcAiZbD dhO88bFZFkYQ6WLVs6fvmQL2tMEAf/nNc9aRq6MTEEn+tMA/hWhYxNXhRAG135ZATOxk oREGdPHqkMawSFiXMJmyvoimcxDtvLi2PpnXaKYF6O9hHEIz53LI+5f38oIhO0HQJd5r 5rHg== X-Received: by 10.31.163.197 with SMTP id m188mr19054996vke.89.1449962424767; Sat, 12 Dec 2015 15:20:24 -0800 (PST) Original-Received: by 10.31.15.134 with HTTP; Sat, 12 Dec 2015 15:20:24 -0800 (PST) In-Reply-To: <878u51swr0.fsf@fencepost.gnu.org> X-Google-Sender-Auth: xPJ0gIFTKL4H_8ZtzutOf8x1Byc X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c05::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196185 Archived-At: > Repeating a keyboard macro without intervening other actions means that > the macro, after achieving its changes, has to progress to the next > position where executing it makes sense as its last part. This progress > will often involve moving to the next line. The next _visual_ line is > meaningless for that purpose in almost all situations. Under manual > control, you'll just move across some continuation line. But a repeated > keyboard macro is not under manual control. > > My claim is not about "right" but "useful" behavior. We've had one > other person state that he switches off visual-line-mode always since > keyboard macros would otherwise be useless. Of course that's one > possibility, but visual-line-mode is actually useful for _visual_ > navigation. Which is not what happens during macro execution since the > computer executes the recorded keys without human intervention. Which > makes sense in _similar_ but not identical situations (for identical > situations, one could just copy and paste the result repeatedly). And > non-identical situations will sometimes have lines wrapped visually and > sometimes not without that being related to the structure of the > modified text. > > I am surprised that I should be the only user of keyboard macros having > noticed that. Of course you are not! Your proposed change would make it a easier to write macros. Now I often resort to work-arounds like C-e C-f and then more navigation to get to the right place in the new line to be sure to actually get to the next line in the typical case where you run a macro on one line at a time. Since I teach a course for GNU beginners with some Emacs in it, I see what kind of mistakes beginners make when using macros. There is no surprise there, I think. They navigate with visual feedback in a way that works fine for the line they are in, but that doesn't do the "same" thing on (some) other lines. First it can be totally obvious like just typing ... to get to the end of line. Later perhaps using word navigation in a CSV file where most fields are one word, but where there are some fields with several words where their macros won't work. line-move-visual invites this sort of using visual feedback that only works for a particular line and can lead to the same kind of surprises. It has been written here that not changing any settings when defining macros leads to less surprises. Yes, less surprises *while defining*, but more surprises when using those macros. And then it's certainly possible that you don't notice it, because you just ran your macro on all lines in a buffer without checking every one. I think one reason not many have written in support for your position is that some experienced Emacs users turn off visual-line-mode and think that it's mostly there for less experienced users, so they don't have any problems. And the less experienced users don't use macros that much (except when forced to in my course :-) .