From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#25860: 25.1; Double macro execution Date: Sun, 26 Feb 2017 02:12:33 -0500 Message-ID: <87y3wte87y.fsf@users.sourceforge.net> References: <87zihbbrxr.fsf@linux-m68k.org> <8737f14k68.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1488093134 28539 195.159.176.226 (26 Feb 2017 07:12:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Feb 2017 07:12:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: 25860@debbugs.gnu.org, eggert@cs.ucla.edu, jwiegley@gmail.com, Marek Twardochlib , Andreas Schwab To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 26 08:12:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cht01-0006dG-Bx for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Feb 2017 08:12:05 +0100 Original-Received: from localhost ([::1]:45573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cht07-0006WD-Be for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Feb 2017 02:12:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cht01-0006Q1-QH for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2017 02:12:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chszx-0004Fm-Pn for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2017 02:12:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58002) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1chszx-0004Fg-NF for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2017 02:12:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1chszx-0002mT-IV for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2017 02:12:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Feb 2017 07:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25860 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25860-submit@debbugs.gnu.org id=B25860.148809309110652 (code B ref 25860); Sun, 26 Feb 2017 07:12:01 +0000 Original-Received: (at 25860) by debbugs.gnu.org; 26 Feb 2017 07:11:31 +0000 Original-Received: from localhost ([127.0.0.1]:56201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chszS-0002le-0E for submit@debbugs.gnu.org; Sun, 26 Feb 2017 02:11:30 -0500 Original-Received: from mail-it0-f67.google.com ([209.85.214.67]:35681) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chszP-0002lL-On; Sun, 26 Feb 2017 02:11:28 -0500 Original-Received: by mail-it0-f67.google.com with SMTP id 203so8438815ith.2; Sat, 25 Feb 2017 23:11:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=8+yjXN98lMeAchOzIj+Acgc91kJih6cmdHrq14PhFBY=; b=nhwwupeg2PeE5nrDFctAfsjmhS6TdvCZ8/AE8Gb5N6+IsWrqpVFJwVEY2/lILVHN5C Pje0JXK2Gq1g2Q/mrAbWmrOLIhw180AekYZIr4Ec1860Aa5kQ1aZPJyC6vC7+ILpooBk geeawf+mQpj2uGxFzEDfPw5d7UpygRUmpM5p0eIVZGRN9KnvEGk51uCsaJRrE8EmewNx x3Yyna99WuoI6qdkeQxHPwRni1JSaq2D00nCcM2uH1X6TRAdVdX4vx8py0pZQhh0KoSX dsN/ghya2JJTolAsqYylZBZJOOFKH4v/SQ1/lRNSfotkxL9VmFFAEszDoAMy8LFL1Ptz WLAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=8+yjXN98lMeAchOzIj+Acgc91kJih6cmdHrq14PhFBY=; b=cl/j+l/MtUONsMBDeaLUTlzJn/FPLVrIAXTxWEVKRslVbo8espinyRUMcH0f132/du /TILPxwKe7XMhc9XIOVJJUuFBI1Q/aXiwxXIurSVOJSwrTUqx5gKKXYf8NB7/PfayF47 p5wsJxrzIqWIDpGztHjie/q+Kmsg0y4rXLOqKvlk3UQvitBKoNwtyu9e8tPhL2NC0x+I qFPYmwCfmIqyxeg+/XLbUP+FfYIiTQDRA9ILej70cxOBkIYVzx90g5bm92W6dbz4CP7H aGIlUEL4Usvxu5wJe//mEm7SX7dSyK3kgy0v9aOrOsLu3s4kAELfZIqqPN6/IQEQkpfr BPxQ== X-Gm-Message-State: AMke39mXMGSJELncFLvJNIgw2iNTtZtprDhmZg+wj8WokgqO9vPC1d1Shih+YDrTxH3Gmw== X-Received: by 10.36.84.195 with SMTP id t186mr9897274ita.41.1488093082063; Sat, 25 Feb 2017 23:11:22 -0800 (PST) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id s97sm5302560ioi.57.2017.02.25.23.11.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Feb 2017 23:11:21 -0800 (PST) In-Reply-To: <8737f14k68.fsf@gmail.com> (Tino Calancha's message of "Sun, 26 Feb 2017 14:04:31 +0900") 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:129811 Archived-At: tags 25860 confirmed quit Tino Calancha writes: > Thank you for the additional information. > You are right. This is a regression introduced in Emacs 25.1. > > I] Not observed with Emacs-24.5. > II] I reproduce the issue with Emacs-25.1. > *) I see the issue with Emacs-25.1 even after loading kmacro.el > from Emacs-24.5. That seems to point to changes in the > C source code; maybe some changes in src/macro.c? > > I am having some difficulties to do a bisect to track down > changes in macro.c. Maybe someone can do it much faster and find > the commit causing this issue. I traced the execution in gdb, the code removed in the following diff seems to be the culprit: --- i/src/keyboard.c +++ w/src/keyboard.c @@ -3029,14 +3029,6 @@ read_char (int commandflag, Lisp_Object map, Vunread_post_input_method_events = nconc2 (XCDR (tem), Vunread_post_input_method_events); } - /* When we consume events from the various unread-*-events lists, we - bypass the code that records input, so record these events now if - they were not recorded already. */ - if (!recorded) - { - record_char (c); - recorded = true; - } reread_first: This was added in [1: 30a6b1f814]. Obviously just removing it will reintroduce the bug it fixed, I'm not sure what the proper fix should be. 1: 2015-08-10 21:15:03 +0300 30a6b1f81412044aa7dda5573b0142a0a03c4fd3 Fix recording of events pushed onto unread-command-events Slightly simpler reproduction: evaluate (defun insert-a () (interactive) (execute-kbd-macro "a" 1)) (define-key global-map [f12] 'insert-a) then f3 f12 f4 C-x e