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 21:09:59 +0100 Message-ID: <877fkmt694.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> <87fuzat7ot.fsf@fencepost.gnu.org> <837fkm9ire.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1449778235 22352 80.91.229.3 (10 Dec 2015 20:10:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Dec 2015 20:10:35 +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 21:10:35 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 1a77Xp-0003Pj-E9 for ged-emacs-devel@m.gmane.org; Thu, 10 Dec 2015 21:10:29 +0100 Original-Received: from localhost ([::1]:44268 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a77Xo-0004zA-OC for ged-emacs-devel@m.gmane.org; Thu, 10 Dec 2015 15:10:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a77XT-0004wI-0n for emacs-devel@gnu.org; Thu, 10 Dec 2015 15:10:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a77XP-0002KZ-0d for emacs-devel@gnu.org; Thu, 10 Dec 2015 15:10:06 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a77XO-0002KU-Rw; Thu, 10 Dec 2015 15:10:02 -0500 Original-Received: from localhost ([127.0.0.1]:42551 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1a77XN-0003si-1A; Thu, 10 Dec 2015 15:10:02 -0500 Original-Received: by lola (Postfix, from userid 1000) id 6904DDF4FA; Thu, 10 Dec 2015 21:09:59 +0100 (CET) In-Reply-To: <837fkm9ire.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 10 Dec 2015 22:00:05 +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:196057 Archived-At: Eli Zaretskii writes: >> From: David Kastrup >> Cc: emacs-devel@gnu.org, deng@randomsample.de, perry@piermont.com >> Date: Thu, 10 Dec 2015 20:38:58 +0100 >>=20 >> >> Tying the operation of keyboard macros to the current display/font >> >> selection is just meaningless. Its purpose is for _aiming_ positioni= ng >> >> 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. >>=20 >> So how did line-move-visual accomplish anything useful here? > > One example is vertical-motion, and many commands that call it. E.g., > if the macro invokes C-n. Uh WHAT? C-n runs the command next-line (found in global-map), which is an interactive compiled Lisp function in =E2=80=98simple.el=E2=80=99. This function is for interactive use only; in Lisp code use =E2=80=98forward-line=E2=80=99 instead. There is a reason this function is for interactive use only. And replaying a keyboard macro is not interactive. If the variable =E2=80=98line-move-visual=E2=80=99 is non-nil, this com= mand moves by display lines. Otherwise, it moves by buffer lines, without taking variable-width characters or continued lines into account. And this is _exactly_ why line-move-visual should be nil during macro recording/replay because otherwise _no_ _useful_ behavior for non-interactive use results. >> Which occured during keyboard macro execution due to line-move-visual >> being active. > > No, not necessarily. Rather, the original issue with keyboard macros > is just one of the scenarios that brings the broader problem to light, > if the macro invokes one of the affected commands. No argument here. I'm not against fixing the redisplay problem. I'm against involving display-based movement in keyboard macros. >> So I think it would make excellent sense to disable visual >> positioning modes while recording and replaying keyboard macros. > > No, I think you are wrong. Think C-n and C-p again. That's exactly the reason for me wanting to disable visual positioning modes while recording and replaying keyboard macros. I mean, obviously I would not proposing it if I thought it should not make a difference. So I have no idea what your argument here is supposed to be. --=20 David Kastrup