From unknown Sun Jun 22 11:48:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34248: characters are duplicated when executing a macro defined under input-mode Resent-From: Platon Pronko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Jan 2019 18:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34248 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 34248@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15487860715182 (code B ref -1); Tue, 29 Jan 2019 18:22:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Jan 2019 18:21:11 +0000 Received: from localhost ([127.0.0.1]:50810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goY0V-0001LW-53 for submit@debbugs.gnu.org; Tue, 29 Jan 2019 13:21:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goXzf-0001Ji-Ul for submit@debbugs.gnu.org; Tue, 29 Jan 2019 13:20:20 -0500 Received: from lists.gnu.org ([209.51.188.17]:52187) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1goXza-0002Qv-DD for submit@debbugs.gnu.org; Tue, 29 Jan 2019 13:20:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goXzZ-0002tC-5Y for bug-gnu-emacs@gnu.org; Tue, 29 Jan 2019 13:20:14 -0500 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 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goXzY-0002QF-5w for bug-gnu-emacs@gnu.org; Tue, 29 Jan 2019 13:20:13 -0500 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]:35586) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1goXzX-0002PP-3k for bug-gnu-emacs@gnu.org; Tue, 29 Jan 2019 13:20:11 -0500 Received: by mail-lj1-x241.google.com with SMTP id x85-v6so18387801ljb.2 for ; Tue, 29 Jan 2019 10:20:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=vSgYAzPsv+DOiyVjnICLaOyrRvYAZQWVBDjqxavgSHI=; b=gOWV1q6yaM9m9Uw+obGQ08FqB+/tE1tDJBb7hDDi/swYbxC+maKrxpN9RQudQ3HQ4K QqZTMxt4GwuBSOCr0DBhMho/509oxEZOpjjiCH6KFX9+RmaNeDY93f6YI0A5MLqTnB8x Swlqgsp+XwTy9EUlUxCYI3lDwQXrFtts/E9jJGZF3r0egwJd+2JwFX6Np5910+zA1u07 RYvwvnjUyOaEAA+qT0+HGAOrvNdMET+Okyq4RU/VYXGiCJjMeaIPjit7d4ST1PzgjgOS JQlyOLB3s4iZORMMB6OuiwckKSfWgCIiqN97jgznQ7QKynTwfM4bfx1HWInHQWuQOD2Z EgfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=vSgYAzPsv+DOiyVjnICLaOyrRvYAZQWVBDjqxavgSHI=; b=gwWF3E/UJiHren8pLkgBeCNcK51yFS5kdjWVX1MAMuEqUWZ3Ib6QE9yia2tqMkgul5 DD3cbyWCbr0wNw2K7nFVUoIQmDorx/rKyUnfnjRiqEXWjHaawIegewqUKIdcelNB7+1z STH89eeJWWVLSGwAfmMkFHjdi0/dlXXg4IuRgibTjR1NvUpSVHhfd2sRaxxnxbq5erLF hICbS5nhCXFAGZzLefBHpEP6Hwm+9CdVQOC3yA42Wjt/EtY1YgFfZfpQqcbrYG6MtRBK 2/k4oW1RxFd3kXbySibW3lIa+Zs49ylP42p7HS07r8V2396Ewpjs10kznZ2Cfu35NMpL I8Lw== X-Gm-Message-State: AJcUukdl0ZZiZqojlRxRYM2hc8427VPHDXHZNAAxITaoCkuj7TOQ15rF auFPf2H185DzwmlidcNXb40oU+MT X-Google-Smtp-Source: ALg8bN69/2zDF7tHI4FSyFcM+sOT3VYgQpEgJce5iGJVSsHN6A18UMpWU/uw17QHq0iOvwrk2cAJdQ== X-Received: by 2002:a2e:a0d5:: with SMTP id f21-v6mr21746499ljm.98.1548786008301; Tue, 29 Jan 2019 10:20:08 -0800 (PST) Received: from [192.168.1.65] ([109.252.80.121]) by smtp.gmail.com with ESMTPSA id t22sm3806679lfb.0.2019.01.29.10.20.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 10:20:07 -0800 (PST) From: Platon Pronko Message-ID: Date: Tue, 29 Jan 2019 21:20:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::241 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.0 (+) X-Mailman-Approved-At: Tue, 29 Jan 2019 13:21:09 -0500 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.0 (/) Hi! I started emacs using: emacs -Q test.txt where `test.txt` is an empty file. Then I performed the following actions: M-: (activate-input-method "english-dvorak") ;; activating the input method C-x C-( ;; starting a macro definition a ;; typing a single character C-x C-) ;; finishing a macro definition C-X C-e ;; executing a macro I expected to see two characters ("aa") in the buffer - one that was typed during the definition of the macro, and one that was inserted during execution of the macro. Instead, I see three characters: "aaa" - two characters are inserted instead of one when macro executes. I tried several other input modes, the result is the same. Each typed character is repeated twice - so for example "asdf" becomes "aassddff". And when I show macro contents using C-x C-k C-e, the following is displayed: aa ;; self-insert-command * 2 System details below: In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-07-05 built on juergen System Description: Arch Linux Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2 Important settings: value of $LC_TIME: en_SE.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Text Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-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 auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils term/xterm xterm time-date elec-pair mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 99987 7711) (symbols 48 20455 1) (miscs 40 42 93) (strings 32 28579 1088) (string-bytes 1 744526) (vectors 16 12682) (vector-slots 8 451739 6126) (floats 8 53 297) (intervals 56 208 0) (buffers 992 12)) From unknown Sun Jun 22 11:48:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34248: characters are duplicated when executing a macro defined under input-mode Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Jan 2019 18:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34248 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Platon Pronko Cc: 34248@debbugs.gnu.org Received: via spool by 34248-submit@debbugs.gnu.org id=B34248.15487873307071 (code B ref 34248); Tue, 29 Jan 2019 18:43:01 +0000 Received: (at 34248) by debbugs.gnu.org; 29 Jan 2019 18:42:10 +0000 Received: from localhost ([127.0.0.1]:50825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goYKo-0001py-Ay for submit@debbugs.gnu.org; Tue, 29 Jan 2019 13:42:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goYKn-0001pn-37 for 34248@debbugs.gnu.org; Tue, 29 Jan 2019 13:42:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goYKg-00061G-Hd; Tue, 29 Jan 2019 13:42:03 -0500 Received: from [176.228.60.248] (port=1453 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1goYKg-00077Z-44; Tue, 29 Jan 2019 13:42:02 -0500 Date: Tue, 29 Jan 2019 20:41:51 +0200 Message-Id: <838sz32tn4.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Platon Pronko on Tue, 29 Jan 2019 21:20:06 +0300) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.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: -1.0 (-) > From: Platon Pronko > Date: Tue, 29 Jan 2019 21:20:06 +0300 > > emacs -Q test.txt > > where `test.txt` is an empty file. Then I performed the following actions: > > M-: (activate-input-method "english-dvorak") ;; activating the input method > C-x C-( ;; starting a macro definition > a ;; typing a single character > C-x C-) ;; finishing a macro definition > C-X C-e ;; executing a macro > > I expected to see two characters ("aa") in the buffer - one that was typed during the definition of the macro, and one that was inserted during execution of the macro. > > Instead, I see three characters: "aaa" - two characters are inserted instead of one when macro executes. > > I tried several other input modes, the result is the same. Each typed character is repeated twice - so for example "asdf" becomes "aassddff". And when I show macro contents using C-x C-k C-e, the following is displayed: > > aa ;; self-insert-command * 2 > > > System details below: > > In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) > of 2018-07-05 built on juergen > System Description: Arch Linux Thanks, this is bug #32108, which is already fixed on the master branch of the Emacs Git repository. The fix will be included in Emacs 27, when that is released. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 29 13:52:19 2019 Received: (at control) by debbugs.gnu.org; 29 Jan 2019 18:52:19 +0000 Received: from localhost ([127.0.0.1]:50833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goYUc-00024z-O9 for submit@debbugs.gnu.org; Tue, 29 Jan 2019 13:52:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goYUb-00024k-DW for control@debbugs.gnu.org; Tue, 29 Jan 2019 13:52:17 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goYUP-0002s7-G2 for control@debbugs.gnu.org; Tue, 29 Jan 2019 13:52:07 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1goYUO-0007zm-Cs for control@debbugs.gnu.org; Tue, 29 Jan 2019 13:52:05 -0500 Subject: control message for bug 34248 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Tue, 29 Jan 2019 13:52:04 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.0 (/) 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: -1.0 (-) # 03e3440 unarchive 32108 fixed 34248 27.1 forcemerge 32108 34248