From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23551: 24.5; beginning-of-line wrong in repeated kbd macro Date: Mon, 16 May 2016 20:30:29 +0300 Message-ID: <83wpmt52ru.fsf@gnu.org> References: <20160516163032.Horde.dzyiidpM-qxZXkDDoOkApwx@fermat.dima.unige.it> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1463419946 17183 80.91.229.3 (16 May 2016 17:32:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 May 2016 17:32:26 +0000 (UTC) Cc: 23551@debbugs.gnu.org To: abbott@dima.unige.it Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 16 19:32:16 2016 Return-path: Envelope-to: geb-bug-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 1b2MNH-0007qR-JC for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 May 2016 19:32:11 +0200 Original-Received: from localhost ([::1]:45330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MNH-0003ZY-3Z for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 May 2016 13:32:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MNC-0003Qp-2B for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 13:32:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2MN8-0007dz-BL for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 13:32:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MN8-0007dp-6v for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 13:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b2MN8-0007FV-1m for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 13:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 May 2016 17:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23551 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23551-submit@debbugs.gnu.org id=B23551.146341987225546 (code B ref 23551); Mon, 16 May 2016 17:32:02 +0000 Original-Received: (at 23551) by debbugs.gnu.org; 16 May 2016 17:31:12 +0000 Original-Received: from localhost ([127.0.0.1]:54128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2MMK-0006do-Di for submit@debbugs.gnu.org; Mon, 16 May 2016 13:31:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2MMI-0006XS-4Z for 23551@debbugs.gnu.org; Mon, 16 May 2016 13:31:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2MLs-0006qM-Ak for 23551@debbugs.gnu.org; Mon, 16 May 2016 13:31:04 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MLs-0006oQ-5r; Mon, 16 May 2016 13:30:44 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2434 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b2MLo-0002DM-OS; Mon, 16 May 2016 13:30:42 -0400 In-reply-to: <20160516163032.Horde.dzyiidpM-qxZXkDDoOkApwx@fermat.dima.unige.it> (abbott@dima.unige.it) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:118298 Archived-At: > Date: Mon, 16 May 2016 16:30:32 +0000 > From: abbott@dima.unige.it > Cc: Abbott John > > Open the attached file in Emacs, and move point to the first position. > Define a keyboard macro: (I want to put each line inside double-quotes) > " ;; self-insert-command > C-e ;; move-end-of-line > " ;; self-insert-command > C-a ;; message-beginning-of-line > ;; next-line > > Now ask Emacs to repeat this macro 49 times. > The result is wrong: at around line 35, the first double-quote > is no longer at the start of the line; then on successive lines > the position of the first inserted double-quote walks to the right. Thanks. This is a duplicate of the (old, but unsolved) bug #13452. The problem is not in beginning-of-line, it's in next-line: when the window needs to scroll as result of next-line, point ends up in columns 1, 2, 3, ... (i.e. gains one column per line moved down), instead of sticking to column zero. To work around, set line-move-visual to nil before running the macro (or as part of the macro), then the problem goes away. I'll try to debug this one of these days.