From unknown Mon Jun 23 06:00:30 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#15126 <15126@debbugs.gnu.org> To: bug#15126 <15126@debbugs.gnu.org> Subject: Status: 24.3; kmacro-end-and-call-macro repeats macro multiple times following isearch-forward Reply-To: bug#15126 <15126@debbugs.gnu.org> Date: Mon, 23 Jun 2025 13:00:30 +0000 retitle 15126 24.3; kmacro-end-and-call-macro repeats macro multiple times = following isearch-forward reassign 15126 emacs submitter 15126 Simon Katz severity 15126 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 18 18:32:39 2013 Received: (at submit) by debbugs.gnu.org; 18 Aug 2013 22:32:39 +0000 Received: from localhost ([127.0.0.1]:39037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VBBWY-0000ih-6l for submit@debbugs.gnu.org; Sun, 18 Aug 2013 18:32:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40007) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VBAhd-0007e0-T8 for submit@debbugs.gnu.org; Sun, 18 Aug 2013 17:40:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBAhU-0003yy-Ua for submit@debbugs.gnu.org; Sun, 18 Aug 2013 17:39:56 -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,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBAhU-0003yt-Ql for submit@debbugs.gnu.org; Sun, 18 Aug 2013 17:39:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBAhR-0007O8-HS for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2013 17:39:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBAhL-0003xf-Vn for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2013 17:39:49 -0400 Received: from mail-la0-x242.google.com ([2a00:1450:4010:c03::242]:52333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBAhL-0003x9-Kt for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2013 17:39:43 -0400 Received: by mail-la0-f66.google.com with SMTP id er20so1477241lab.9 for ; Sun, 18 Aug 2013 14:39:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=oAvBTVinwJWEW4s7QJxF7n1PJ6gqLQa+yKI2gqILDUE=; b=OCSRN8vJ3DaKHAN/WTHzFMYbzmDJd40Skmhfb29QmD7YWFyi7Mcf4b2fMlvW5m+p0E zutEF9GbewIQSBDtfyeCnKGeYgeMmBh8/moS2UZMqxpcB+tqqmxS2YaNsRnM68RZFA0Y IFRrnEseJw2mO/TM+Vu+G0HySgRmvlN/qMicNMlBo5JJe2E+PLNiU8NL53Lryq8dYs1a yB9ETHb2N1XgtdvWcwSLjnwPbfnkTeq6ZESKIXIGx9+YgGtDRaqhVknPU8SFsPBTmis4 pTBZjnVlifLFyc4wo28VC5Ru9ZqHiVMot0y2MQUmeIiltHC9/k5p6HFnveecc5QFRM4F 0HSg== MIME-Version: 1.0 X-Received: by 10.112.14.102 with SMTP id o6mr3361396lbc.28.1376861981412; Sun, 18 Aug 2013 14:39:41 -0700 (PDT) Received: by 10.112.219.162 with HTTP; Sun, 18 Aug 2013 14:39:41 -0700 (PDT) Date: Sun, 18 Aug 2013 22:39:41 +0100 Message-ID: Subject: 24.3; kmacro-end-and-call-macro repeats macro multiple times following isearch-forward From: Simon Katz To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=001a11c37aba4e92d204e43fa9cc X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 18 Aug 2013 18:32:36 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -2.4 (--) --001a11c37aba4e92d204e43fa9cc Content-Type: text/plain; charset=ISO-8859-1 If I have a buffer with some text that is repeated several times and do the following: - C-s (isearch-forward) to search for the repeated text - C-x ( (kmacro-start-macro) - Enter some new text - C-s C-s to search again - C-x e (kmacro-end-and-call-macro) I get different behaviour in my old and new versions of Emacs. In Emacs 24.2.1 and all previous versions I've used, kmacro-end-and-call-macro calls the macro once more, and I can go through the file making changes one at a time, and I can stop when I want. In Emacs 24.3.1, kmacro-end-and-call-macro calls the macro repeatedly making changes to all the repeated text up to the end of the file. Interestingly, if I define a similar keyboard macro that uses next-error rather than isearch-forward I get my changes one at a time. Is this some bizarre new behaviour for isearch-forward? Can I get the old behaviour back? Here's a precise recipe: /Applications/Emacs-24-3-1.app/Contents/MacOS/Emacs -Q Then at the start of the *scratch* buffer: C-s e r C-x ( x x x x C-s C-s C-x e Emacs makes multiple changes for the C-x e. In GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2013-03-13 on bob.porkrind.org Windowing system distributor `Apple', version 10.3.1138 Configured using: `configure '--host=x86_64-apple-darwin' '--build=i686-apple-darwin' '--with-ns' 'build_alias=i686-apple-darwin' 'host_alias=x86_64-apple-darwin' 'CC=gcc -mmacosx-version-min=10.7 -isystem /Users/david/Xcode-10.7_4.5.2/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/ -F/Users/david/Xcode-10.7_4.5.2/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks'' Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: s-x M-x r e p o r t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. kill-region: The mark is not set now, so there is no region Making completion list... Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode easymenu time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) --001a11c37aba4e92d204e43fa9cc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
If I have a buffer with some text that is repeated se= veral times and
do the following:
=A0 - C-s <som= e text> =A0(isearch-forward) =A0 to search for the repeated text
=A0 - C-x ( =A0 (kmacro-start-macro)
=A0 - Enter some new text
=A0 - C-s C-s =A0 to search again<= /div>
=A0 - C-x e =A0(kmacro-end-and-call-macro)
I get differ= ent behaviour in my old and new versions of Emacs.

In Emacs 24.2.1 and all previous versions I've used,
kmacro-end-and-call-macro calls the macro once more, and I can go
through the file making changes one at a time, and I can stop when I<= /div>
want.

In Emacs 24.3.1, kmacro-end-and-ca= ll-macro calls the macro repeatedly
making changes to all the repeated text up to the end of the file.

Interestingly, if I define a similar keyboard macro t= hat uses
next-error rather than isearch-forward I get my changes = one at a time.

Is this some bizarre new behaviour for isearch-forward?= Can I get the
old behaviour back?

Here&= #39;s a precise recipe:

=A0 /Applications/Emacs-24= -3-1.app/Contents/MacOS/Emacs -Q

=A0 Then at the start of the *scratch* buffer:

=A0 C-s =A0 e r =A0 C-x ( =A0 x x x x =A0 C-s C-s =A0 C-x = e

=A0 Emacs makes multiple changes for the =A0C-x = e.





In G= NU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
= =A0of 2013-03-13 on bob.porkrind.org
Windowing system distributor `Apple', version 10.3.1138
= Configured using:
=A0`configure '--host=3Dx86_64-apple-darwin= ' '--build=3Di686-apple-darwin'
=A0'--with-ns'= ; 'build_alias=3Di686-apple-darwin'
=A0'host_alias=3Dx86_64-apple-darwin' 'CC=3Dgcc -mmacosx-v= ersion-min=3D10.7
=A0-isystem
=A0/Users/david/Xcode-10.= 7_4.5.2/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SD= Ks/MacOSX10.7.sdk/usr/include/
=A0-F/Users/david/Xcode-10.7_4.5.2/Xcode.app/Contents/Developer/Platfo= rms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks= ''

Important settings:
=A0 value= of $LANG: en_GB.UTF-8
=A0 locale-coding-system: utf-8-unix
=A0 default enable-mult= ibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
=A0 tooltip-mode: = t
=A0 mouse-wheel-mode: t
=A0 tool-bar-mode: t
=A0 m= enu-bar-mode: t
=A0 file-name-shadow-mode: t
=A0 global= -font-lock-mode: t
=A0 font-lock-mode: t
=A0 blink-curs= or-mode: t
=A0 auto-composition-mode: t
=A0 auto-encryption-mode: t
=A0 auto-compression-mode: t
=A0 line-number-mode: t
=
=A0 transient-mark-mode: t

Recent input:
s-x M-x r e p <tab> o r t <tab> <return>

Recent messages:
For information about GNU Emacs and the= GNU system, type C-h C-a.
kill-region: The mark is not set now, = so there is no region
Making completion list...

Load-path shadows:<= /div>
None found.

Features:
(shadow = sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-mode easymenu time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-l= ock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loadde= fs
button faces cus-face macroexp files text-properties overlay s= ha1 md5
base64 format env code-pages mule custom widget hashtable= -print-readable
backquote make-network-process ns multi-tty emacs)

--001a11c37aba4e92d204e43fa9cc-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 18 22:26:18 2013 Received: (at 15126) by debbugs.gnu.org; 19 Aug 2013 02:26:18 +0000 Received: from localhost ([127.0.0.1]:39364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VBFAf-0007CG-PZ for submit@debbugs.gnu.org; Sun, 18 Aug 2013 22:26:18 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:51889) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VBFAb-0007Bu-EE for 15126@debbugs.gnu.org; Sun, 18 Aug 2013 22:26:15 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r7J2Q6c8030642 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Aug 2013 02:26:07 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7J2Q5VH019693 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Aug 2013 02:26:06 GMT Received: from abhmt106.oracle.com (abhmt106.oracle.com [141.146.116.58]) by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7J2Q5dT019688; Mon, 19 Aug 2013 02:26:05 GMT MIME-Version: 1.0 Message-ID: Date: Sun, 18 Aug 2013 19:26:03 -0700 (PDT) From: Drew Adams To: Simon Katz , 15126@debbugs.gnu.org Subject: RE: bug#15126: 24.3; kmacro-end-and-call-macro repeats macro multiple times following isearch-forward References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: -5.1 (-----) X-Debbugs-Envelope-To: 15126 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.1 (-----) > Here's a precise recipe: > =A0 /Applications/Emacs-24-3-1.app/Contents/MacOS/Emacs -Q > =A0 Then at the start of the *scratch* buffer: > =A0 C-s =A0 e r =A0 C-x ( =A0 x x x x =A0 C-s C-s =A0 C-x e > =A0 Emacs makes multiple changes for the =A0C-x e. Confirmed in MS Windows builds. Emacs 23.4 through Emacs 24.2 were OK. Emacs 24.3 introduced the regression. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 19 11:38:56 2013 Received: (at 15126) by debbugs.gnu.org; 19 Aug 2013 15:38:56 +0000 Received: from localhost ([127.0.0.1]:40599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VBRXj-0006b4-Gk for submit@debbugs.gnu.org; Mon, 19 Aug 2013 11:38:56 -0400 Received: from s11.dg.net.uk ([78.143.240.128]:37498) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VBKSD-0008W3-BI for 15126@debbugs.gnu.org; Mon, 19 Aug 2013 04:04:46 -0400 Received: from host86-135-150-255.range86-135.btcentralplus.com ([86.135.150.255]:56601 helo=[172.16.76.129]) by s11.dg.net.uk with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1VBKS6-0008VD-8A; Mon, 19 Aug 2013 09:04:38 +0100 Message-ID: <5211D196.2030403@nomistech.com> Date: Mon, 19 Aug 2013 09:04:38 +0100 From: Simon Katz User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: 15126@debbugs.gnu.org Subject: Re: bug#15126: 24.3; kmacro-end-and-call-macro repeats macro multiple times following isearch-forward Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s11.dg.net.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nomistech.com X-Get-Message-Sender-Via: s11.dg.net.uk: authenticated_id: non-junk+nomistech.com/only user confirmed/virtual account not confirmed X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15126 X-Mailman-Approved-At: Mon, 19 Aug 2013 11:38:54 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (/) Some more detail: /Applications/Emacs-24-3-1.app/Contents/MacOS/Emacs -Q Then at the start of the *scratch* buffer: C-s e r C-x ( x x x x C-s C-s C-x ) F4 F4 This is as it should be -- one at a time. But: /Applications/Emacs-24-3-1.app/Contents/MacOS/Emacs -Q Then at the start of the *scratch* buffer: C-s e r C-x ( x x x x C-s C-s C-x e (The original report -- multiple changes for the line above.) Return to the start of the buffer. F4 Multiple changes are made. So F4 is ok in the first case but not in the second. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 19 19:57:00 2013 Received: (at 15126) by debbugs.gnu.org; 19 Aug 2013 23:57:00 +0000 Received: from localhost ([127.0.0.1]:41314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VBZJj-0006O9-Ch for submit@debbugs.gnu.org; Mon, 19 Aug 2013 19:56:59 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:52471 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VBZJg-0006O0-4V for 15126@debbugs.gnu.org; Mon, 19 Aug 2013 19:56:57 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 5202A258B9E935; Mon, 19 Aug 2013 16:56:54 -0700 (PDT) From: Juri Linkov To: Simon Katz Subject: Re: bug#15126: 24.3; kmacro-end-and-call-macro repeats macro multiple times following isearch-forward Organization: JURTA References: Date: Tue, 20 Aug 2013 02:50:56 +0300 In-Reply-To: (Simon Katz's message of "Sun, 18 Aug 2013 22:39:41 +0100") Message-ID: <8738q5w86b.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15126 Cc: 15126@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (/) > In Emacs 24.2.1 and all previous versions I've used, > kmacro-end-and-call-macro calls the macro once more, and I can go > through the file making changes one at a time, and I can stop when I > want. > > In Emacs 24.3.1, kmacro-end-and-call-macro calls the macro repeatedly > making changes to all the repeated text up to the end of the file. I can't find a change that caused this regression. At least, I see that it is not caused by the fix for bug#4894 that added `store-kbd-macro-event' to `isearch-other-meta-char'. But removing `store-kbd-macro-event' from `isearch-unread' that is called from `isearch-other-meta-char' fixes this bug. Perhaps this is a wrong fix and I don't know how to fix this properly. `isearch-other-meta-char' currently is full of crap that should be rewritten and reduced to a more manageable size. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 24 05:48:27 2013 Received: (at 15126) by debbugs.gnu.org; 24 Aug 2013 09:48:27 +0000 Received: from localhost ([127.0.0.1]:51841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VDASJ-0005LA-9o for submit@debbugs.gnu.org; Sat, 24 Aug 2013 05:48:27 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:42591 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VDASG-0005Ku-Kg for 15126@debbugs.gnu.org; Sat, 24 Aug 2013 05:48:25 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 685B4258B9E936; Sat, 24 Aug 2013 02:48:23 -0700 (PDT) From: Juri Linkov To: Simon Katz Subject: Re: bug#15126: 24.3; kmacro-end-and-call-macro repeats macro multiple times following isearch-forward Organization: JURTA References: Date: Sat, 24 Aug 2013 12:45:01 +0300 In-Reply-To: (Simon Katz's message of "Sun, 18 Aug 2013 22:39:41 +0100") Message-ID: <87mwo7juj6.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15126 Cc: 15126@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (/) > In Emacs 24.2.1 and all previous versions I've used, > kmacro-end-and-call-macro calls the macro once more, and I can go > through the file making changes one at a time, and I can stop when I > want. > > In Emacs 24.3.1, kmacro-end-and-call-macro calls the macro repeatedly > making changes to all the repeated text up to the end of the file. Actually this is an old bug uncovered by another unrelated change. Emacs 24.2.1 stored the key `C-x' in the keyboard macro. Emacs 24.3.1 now stores the whole key sequence `C-x e'. Storing `C-x' had no effect, but also made no sense. It's clear that neither `C-x' nor `C-x e' should be stored. So not storing `C-x e' will not execute the same macro repeatedly. Currently I see only one way to fix this properly: === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-08-08 23:59:14 +0000 +++ lisp/isearch.el 2013-08-24 09:27:30 +0000 @@ -2386,6 +2386,13 @@ (defun isearch-other-meta-char (&optiona (isearch-unread-key-sequence keylist) (setq main-event (car unread-command-events)) + ;; Don't store special commands in the keyboard macro. + (let (overriding-terminal-local-map) + (when (memq (key-binding key) + '(kmacro-start-macro + kmacro-end-macro kmacro-end-and-call-macro)) + (cancel-kbd-macro-events))) + ;; If we got a mouse click event, that event contains the ;; window clicked on. maybe it was read with the buffer ;; it was clicked on. If so, that buffer, not the current one, From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 27 12:08:09 2013 Received: (at 15126-done) by debbugs.gnu.org; 27 Aug 2013 16:08:09 +0000 Received: from localhost ([127.0.0.1]:59378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VELoO-0000wK-U9 for submit@debbugs.gnu.org; Tue, 27 Aug 2013 12:08:09 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:55097 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VELoN-0000wD-14 for 15126-done@debbugs.gnu.org; Tue, 27 Aug 2013 12:08:07 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id AFCA9258B9E935; Tue, 27 Aug 2013 09:08:05 -0700 (PDT) From: Juri Linkov To: Simon Katz Subject: Re: bug#15126: 24.3; kmacro-end-and-call-macro repeats macro multiple times following isearch-forward Organization: JURTA References: <87mwo7juj6.fsf@mail.jurta.org> Date: Tue, 27 Aug 2013 19:06:58 +0300 In-Reply-To: <87mwo7juj6.fsf@mail.jurta.org> (Juri Linkov's message of "Sat, 24 Aug 2013 12:45:01 +0300") Message-ID: <87mwo3m82l.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15126-done Cc: 15126-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (/) >> In Emacs 24.3.1, kmacro-end-and-call-macro calls the macro repeatedly >> making changes to all the repeated text up to the end of the file. > > It's clear that neither `C-x' nor `C-x e' should be stored. > So not storing `C-x e' will not execute the same macro repeatedly. This case is fixed now. Thanks for the bug report. There is another case where instead of `C-x e' typing more verbosely `M-x kmacro-end-and-call-macro RET' will store this sequence in the macro. But it's not a isearch specific problem as it can be reproduced without isearch by the test case: M-x kmacro-start-macro RET x x x x M-x kmacro-end-and-call-macro RET It doesn't stop after the first macro execution because it stores M-x and the command in the macro: Macro: 4*x ;; self-insert-command M-x ;; execute-extended-command kmacro-end-and-call-macro ;; self-insert-command * 25 This is a minor problem since nobody reported it because there are more convenient keys to do the same with `C-x ( x x x x C-x e' (or F3/F4). From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 01 09:10:54 2013 Received: (at 15126-done) by debbugs.gnu.org; 1 Sep 2013 13:10:54 +0000 Received: from localhost ([127.0.0.1]:34544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VG7Qa-0007Pf-F6 for submit@debbugs.gnu.org; Sun, 01 Sep 2013 09:10:53 -0400 Received: from s11.dg.net.uk ([78.143.240.128]:39841) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VG7QW-0007PO-Oz for 15126-done@debbugs.gnu.org; Sun, 01 Sep 2013 09:10:49 -0400 Received: from host86-135-150-255.range86-135.btcentralplus.com ([86.135.150.255]:65137 helo=[172.16.76.129]) by s11.dg.net.uk with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1VG7QO-00011j-BY; Sun, 01 Sep 2013 14:10:40 +0100 Message-ID: <52233CD0.30708@nomistech.com> Date: Sun, 01 Sep 2013 14:10:40 +0100 From: Simon Katz User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#15126: 24.3; kmacro-end-and-call-macro repeats macro multiple times following isearch-forward References: <87mwo7juj6.fsf@mail.jurta.org> <87mwo3m82l.fsf@mail.jurta.org> In-Reply-To: <87mwo3m82l.fsf@mail.jurta.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s11.dg.net.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nomistech.com X-Get-Message-Sender-Via: s11.dg.net.uk: authenticated_id: non-junk+nomistech.com/only user confirmed/virtual account not confirmed X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15126-done Cc: Simon Katz , 15126-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (/) Juri Linkov wrote on 2013-08-27 17:06: >>> In Emacs 24.3.1, kmacro-end-and-call-macro calls the macro repeatedly >>> making changes to all the repeated text up to the end of the file. >> It's clear that neither `C-x' nor `C-x e' should be stored. >> So not storing `C-x e' will not execute the same macro repeatedly. > This case is fixed now. Thanks for the bug report. > > There is another case where instead of `C-x e' > typing more verbosely `M-x kmacro-end-and-call-macro RET' > will store this sequence in the macro. > > But it's not a isearch specific problem as it can be reproduced > without isearch by the test case: > > M-x kmacro-start-macro RET x x x x > M-x kmacro-end-and-call-macro RET > > It doesn't stop after the first macro execution > because it stores M-x and the command in the macro: > > Macro: > 4*x ;; self-insert-command > M-x ;; execute-extended-command > kmacro-end-and-call-macro ;; self-insert-command * 25 > > This is a minor problem since nobody reported it > because there are more convenient keys to do the same > with `C-x ( x x x x C-x e' (or F3/F4). Great, and thanks for the additional info. From unknown Mon Jun 23 06:00:30 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 30 Sep 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator