From unknown Sun Jun 22 08:03:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23555: 24.5; Keyboard macros unexpectedly depend on frame size Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 May 2016 18:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23555 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 23555@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.146342309613591 (code B ref -1); Mon, 16 May 2016 18:25:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 May 2016 18:24:56 +0000 Received: from localhost ([127.0.0.1]:54241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2NCK-0003X8-9c for submit@debbugs.gnu.org; Mon, 16 May 2016 14:24:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2NCI-0003Wq-Oe for submit@debbugs.gnu.org; Mon, 16 May 2016 14:24:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2NCC-0002CQ-FT for submit@debbugs.gnu.org; Mon, 16 May 2016 14:24:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2NCC-0002B0-Cd for submit@debbugs.gnu.org; Mon, 16 May 2016 14:24:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2NCA-0002EZ-3B for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 14:24:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2NC6-00028V-Gq for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 14:24:45 -0400 Received: from metalevel.at ([78.46.218.83]:47533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2NC6-000284-9t for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 14:24:42 -0400 Received: from mt-mbpro.localdomain (localhost.localdomain [127.0.0.1]) by metalevel.at (Postfix) with ESMTP id 99A9FA006E for ; Sun, 15 May 2016 14:10:59 +0200 (CEST) Received: by mt-mbpro.localdomain (Postfix, from userid 501) id 9B56B5153A9; Sun, 15 May 2016 14:10:59 +0200 (CEST) From: Markus Triska Date: Sun, 15 May 2016 14:10:59 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) To reproduce this issue, please first fetch rep.txt from: https://www.metalevel.at/ei/rep.txt and then invoke Emacs as follows: $ emacs -Q -g 80x30 rep.txt The issue depends critically on the frame size. I can reproduce the issue if the last line that I still see in the buffer (when point is at the beginning of the buffer) is the line containing "false." in the definition of declarative_false/0, i.e., line 28 in the file. We now define a keyboard macro that is supposed to remove the 8 spaces that indent all code snippets that appear within the 4
 blocks.

With point at the beginning of the buffer, please press C-x ( to start
recording, and then press the following keys:

     C-s 
 block is unexpectedly
changed to:

    





                ).
    
whereas the expected result it:
mi2_safe(g(G)) :-
        (   safe_goal(G) ->
            mi_clause(G, Body),
            mi2_safe(Body)
        ;   throw(cannot_execute(G))
        ).
    
However, if I revert all changes and simply enlarge the frame, or try the exact same sequence after removing the filler text between lines 33 and 52, or try the macro on the fourth snippet while the
 block is
completely in view, everything works exactly as expected.

Thus, implicit scrolling and the frame size may unexpectedly interact
with this keyboard macro.


In GNU Emacs 24.5.1 (x86_64-apple-darwin14.0.0, GTK+ Version 2.24.28)
 of 2015-09-20 on mt-mbpro
Windowing system distributor `The X.Org Foundation', version 11.0.11502000
Configured using:
 `configure --prefix=/opt/local --without-dbus --without-libotf
 --without-m17n-flt --without-gpm --without-gnutls --with-xml2 --infodir
 /opt/local/share/info/emacs --without-xaw3d --without-imagemagick
 --with-xpm --with-jpeg --with-tiff --with-gif --with-png --with-xft
 --with-x-toolkit=gtk2 --with-gconf --with-rsvg 'CFLAGS=-pipe -Os -arch
 x86_64' CPPFLAGS=-I/opt/local/include 'LDFLAGS=-L/opt/local/lib
 -Wl,-headerpad_max_install_names -lfreetype -lfontconfig -Wl,-no_pie
 -arch x86_64''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix





From unknown Sun Jun 22 08:03:20 2025
X-Loop: help-debbugs@gnu.org
Subject: bug#23555: 24.5; Keyboard macros unexpectedly depend on frame size
Resent-From: Eli Zaretskii 
Original-Sender: "Debbugs-submit" 
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Mon, 16 May 2016 18:55:02 +0000
Resent-Message-ID: 
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 23555
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Markus Triska 
Cc: 23555@debbugs.gnu.org
Reply-To: Eli Zaretskii 
Received: via spool by 23555-submit@debbugs.gnu.org id=B23555.146342486023828
          (code B ref 23555); Mon, 16 May 2016 18:55:02 +0000
Received: (at 23555) by debbugs.gnu.org; 16 May 2016 18:54:20 +0000
Received: from localhost ([127.0.0.1]:54338 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from )
	id 1b2Nel-0006CG-ML
	for submit@debbugs.gnu.org; Mon, 16 May 2016 14:54:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45900)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from ) id 1b2Nek-0006C3-R1
 for 23555@debbugs.gnu.org; Mon, 16 May 2016 14:54:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from ) id 1b2Nec-0004cW-Ly
 for 23555@debbugs.gnu.org; Mon, 16 May 2016 14:54:13 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36150)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from )
 id 1b2Nec-0004bM-J8; Mon, 16 May 2016 14:54:10 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2507
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from )
 id 1b2NeZ-0005By-Ff; Mon, 16 May 2016 14:54:09 -0400
Date: Mon, 16 May 2016 21:53:53 +0300
Message-Id: <83oa854ywu.fsf@gnu.org>
From: Eli Zaretskii 
In-reply-to:  (message from Markus Triska on Sun, 
 15 May 2016 14:10:59 +0200)
References: 
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-Spam-Score: -6.4 (------)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: 
List-Unsubscribe: , 
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
 
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" 
X-Spam-Score: -6.4 (------)

> From: Markus Triska 
> Date: Sun, 15 May 2016 14:10:59 +0200
> 
> Next, simply execute the macro, repeatedly, with:
> 
>     C-x e e e e
> 
> After this, you will see that the fourth 
 block is unexpectedly
> changed to:
> 
>     
> 
> 
> 
> 
> 
>                 ).
>     
> > whereas the expected result it: > >
> mi2_safe(g(G)) :-
>         (   safe_goal(G) ->
>             mi_clause(G, Body),
>             mi2_safe(Body)
>         ;   throw(cannot_execute(G))
>         ).
>     
> > > However, if I revert all changes and simply enlarge the frame, or try > the exact same sequence after removing the filler text between lines 33 > and 52, or try the macro on the fourth snippet while the
 block is
> completely in view, everything works exactly as expected.
> 
> Thus, implicit scrolling and the frame size may unexpectedly interact
> with this keyboard macro.

This is related to the C-n behavior when executing macros, the same
problem which causes bug#23551 and #13452.  If you set
line-move-visual to nil in the buffer where you run the macro, the
problem disappears.

Thanks.




From debbugs-submit-bounces@debbugs.gnu.org Mon May 16 14:55:20 2016
Received: (at control) by debbugs.gnu.org; 16 May 2016 18:55:20 +0000
Received: from localhost ([127.0.0.1]:54345 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from )
	id 1b2Nfk-0006EY-Dq
	for submit@debbugs.gnu.org; Mon, 16 May 2016 14:55:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46226)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from ) id 1b2Nfj-0006E6-FM
 for control@debbugs.gnu.org; Mon, 16 May 2016 14:55:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from ) id 1b2NfV-0004pI-FN
 for control@debbugs.gnu.org; Mon, 16 May 2016 14:55:14 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36162)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from )
 id 1b2NfV-0004p4-Cl
 for control@debbugs.gnu.org; Mon, 16 May 2016 14:55:05 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2508
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from ) id 1b2NfO-0005HR-Rh
 for control@debbugs.gnu.org; Mon, 16 May 2016 14:55:03 -0400
Date: Mon, 16 May 2016 21:54:51 +0300
Message-Id: <83mvnp4yv8.fsf@gnu.org>
From: Eli Zaretskii 
To: control@debbugs.gnu.org
In-reply-to:  (message from Markus Triska on Sun, 
 15 May 2016 14:10:59 +0200)
Subject: Re: bug#23555: 24.5; Keyboard macros unexpectedly depend on frame size
References: 
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-Spam-Score: -6.4 (------)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: 
List-Unsubscribe: , 
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
 
Reply-To: Eli Zaretskii 
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" 
X-Spam-Score: -6.4 (------)

merge 13452 23555
thanks




From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 08 23:47:21 2016
Received: (at control) by debbugs.gnu.org; 9 Jul 2016 03:47:21 +0000
Received: from localhost ([127.0.0.1]:43166 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from )
	id 1bLjEe-0005j4-Qq
	for submit@debbugs.gnu.org; Fri, 08 Jul 2016 23:47:20 -0400
Received: from mail-it0-f49.google.com ([209.85.214.49]:37433)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from ) id 1bLjEc-0005im-Cr
 for control@debbugs.gnu.org; Fri, 08 Jul 2016 23:47:18 -0400
Received: by mail-it0-f49.google.com with SMTP id f6so18362687ith.0
 for ; Fri, 08 Jul 2016 20:47:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:from:to:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=zGH2mFrOKMQNFCqc5kMYA084HL0ESnDyTal7CddnltY=;
 b=OcDTkLqJdAqb/cRMlZq+lL8/GAp7qvjc/zJe7otuifGpO9VzLZhR1rIQUDytG8LLRA
 a5X+50CNoM6xvHe5LJ2zN4Q32j/YFLExS5KbO07lKFRPr/9JkDpayZBZ2gB+YsaIhyL0
 ACFQCNlCvCV5RcZ189O31K92CR0GoHW5Dbe2lOKi62yEU5c4zfAFEXI22ZSZLCc9QSZq
 /Ww1x6fVvR/b426aty9oipCPP02kn6nP/Y976W1hWjx2yXbySs92cJEgSmSgi2hZlEat
 o85+3raevp2xWe8MQ76kwTd5IFT5dG0Hv4sGHKRpVSsenAaowRVABYYXdoZY0DtaQwL8
 R+CQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:from:to:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=zGH2mFrOKMQNFCqc5kMYA084HL0ESnDyTal7CddnltY=;
 b=LliiujUBkldi4ro1zv4zRi2FuPTg5FAXn6H+rOK8BYsjs0VDchCNf77f/CKOER7PHI
 P2OzHBNc02ahs8swbNC68mvQMch3oVc5oLugeAaH1hVOe5RQxOYGwB428lKCvQgTg09t
 02+2Phh+pxLizhsAqBBef3jA9Y07dND4haBOGfWOKVkiwvQMCc77EPY7qGRQjL0DaeIv
 VtUc246W5T3tLEK66DKSwenNfQxN5DfmOaeRQC1d8hzTFlQaRkaFzOJ0ObSRjOE0ySi7
 QjoJhp3BlWiHl3ie4aMWcvuBdY3Uorigr8Bgxr+BrfVON2mjXlEi2VnPxCVXTlBkT9c8
 n8hg==
X-Gm-Message-State: ALyK8tJpoIeTpzWU3wpSkWUmallqFUmEVdx64oOC2Jj0XML6yHLOcJVyG26/7yh76WoxKQ==
X-Received: by 10.36.14.130 with SMTP id 124mr5882498ite.62.1468036032864;
 Fri, 08 Jul 2016 20:47:12 -0700 (PDT)
Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44])
 by smtp.googlemail.com with ESMTPSA id k101sm6002812ioi.9.2016.07.08.20.47.12
 for 
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 08 Jul 2016 20:47:12 -0700 (PDT)
From: npostavs@users.sourceforge.net
To: control@debbugs.gnu.org
Subject: Re: bug#8809: 23.3; Macro problem
References: 
Date: Fri, 08 Jul 2016 23:47:11 -0400
In-Reply-To: 
 (Suresh Aryangat's message of "Mon, 6 Jun 2011 11:52:38 -0400")
Message-ID: <87poqniibk.fsf@users.sourceforge.net>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: 
List-Unsubscribe: , 
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
 
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" 
X-Spam-Score: -0.7 (/)

unarchive 13452
forcemerge 13452 8809
quit