From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Speed of keyboard macro execution? Date: Thu, 10 Dec 2015 20:38:58 +0100 Message-ID: <87fuzat7ot.fsf@fencepost.gnu.org> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1449776355 24736 80.91.229.3 (10 Dec 2015 19:39:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Dec 2015 19:39:15 +0000 (UTC) Cc: perry@piermont.com, deng@randomsample.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 10 20:39:14 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 1a773a-0001dp-3u for ged-emacs-devel@m.gmane.org; Thu, 10 Dec 2015 20:39:14 +0100 Original-Received: from localhost ([::1]:44108 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a773Z-0002tY-Gx for ged-emacs-devel@m.gmane.org; Thu, 10 Dec 2015 14:39:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a773N-0002tL-8M for emacs-devel@gnu.org; Thu, 10 Dec 2015 14:39:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a773M-0001g5-7W for emacs-devel@gnu.org; Thu, 10 Dec 2015 14:39:01 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56550) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a773M-0001g0-3r; Thu, 10 Dec 2015 14:39:00 -0500 Original-Received: from localhost ([127.0.0.1]:42136 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1a773L-0004gW-B4; Thu, 10 Dec 2015 14:38:59 -0500 Original-Received: by lola (Postfix, from userid 1000) id E1FB2DF4FA; Thu, 10 Dec 2015 20:38:58 +0100 (CET) In-Reply-To: <83d1ue9lns.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 10 Dec 2015 20:57:27 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:196051 Archived-At: Eli Zaretskii writes: >> From: David Kastrup >> Cc: "Perry E. Metzger" , deng@randomsample.de, >> emacs-devel@gnu.org >> Date: Thu, 10 Dec 2015 19:44:54 +0100 >> >> I don't think there is much sense in having line-move-visual mode active >> when recording/replaying keyboard macros. >> >> Tying the operation of keyboard macros to the current display/font >> selection is just meaningless. Its purpose is for _aiming_ positioning >> by keyboard, and that's just not useful at keyboard replay. > > I think it depends on the keyboard macro. The ones I saw in that demo > did move point, moreover they moved it to the end of a very long line, > so both the actual redisplay and its simulation were at work, > including auto-hscroll. So how did line-move-visual accomplish anything useful here? It is not the question whether line-move-visual was involved here or not: obviously it was or it could hardly have affected the benchmark. > I don't see how you can prevent that: macros are just a mechanical way > of recording and replaying commands, and commands sure do need to run > this code. > > In any case, keyboard macros are not relevant to the discussion > (contrary to the subject line). The issue is slow redisplay with long > lines. Which occured during keyboard macro execution due to line-move-visual being active. Yes, improving the display engine speed would have sped up this benchmark. But if the benchmark did not actually accomplish anything that would be useful in the course of editing, speeding the display engine up will not lead to a corresponding speedup to anything that would be useful in the course of editing. So I think it would make excellent sense to disable visual positioning modes while recording and replaying keyboard macros. Not in order to cheat at benchmarks, but to have actually useful behavior for a keyboard macro that is intended to run without human intervention afterwards and produce meaningful results. I'll grant that paragraph adjustment according to visual width might make sense in a keyboard macro and that _would_ exercise the display engine by necessity. But visual movement? In a keyboard macro? Not really. -- David Kastrup