From unknown Wed Jun 18 23:14:59 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#45292 <45292@debbugs.gnu.org> To: bug#45292 <45292@debbugs.gnu.org> Subject: Status: 28.0.50; first key typed ignores current input method (in magit commit buffer) Reply-To: bug#45292 <45292@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:14:59 +0000 retitle 45292 28.0.50; first key typed ignores current input method (in mag= it commit buffer) reassign 45292 emacs submitter 45292 Platon Pronko severity 45292 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 17 07:52:56 2020 Received: (at submit) by debbugs.gnu.org; 17 Dec 2020 12:52:56 +0000 Received: from localhost ([127.0.0.1]:35019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kpsm7-0001ER-PP for submit@debbugs.gnu.org; Thu, 17 Dec 2020 07:52:56 -0500 Received: from lists.gnu.org ([209.51.188.17]:43084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kpsm0-0001EC-3Y for submit@debbugs.gnu.org; Thu, 17 Dec 2020 07:52:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpslz-0003CN-Hq for bug-gnu-emacs@gnu.org; Thu, 17 Dec 2020 07:52:47 -0500 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:43792) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kpslx-0006hW-3A for bug-gnu-emacs@gnu.org; Thu, 17 Dec 2020 07:52:47 -0500 Received: by mail-lf1-x131.google.com with SMTP id 23so57032235lfg.10 for ; Thu, 17 Dec 2020 04:52:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=ggv/K2Ne16uhSaN5MX8EoM+TuW9Lb2m9BkfulQzCsi8=; b=rAvI5rPd8p8znjmWvY7/uFrrQ3KG1eTeLSGWXisozPoIiSlNiYEQF4SMxDZuu3qmn1 Uic8313PRWsI/BUKLy2E009BkMtr8zdqBthejSbEN1lbziMjCKhnUUzjj2oAudu49d4n SFdLp+OMhpcnicpfgvY90sIvkE9/sIylgR8RMHy4sUMmpkN/Wrx2locmWZOwsfGup4YX dHC28IMRRO9S1Ho4e2aWaP+OMSWht/ff+o7ttZZiQiEjzXZoP5UZ4OS0LzbMg1TasD/P yK9A5dj/GEXTVGt/Yx5Yg0bXYb4kExKhpBFz8BaWRjbXQ48OfG6jEa5ktOXN28CIsvYN PfKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=ggv/K2Ne16uhSaN5MX8EoM+TuW9Lb2m9BkfulQzCsi8=; b=oFNTNSyITImzFcSv60R/0S18pXbTFYdmlpLMbM9grHHbwaPqY2sN4iH0cfm5wOfT5g d9m8rg/LBefAExZoxQSGI658VShprb2ziQRiw3AXulfpmx+o/beZwjmEGa+vf2xCuTxQ 0RoWB9oQoh+7VCeHJhgqtYXrKqMY5LrRlZPA8j4oWGYo5nGMUxMmmiHiFb/VWAf+3ABG sW5pneo/5aQjgI5Ph1CCC0dckd1P3hMW64zT3xAgYx+gohvleA+VPsPYeKkgxaY4FkAl If1vk1EqAZ05JiLcAfZxauopp5CpelRNZDNy7Kl7M2Y234BKckifJhS/MCwGRQe4sDZo hq/A== X-Gm-Message-State: AOAM532P9/VuN7RJS2vuMMvFfYepsJPnajy4KnQV85GnPVmGWs28f706 Iwx8t7bYJMgnCYMYsMu33FB/EN6QdZE= X-Google-Smtp-Source: ABdhPJz8jU/9Xr6tjMQVGRvGovwZkLSQiBqgo4dK6WlMwNXjzYmBz6TnvjQWIlYcPeSqvTwqCpSMbg== X-Received: by 2002:ac2:41ce:: with SMTP id d14mr14537386lfi.114.1608209562714; Thu, 17 Dec 2020 04:52:42 -0800 (PST) Received: from [192.168.1.67] (109-252-80-233.nat.spd-mgts.ru. [109.252.80.233]) by smtp.gmail.com with ESMTPSA id y20sm662663lji.86.2020.12.17.04.52.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Dec 2020 04:52:41 -0800 (PST) To: bug-gnu-emacs@gnu.org From: Platon Pronko Subject: 28.0.50; first key typed ignores current input method (in magit commit buffer) Message-ID: <86c3d4fc-7a3e-19a6-00c9-163b5f772247@gmail.com> Date: Thu, 17 Dec 2020 15:52:41 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=platon7pronko@gmail.com; helo=mail-lf1-x131.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: monnier@iro.umontreal.ca 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: -2.3 (--) Minimal init.el for problem reproduction: (define-minor-mode dvorak-minor-mode "Use english-dvorak input method." :lighter nil (if dvorak-minor-mode (activate-input-method "english-dvorak"))) (define-global-minor-mode global-dvorak-mode dvorak-minor-mode dvorak-minor-mode) (global-dvorak-mode t) (require 'magit) (global-set-key (kbd "C-x g") 'magit-status) I do not know how to make elpa packages load under -Q, unfortunately. Steps to reproduce: 1. Set up a git repository with a staged change (mkdir test-repo; cd test-repo; git init; touch a; git add a); 2. Launch emacs (GUI) in this directory; 3. Type "C-x g" (or execute magit-status); 4. Type "c c" to open commit buffer; 5. Type "j j" (or any two characters that are different between english and english-dvorak input methods); 6. Observe that inserted characters are different - first one uses the default input method ("j") and second one uses the configured one ("h"). I bisected the problem and found that it was introduced in commit adbb4eacc (on 2020-12-12, by Stefan Monnier). I'll try looking into the cause now, but will appreciate any pointers (it seems to be touching keyboard.c, and I remember it to be very complex). In GNU Emacs 28.0.50 (build 14, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.17.4) of 2020-12-17 built on the-big-maker Repository revision: adbb4eacc2a984c0fc0b65ec761368fd9067d6c5 Repository branch: HEAD Windowing system distributor 'The X.Org Foundation', version 11.0.12010000 System Description: Arch Linux Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-sound=alsa --with-modules --without-gconf --without-gsettings --with-x-toolkit=gtk3 --without-xaw3d' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER 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: SQL[ANSI] Minor modes in effect: magit-auto-revert-mode: t auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t shell-dirtrack-mode: t global-dvorak-mode: t dvorak-minor-mode: t 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 blink-cursor-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: /home/platon/.emacs.d/elpa/lispy-20201109.1728/elpa hides /home/platon/.emacs.d/elpa/ivy-20201214.2049/elpa /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-ns hides /usr/share/emacs/site-lisp/cider-ns /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-classpath hides /usr/share/emacs/site-lisp/cider-classpath /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-stacktrace hides /usr/share/emacs/site-lisp/cider-stacktrace /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-clojuredocs hides /usr/share/emacs/site-lisp/cider-clojuredocs /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-doc hides /usr/share/emacs/site-lisp/cider-doc /home/platon/.emacs.d/elpa/cider-20201210.1748/cider hides /usr/share/emacs/site-lisp/cider /home/platon/.emacs.d/elpa/parseclj-20201012.712/parseclj-ast hides /usr/share/emacs/site-lisp/parseclj-ast /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-connection hides /usr/share/emacs/site-lisp/cider-connection /home/platon/.emacs.d/elpa/cider-20201210.1748/nrepl-client hides /usr/share/emacs/site-lisp/nrepl-client /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-popup hides /usr/share/emacs/site-lisp/cider-popup /home/platon/.emacs.d/elpa/parseedn-20200419.1124/parseedn hides /usr/share/emacs/site-lisp/parseedn /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-cheatsheet hides /usr/share/emacs/site-lisp/cider-cheatsheet /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-debug hides /usr/share/emacs/site-lisp/cider-debug /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-completion hides /usr/share/emacs/site-lisp/cider-completion /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-eval hides /usr/share/emacs/site-lisp/cider-eval /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-repl hides /usr/share/emacs/site-lisp/cider-repl /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-inspector hides /usr/share/emacs/site-lisp/cider-inspector /home/platon/.emacs.d/elpa/parseclj-20201012.712/parseclj hides /usr/share/emacs/site-lisp/parseclj /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-util hides /usr/share/emacs/site-lisp/cider-util /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-eldoc hides /usr/share/emacs/site-lisp/cider-eldoc /home/platon/.emacs.d/elpa/parseclj-20201012.712/parseclj-parser hides /usr/share/emacs/site-lisp/parseclj-parser /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-browse-ns hides /usr/share/emacs/site-lisp/cider-browse-ns /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-macroexpansion hides /usr/share/emacs/site-lisp/cider-macroexpansion /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-resolve hides /usr/share/emacs/site-lisp/cider-resolve /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-compat hides /usr/share/emacs/site-lisp/cider-compat /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-format hides /usr/share/emacs/site-lisp/cider-format /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-common hides /usr/share/emacs/site-lisp/cider-common /home/platon/.emacs.d/elpa/a-20201203.1927/a hides /usr/share/emacs/site-lisp/a /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-profile hides /usr/share/emacs/site-lisp/cider-profile /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-selector hides /usr/share/emacs/site-lisp/cider-selector /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-client hides /usr/share/emacs/site-lisp/cider-client /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-scratch hides /usr/share/emacs/site-lisp/cider-scratch /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-repl-history hides /usr/share/emacs/site-lisp/cider-repl-history /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-find hides /usr/share/emacs/site-lisp/cider-find /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-test hides /usr/share/emacs/site-lisp/cider-test /home/platon/.emacs.d/elpa/cider-20201210.1748/nrepl-dict hides /usr/share/emacs/site-lisp/nrepl-dict /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-overlays hides /usr/share/emacs/site-lisp/cider-overlays /home/platon/.emacs.d/elpa/protobuf-mode-20200619.1742/protobuf-mode hides /usr/share/emacs/site-lisp/protobuf-mode /home/platon/.emacs.d/elpa/parseclj-20201012.712/parseclj-lex hides /usr/share/emacs/site-lisp/parseclj-lex /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-mode hides /usr/share/emacs/site-lisp/cider-mode /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-xref hides /usr/share/emacs/site-lisp/cider-xref /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-apropos hides /usr/share/emacs/site-lisp/cider-apropos /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-browse-spec hides /usr/share/emacs/site-lisp/cider-browse-spec /home/platon/.emacs.d/elpa/cider-20201210.1748/cider-tracing hides /usr/share/emacs/site-lisp/cider-tracing /home/platon/.emacs.d/elpa/clojure-mode-20201126.1558/clojure-mode hides /usr/share/emacs/site-lisp/clojure-mode /home/platon/.emacs.d/elpa/epl-20180205.2049/epl hides /usr/share/emacs/site-lisp/epl/epl /home/platon/.emacs.d/elpa/pkg-info-20150517.1143/pkg-info hides /usr/share/emacs/site-lisp/pkg-info/pkg-info /home/platon/.emacs.d/elpa/queue-0.2/queue hides /usr/share/emacs/site-lisp/queue/queue /home/platon/.emacs.d/elpa/sesman-20190909.1754/sesman-browser hides /usr/share/emacs/site-lisp/sesman/sesman-browser /home/platon/.emacs.d/elpa/sesman-20190909.1754/sesman hides /usr/share/emacs/site-lisp/sesman/sesman /home/platon/.emacs.d/elpa/spinner-1.7.3/spinner hides /usr/share/emacs/site-lisp/spinner/spinner /home/platon/.emacs.d/elpa/less-css-mode-20161001.453/less-css-mode hides /home/platon/sync/sources/emacs/lisp/textmodes/less-css-mode Features: (shadow sort mail-extr emacsbug sendmail vc-git sql view thingatpt edmacro kmacro magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff diff-mode magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode git-commit transient format-spec magit-git magit-section magit-utils crm log-edit message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor cl-extra async-bytecomp advice async shell pcomplete comint ansi-color ring server dash quail help-mode easy-mmode info package easymenu browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl 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 tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer 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 cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 142677 11960) (symbols 48 14644 1) (strings 32 51220 3154) (string-bytes 1 1720184) (vectors 16 28209) (vector-slots 8 323827 18562) (floats 8 68 156) (intervals 56 377 0) (buffers 984 14)) From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 17 08:46:04 2020 Received: (at 45292) by debbugs.gnu.org; 17 Dec 2020 13:46:04 +0000 Received: from localhost ([127.0.0.1]:35093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kptbY-0002cL-HE for submit@debbugs.gnu.org; Thu, 17 Dec 2020 08:46:04 -0500 Received: from mail-lf1-f53.google.com ([209.85.167.53]:41133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kptbV-0002bZ-H0 for 45292@debbugs.gnu.org; Thu, 17 Dec 2020 08:46:03 -0500 Received: by mail-lf1-f53.google.com with SMTP id s26so22774372lfc.8 for <45292@debbugs.gnu.org>; Thu, 17 Dec 2020 05:46:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=UJz5UzdKSfoPkW+Q3NzZ+vWCaqGTTs64GZDtCNvJuAU=; b=G89plVsm8vYSGcRmo8ylzDkBgoGM6kd94wQabIQx7nPVt2rHwOQHC+JXyo+vQK1V6L FSOpDXLP1jR+a3NQMnHmCn7zmlUOSxcKeOzUGZ+23n4x6OjDo67yztdpY4sEmnaYqNar 6sGfK0vNA6w8wXqqjD+dbHKMOlkk7HJtV2hMdm/+m5bKzfzt389rv0gpKut6d0QM8Rju siQjt+iuQGCiPJiZV/IuqWQYPS3/2c4RVy2nEHNauGCI48Hyo/MRXtB4CP/cV/YPAEe5 uqlaWVRl/zhcyzDLIO2mLUSoCc9CUBBZ+wPy2vbiP4DExyXuLivJGMFOtfWa7NVx0OAq oNKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UJz5UzdKSfoPkW+Q3NzZ+vWCaqGTTs64GZDtCNvJuAU=; b=BGC5IIFdRwgKVkCeO0Szs24SIgLGAQioVsVobYgLvIPA50Q6Mi3v78y9MuBKtCgZkL 93Gk2bYB0iFqdVjGLHp6XAhQk3J2X6aymwG5Glv6V9KTdsE0KA9QuuQWv/Dbo2aWYZ6t jyp3dwReTGselgeqdXcCy8hVvWViIK5DB3POcFyBI080nR21NnN0VDnv4AqEccidCI8E WaC8iWtUvxBeLwjzVkDYtGPJ5drnjGwI0v9U+lpV5r9VoVHMeK1mmKV47fL6ktf0PhJA OnU0L7UGxWIGRqde/JmQWqtL2TQOrTSd7yOVUW4C5+PWpZyOI47Kt0PVvS7K67IOAMzN B0Yg== X-Gm-Message-State: AOAM533r/pWSzuI3qVNH2FALXY1yTVqTjc5URetzNh2ForJe4cL8cG9g lweVtl5JqwvrdoVqecZpY7B+D77fNsI= X-Google-Smtp-Source: ABdhPJyxhTe/T1iUZBd+/KG58xr6KCC+NwY3BwU5Jtg1hUETUtA5MR6qamO2djLTD0IW1pjDA3p9uQ== X-Received: by 2002:a2e:b548:: with SMTP id a8mr16415007ljn.83.1608212754897; Thu, 17 Dec 2020 05:45:54 -0800 (PST) Received: from [192.168.1.67] (109-252-80-233.nat.spd-mgts.ru. [109.252.80.233]) by smtp.gmail.com with ESMTPSA id v14sm604384lfe.270.2020.12.17.05.45.54 for <45292@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Dec 2020 05:45:54 -0800 (PST) Subject: Re: bug#45292: Acknowledgement (28.0.50; first key typed ignores current input method (in magit commit buffer)) To: 45292@debbugs.gnu.org References: <86c3d4fc-7a3e-19a6-00c9-163b5f772247@gmail.com> From: Platon Pronko Message-ID: Date: Thu, 17 Dec 2020 16:45:53 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 45292 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 (-) Seems that removal of record_asynch_buffer_change() at the end of read_and_dispose_of_process_output() causes the issue. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 17 11:32:09 2020 Received: (at 45292) by debbugs.gnu.org; 17 Dec 2020 16:32:09 +0000 Received: from localhost ([127.0.0.1]:36788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kpwCH-0007Iy-8Z for submit@debbugs.gnu.org; Thu, 17 Dec 2020 11:32:09 -0500 Received: from mail-lf1-f47.google.com ([209.85.167.47]:37471) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kpwCC-0007IH-HR for 45292@debbugs.gnu.org; Thu, 17 Dec 2020 11:32:07 -0500 Received: by mail-lf1-f47.google.com with SMTP id o17so55978738lfg.4 for <45292@debbugs.gnu.org>; Thu, 17 Dec 2020 08:32:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=2MMgwjrdmIc+8w7qdvvsgiBvPWOh8lQ6tP0Ofht+q8Q=; b=mA4cz1WqMMPsHvbQgy5ble2zvp4YwKIo/S83VNCLMiqBAEkmwbMKFPDMbRrC0gDW9J jCc8TE9bJf6/k3s8TdC/ikU5yfR2+EWns7kMQowPWWg4hcHXtLPeysRZl4q1hGxNyKRp bw+jymsOJ0sv154GEOxFuHlqtU02XcYXtLUDAgHgeOx932mrnIbtt0iYjOCxDi5w5zd7 jSk17MAX5IIUfUgiRXspfreSZX3Vjcsm1OJjvgfauqsts6xV5kjQwjOhvMB5WfiRUYox x4YWO06c0WRaNq4qURxWeFYkRxwAAZWepoesQMe1aOUho2aaCaebq/MlUeMjSDix3GET qTTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2MMgwjrdmIc+8w7qdvvsgiBvPWOh8lQ6tP0Ofht+q8Q=; b=qfC0pmI394qA3BszBN0YUjQzysD6nMJvUf0qlaDtDM1MKu3Br4amQvN/YpD2Ew12O1 btiaaB0aVkCfGBoWnGLJxw0sxFUbAdklga/OKMRd6/m+yx2rS8Ck03JSZHHMr0aezA6g lkcWgpYgjS7XG5Y15Rq5pOT+VPNCGyvvHwZm4BFMQ1EaIIm4Y3s7XFpB/DMxjh679QIE QMuRTSYJUJ3Mwsbwk/ddOLleR+OOwWiQ7UyLnNPwKKnOUYD1nn/HW16DylJBtwc/FhQX qp6zcB35VjRsWbow6CTAr+sNvES9vlexIsrLLYirDBijFl5Ju6Fa0INHVjZM+Ftyz1vh hn5w== X-Gm-Message-State: AOAM530Torkjur/okNnRCilNT90ANrstPdVuLYj2Y0I54FUbu1xios56 tcHUnHDkbEAzdJhcBrSCVKLH6DqNoMk= X-Google-Smtp-Source: ABdhPJz1H6MX2H4GijOqNAPdGWkk8/wrq4ZxHrUBNJ0WhxnRGEtsexTpm9l1RJZL5CUxQEostVrMQQ== X-Received: by 2002:a2e:7813:: with SMTP id t19mr48002ljc.87.1608222718124; Thu, 17 Dec 2020 08:31:58 -0800 (PST) Received: from [192.168.1.67] (109-252-80-233.nat.spd-mgts.ru. [109.252.80.233]) by smtp.gmail.com with ESMTPSA id o12sm709632ljp.123.2020.12.17.08.31.57 for <45292@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Dec 2020 08:31:57 -0800 (PST) Subject: Re: bug#45292: Acknowledgement (28.0.50; first key typed ignores current input method (in magit commit buffer)) From: Platon Pronko To: 45292@debbugs.gnu.org References: <86c3d4fc-7a3e-19a6-00c9-163b5f772247@gmail.com> Message-ID: <1f8c0245-61bc-6546-e776-f5ccf8ffa855@gmail.com> Date: Thu, 17 Dec 2020 19:31:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 45292 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 (-) Digged into it further. Here's what I found: 1. quail-input-method is used to translate keys according current keymap. 2. At the time of the first keystroke ("j" in my example) quail-input-method sees incorrect buffer (verified this by calling and printing buffer-name from inside quail-input-method). It sees "magit: test-repo" on the first keystroke, and "COMMIT_EDITMSG" on subsequent keystrokes. And since "magit: test-repo" is read-only, no translation is done and key is returned as-is. 3. So apparently record_asynch_buffer_change() was crucial to update the current buffer. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 23 18:32:32 2020 Received: (at 45292) by debbugs.gnu.org; 23 Dec 2020 23:32:33 +0000 Received: from localhost ([127.0.0.1]:54382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ksDcO-0007Jd-Jd for submit@debbugs.gnu.org; Wed, 23 Dec 2020 18:32:32 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:16551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ksDcK-0007D4-Lx for 45292@debbugs.gnu.org; Wed, 23 Dec 2020 18:32:32 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 269EE441376; Wed, 23 Dec 2020 18:32:23 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 9AC3F44062A; Wed, 23 Dec 2020 18:32:21 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1608766341; bh=oc7zse55wZXdcXFOtyA72pZI+uhNNSv4N/Sl4c/KP6g=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=jIah8V8YESjDrW7m8rqgS8Nr1p4lBD3OwOB2oAe5aho4m4eynlpOtGg6tSikuCTfs WilzlakWRPjyaQw58wMzj5bYvmeIexGcyb/IoYsU5h4eusXkF9sjwLyIXZRRY8QzP0 QaPzB9fRhuTiefZumS8A7xAuvDWchGwq+iKmMKb+OriF8ZDoqX+LpEJIj2n1hb8VRi A1ooSueFfXS1u4yGpvmv6CKa/ZR1DmIzbBxSfq+d5Ugt/wPsfNwacMY9/ffUjlxJXN MbYvDjYvK/fEnVgzxvtuVAhDmhriAzBBNE72eAxSgUFZlZu9N4E4QHwq32z5cml3TB RgpBuhJNKuqAQ== Received: from alfajor (69-165-136-52.dsl.teksavvy.com [69.165.136.52]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 64B82120314; Wed, 23 Dec 2020 18:32:21 -0500 (EST) From: Stefan Monnier To: Platon Pronko Subject: Re: bug#45292: Acknowledgement (28.0.50; first key typed ignores current input method (in magit commit buffer)) Message-ID: References: <86c3d4fc-7a3e-19a6-00c9-163b5f772247@gmail.com> <1f8c0245-61bc-6546-e776-f5ccf8ffa855@gmail.com> Date: Wed, 23 Dec 2020 18:32:20 -0500 In-Reply-To: <1f8c0245-61bc-6546-e776-f5ccf8ffa855@gmail.com> (Platon Pronko's message of "Thu, 17 Dec 2020 19:31:57 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.080 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45292 Cc: 45292@debbugs.gnu.org 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: -3.3 (---) > Digged into it further. Here's what I found: > > 1. quail-input-method is used to translate keys according current keymap. > > 2. At the time of the first keystroke ("j" in my example) quail-input-method > sees incorrect buffer (verified this by calling and printing buffer-name > from inside quail-input-method). It sees "magit: test-repo" on the first > keystroke, and "COMMIT_EDITMSG" on subsequent keystrokes. And since "magit: > test-repo" is read-only, no translation is done and key is returned as-is. > > 3. So apparently record_asynch_buffer_change() was crucial to update the current buffer. Here's what's happening: 1- after hitting `c c`, Magit launches `git` in the background 2- at this point we're entering `read_char` and the current buffer is the Magit buffer. 3- soon after, git launches the editor, which Magit has set to emacsclient 4- emacsclient contacts us 5- while still in `read_char` is waiting in `sit_for`, we process emacsclient which sets up the git-commit buffer, displays it and select it as the main window. 6- `sit_for` carefully preserves the current buffer so after step 5, we're still in the Magit buffer even though the selected windows is not the git-commit one. 7- we hit `j` in the git-commit buffer/window but it's read while in cvs-commit 8- boom! I installed the patch below which fixes this problem. Stefan diff --git a/src/dispnew.c b/src/dispnew.c index bcea26a66a..534002584e 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6062,6 +6062,8 @@ sit_for (Lisp_Object timeout, bool reading, int display_option) intmax_t sec; int nsec; bool do_display = display_option > 0; + bool curbuf_eq_winbuf + = (current_buffer == XBUFFER (XWINDOW (selected_window)->contents)); swallow_events (do_display); @@ -6116,6 +6118,13 @@ sit_for (Lisp_Object timeout, bool reading, int display_option) wait_reading_process_output (sec, nsec, reading ? -1 : 1, do_display, Qnil, NULL, 0); + if (reading && curbuf_eq_winbuf) + /* Timers and process filters/sentinels may have changed the selected + window (e.g. in response to a connection from emacsclient), in which + case we should follow it (unless we weren't in the selected-window's + buffer to start with). */ + set_buffer_internal (XBUFFER (XWINDOW (selected_window)->contents)); + return detect_input_pending () ? Qnil : Qt; } From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 24 02:26:25 2020 Received: (at 45292) by debbugs.gnu.org; 24 Dec 2020 07:26:25 +0000 Received: from localhost ([127.0.0.1]:54578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ksL0y-0002Yf-Tp for submit@debbugs.gnu.org; Thu, 24 Dec 2020 02:26:25 -0500 Received: from mail-lf1-f41.google.com ([209.85.167.41]:46582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ksL0w-0002Y6-DG for 45292@debbugs.gnu.org; Thu, 24 Dec 2020 02:26:23 -0500 Received: by mail-lf1-f41.google.com with SMTP id y19so2823868lfa.13 for <45292@debbugs.gnu.org>; Wed, 23 Dec 2020 23:26:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Z75rYc8wdPwSYO4jmJJOnzKMJYPF+u+nV8NHSPTIKRY=; b=KvkewbcsP8dic8Tvk9pPw3zMYpEMTDb2YC2s+4FQOzUIvhKgmusKyDPTkDxWa5qfP+ xVXAYHb5VuwtSlis/vEg0RFEwCaFVbHXfbZzBD8dkcs7QyMSuKrQN/bPSc+kaObO4OHF OCdZ++XKfvZkScbwZipp8ezs/4rqhf2xnDDbZ4Hci2plvFjiTFBUfa3pIzk3wnNfQIMI 0tNDfn/tJHF1bxDHYPGB21bT17Cok0d8trFjQeKFy30WkkyuJTH1HqqYI3/dIMpHNquj OqxcbHezScQCQA+uAu+I3NKrTCnOFXumBgZGr+bkKgMON0ukOLpD01ArzteEBKyJL/F9 gkhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Z75rYc8wdPwSYO4jmJJOnzKMJYPF+u+nV8NHSPTIKRY=; b=TBpe3QuHvCOffqdF2oo87E//hpexvLYloS0i9NM+/zwS0U/lHupg8fCpjs/rdq4FrU DIuyR4i9o/2dZ9eGcAeZYBJxpuFKhHdqon2bQ+mO7cxLoJfWiEKZoam/EnqeJo5VJ7aI RlsYQibGzBTs/2+oCBPY5ntvzeRnGUcx/JG+IH6bvKG8PCwXxZLQkOUOwx2PlUZGKmz6 4yDMGmh6Kru4EbCc1U3H72XhGpltQoKVpMa3T/kcmybjVDeJx+tYskPygG52Qo2bf8gu m0EqH5f3xm+LJixwsDnurLZ2falIIMz1rXVzTFZzgpXuug3tGcBLDJ9s5YZcmYYQ1GlT pRzw== X-Gm-Message-State: AOAM532Ln1j5swSnlGZocILEFMlz4WxZ/sWf3tZ662/HxY9bwb3PkpNm Ejy/IoNYnPDVLCYNYNBK431eqH57HkFr1A== X-Google-Smtp-Source: ABdhPJzhqy9yTMwQfqzdAzzNaKHnPClrIeWa6VuQ7xMt0AXOColzIEaWSgiaBxdPv2VKXvp6lk/rog== X-Received: by 2002:a19:a0c:: with SMTP id 12mr11722488lfk.436.1608794775823; Wed, 23 Dec 2020 23:26:15 -0800 (PST) Received: from [192.168.1.67] ([109.252.80.63]) by smtp.gmail.com with ESMTPSA id y26sm3870722ljh.63.2020.12.23.23.26.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Dec 2020 23:26:15 -0800 (PST) Subject: Re: bug#45292: Acknowledgement (28.0.50; first key typed ignores current input method (in magit commit buffer)) To: Stefan Monnier References: <86c3d4fc-7a3e-19a6-00c9-163b5f772247@gmail.com> <1f8c0245-61bc-6546-e776-f5ccf8ffa855@gmail.com> From: Platon Pronko Message-ID: <5f4e9293-6857-53d3-5757-1891728aa835@gmail.com> Date: Thu, 24 Dec 2020 10:26:14 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 45292 Cc: 45292@debbugs.gnu.org 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: -3.5 (---) Thank you! Tested the version with the patch - the problem doesn't appear anymore on my machine. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 03 21:01:05 2021 Received: (at 45292-done) by debbugs.gnu.org; 4 Apr 2021 01:01:05 +0000 Received: from localhost ([127.0.0.1]:34667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSr8T-0004ff-EM for submit@debbugs.gnu.org; Sat, 03 Apr 2021 21:01:05 -0400 Received: from mail-pf1-f171.google.com ([209.85.210.171]:36443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSr8R-0004er-P3 for 45292-done@debbugs.gnu.org; Sat, 03 Apr 2021 21:01:04 -0400 Received: by mail-pf1-f171.google.com with SMTP id g15so5960371pfq.3 for <45292-done@debbugs.gnu.org>; Sat, 03 Apr 2021 18:01:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=lB9tRaucuJnV1zCCWiwZJX3BIGN/L/NtrXn0fJR3FLQ=; b=q3RGBwxjgz9LV6RZQ0mAJQXrvhaiQaQ96+NYIH2c05RtuyYlQLDuVJQ0WoLgOoVqOQ oViGTqQUrRGi+j9INSbANZNicbyM0kVqy+Osv3J8wEDDm5YQ5TjUz+bhFA5+xEQPWrnY kPLc4tBSBnAJnZelAH8lN30psC2jxkQOyd+yhI6k7/nK3nv47DZESZpSoOgHgk+KHo8y jRJaQUcPgoluui20bML3pqy8x7onyTcL3iYTND3C2UR9Z22KMoDpFwb3MHQDBCfVZOJe O6g/27/97WwSC0LVTgP9ZW+JhjPHQLJQ57gPVzqinfq7zAryoMn19892K6Bf6o+BKrUD dgaw== X-Gm-Message-State: AOAM532k+ENy10+ZzLw9AsA1uJ/XIU8/BKB59NH6reEXw0q36bn02czC iT2z7gvTvqUyK/IoC03oEYgnEO2RoFWMh+txqnM= X-Google-Smtp-Source: ABdhPJzm8yz0CJdmxShJdNfibCtawuEfG/5GjV3mjFeasFTRJixWGSIsZ+fw65dzI8+7Dx70RW3Ics6d3KMzB6PmMhQ= X-Received: by 2002:a63:c807:: with SMTP id z7mr17303842pgg.363.1617498057981; Sat, 03 Apr 2021 18:00:57 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 3 Apr 2021 20:00:57 -0500 From: Stefan Kangas In-Reply-To: <5f4e9293-6857-53d3-5757-1891728aa835@gmail.com> (Platon Pronko's message of "Thu, 24 Dec 2020 10:26:14 +0300") References: <86c3d4fc-7a3e-19a6-00c9-163b5f772247@gmail.com> <1f8c0245-61bc-6546-e776-f5ccf8ffa855@gmail.com> <5f4e9293-6857-53d3-5757-1891728aa835@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Sat, 3 Apr 2021 20:00:57 -0500 Message-ID: Subject: Re: bug#45292: 28.0.50; first key typed ignores current input method (in magit commit buffer) To: Platon Pronko Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 45292-done Cc: Stefan Monnier , 45292-done@debbugs.gnu.org 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.5 (/) Platon Pronko writes: > Thank you! Tested the version with the patch - the problem doesn't appear anymore on my machine. I'm therefore closing this bug report. From unknown Wed Jun 18 23:14:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 02 May 2021 11:24:07 +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