From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Newsgroups: gmane.emacs.bugs Subject: bug#40152: 27.0.90; icomplete vs recursive prompts Date: Sun, 24 Jan 2021 16:06:55 +0100 Message-ID: <875z3m74s0.fsf@gmail.com> References: <87wo7ex4z6.fsf@gmail.com> <87sgbulznk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3456"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: 40152@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 24 16:08:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l3gzq-0000mX-Nk for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Jan 2021 16:08:10 +0100 Original-Received: from localhost ([::1]:58590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3gzp-0006ma-Pi for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Jan 2021 10:08:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3gzi-0006mS-Jl for bug-gnu-emacs@gnu.org; Sun, 24 Jan 2021 10:08:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53670) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3gzi-0007iY-CU for bug-gnu-emacs@gnu.org; Sun, 24 Jan 2021 10:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l3gzi-0000JA-7J for bug-gnu-emacs@gnu.org; Sun, 24 Jan 2021 10:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Jan 2021 15:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40152 X-GNU-PR-Package: emacs Original-Received: via spool by 40152-submit@debbugs.gnu.org id=B40152.16115008311115 (code B ref 40152); Sun, 24 Jan 2021 15:08:02 +0000 Original-Received: (at 40152) by debbugs.gnu.org; 24 Jan 2021 15:07:11 +0000 Original-Received: from localhost ([127.0.0.1]:36983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3gys-0000Hu-TX for submit@debbugs.gnu.org; Sun, 24 Jan 2021 10:07:11 -0500 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:35724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3gyr-0000Hd-87 for 40152@debbugs.gnu.org; Sun, 24 Jan 2021 10:07:10 -0500 Original-Received: by mail-wr1-f49.google.com with SMTP id l12so9755552wry.2 for <40152@debbugs.gnu.org>; Sun, 24 Jan 2021 07:07:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=gZx/Bpd2Ihxhkb6T62D4lJbpeF/hZ1DyldJj/sAQoPw=; b=OdPZI/8/9oR9sMo2Z6CArQEZFWMWZg8HgRwdFA/gsPe4K/uvgkkFk2fTCLKaF54/R/ uqUvfh+NsnTV/nh3Pgw4iiPjSI+AjWZkwZMjd+4O7nO2srQLcaYS2jje/M55vfY46Pkl CPaMxiAEra/AAJ43O5W39EUQGhh3DaiC23Tmw9OlvAliLNSty28yDwulPE+lJqJGjOKv aEipO7GZpCiyjZbT+WscbEOz5xTyf4fTvRfThanNzEqHI5jwg1U3+8jJC5bIKsDfLiod cDJuuPzJ/SKmuSADT7q7FiaItJlL1iMbliAF3rhTZnz6Ndv0m51ogvIZrSMdxuMCL45X Mhlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=gZx/Bpd2Ihxhkb6T62D4lJbpeF/hZ1DyldJj/sAQoPw=; b=e2Xiw/X8WBlzVDwSDToXikLdjWU+VcNsGPLb5gBYErSDBCVxPBkSfrVy/IM3uF0APV Yxzj0jWr2jizgzbRns9HWju2g3+XFqh1J4iiNAEC9TYVdKONu0PUa6bV2pxQqxA7nHA8 1jhys4b4Bkzhww7xsd74eVuzBeazZJUS3ZoMLjF6T59N+ujZiRlntmU3p4K71BQSLFjM UltG3bbe9ZMmAxIl+s9mNMcjdegvBHG5XY6jJKntL/Jqn1sazH0NfgpntE29kV/Kr+iv vrla98oSwtY+CL5GGvAO50scAs4//W4HSfV8VzZ16JHvMXBqV2jrNDpr4mTauQsxgxvx 65fg== X-Gm-Message-State: AOAM530R5xNQxDo5fAP6eTMcYMqwHpS15R9hkncyIE+ackgERELmJpDD 2opdcDkmXCUGdhDE7A2LtV7CHLPBYt2Kbw== X-Google-Smtp-Source: ABdhPJyLbQ2dAik3evZmv4ajscj8Dg3GaciRR0HypNdUHorIEh5+kLuSnxMQgi3L3xa9S8Xrn6dooA== X-Received: by 2002:adf:ab1d:: with SMTP id q29mr12782586wrc.415.1611500823066; Sun, 24 Jan 2021 07:07:03 -0800 (PST) Original-Received: from my-little-tumbleweed ([2a01:e0a:20e:d340:922b:34ff:fe95:9aed]) by smtp.gmail.com with ESMTPSA id b12sm12554930wrr.35.2021.01.24.07.07.01 for <40152@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jan 2021 07:07:01 -0800 (PST) In-Reply-To: <87sgbulznk.fsf@gmail.com> ("=?UTF-8?Q?K=C3=A9vin?= Le Gouguec"'s message of "Mon, 07 Sep 2020 11:11:27 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:198504 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable K=C3=A9vin Le Gouguec writes: > 1. create an ~/.authinfo.gpg file with the EasyPG assistant[1] > 2. pkill -HUP gpg-agent > 2. emacs -Q > 3. (progn > (setq epg-pinentry-mode 'loopback) > (icomplete-mode)) > 5. C-x C-f /ssh: > > This brings up epa.el's "Passphrase for symmetric encryption" prompt to > unlock ~/.authinfo.gpg. The prompt cannot be completed, because any > self-inserting character brings the "Find file" prompt back up, and from > *there*, typing any character brings the "Passphrase for symmetric > encryption" prompt back again. Still getting bitten by this, just about every time I start Emacs and open a remote file. I've tried to debug this repeatedly, but I'm obviously doing it wrong since no amount of debugging-on-entry or tweaking {pre,post}-command-hook amounted to anything. FWIW I've dumped backtraces of both the TRAMP recipe and the etags recipe. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=tramp Content-Transfer-Encoding: quoted-printable Debugger entered--entering a function: * read-file-name("Visit tags table (default TAGS): " "/usr/local/share/emac= s/28.0.50/lisp/" "TAGS" t) visit-tags-table-buffer() #f(compiled-function (string pred action) #)= ("f" nil metadata) completion-metadata("f" #f(compiled-function (string pred action) #) nil) completion--field-metadata(22) icomplete-completions("f" #f(compiled-function (string pred action) #) nil nil) icomplete-exhibit() (let ((non-essential t)) (icomplete-exhibit)) icomplete-post-command-hook() read-from-minibuffer("Find definitions of: " nil (keymap (menu-bar keymap= (minibuf "Minibuf" keymap (tab menu-item "Complete" minibuffer-complete :h= elp "Complete as far as possible") (space menu-item "Complete Word" minibuf= fer-complete-word :help "Complete at most one word") (63 menu-item "List Co= mpletions" minibuffer-completion-help :help "Display all possible completio= ns") "Minibuf")) (27 keymap (118 . switch-to-completions)) (prior . switch-= to-completions) (63 . minibuffer-completion-help) (32 . minibuffer-complete= -word) (9 . minibuffer-complete) keymap (menu-bar keymap (minibuf "Minibuf"= keymap (previous menu-item "Previous History Item" previous-history-elemen= t :help "Put previous minibuffer history element in the min...") (next menu= -item "Next History Item" next-history-element :help "Put next minibuffer h= istory element in the minibuf...") (isearch-backward menu-item "Isearch His= tory Backward" isearch-backward :help "Incrementally search minibuffer hist= ory backward") (isearch-forward menu-item "Isearch History Forward" isearch= -forward :help "Incrementally search minibuffer history forward") (return m= enu-item "Enter" exit-minibuffer :key-sequence "\15" :help "Terminate input= and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "A= bort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . e= xit-minibuffer) (7 . minibuffer-keyboard-quit) (C-tab . file-cache-minibuff= er-complete) (9 . self-insert-command) (XF86Back . previous-history-element= ) (up . previous-line-or-history-element) (prior . previous-history-element= ) (XF86Forward . next-history-element) (down . next-line-or-history-element= ) (next . next-history-element) (27 keymap (60 . minibuffer-beginning-of-bu= ffer) (114 . previous-matching-history-element) (115 . next-matching-histor= y-element) (112 . previous-history-element) (110 . next-history-element))) = nil xref--read-identifier-history nil nil) completing-read-default("Find definitions of: " #f(compiled-function (str= ing pred action) #) nil nil nil xref--read-ide= ntifier-history nil nil) completing-read("Find definitions of: " #f(compiled-function (string pred= action) #) nil nil nil xref--read-identifier-= history nil) xref--read-identifier("Find definitions of: ") byte-code("\300\301!C\207" [xref--read-identifier "Find definitions of: "= ] 2) call-interactively(xref-find-definitions nil nil) command-execute(xref-find-definitions) --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=etags Content-Transfer-Encoding: quoted-printable Debugger entered--entering a function: * read-passwd("Passphrase for symmetric encryption for /home/peni..." nil) epa-passphrase-callback-function(#s(epg-context :protocol OpenPGP :progra= m "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :include-cer= ts nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil = :passphrase-callback (epa-file-passphrase-callback-function . "/home/penibl= ec/.authinfo.gpg") :progress-callback (epa-progress-callback-function . "De= crypting /home/peniblec/.authinfo.gpg") :edit-callback nil :signers nil :se= nder nil :sig-notations nil :process # :output-file "/tmp/epg-= outputxgqCot" :result nil :operation decrypt :pinentry-mode loopback :error= -output "" :error-buffer #) SYM "/home/peniblec/.authi= nfo.gpg") epa-file-passphrase-callback-function(#s(epg-context :protocol OpenPGP :p= rogram "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :includ= e-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm= nil :passphrase-callback (epa-file-passphrase-callback-function . "/home/p= eniblec/.authinfo.gpg") :progress-callback (epa-progress-callback-function = . "Decrypting /home/peniblec/.authinfo.gpg") :edit-callback nil :signers ni= l :sender nil :sig-notations nil :process # :output-file "/tmp= /epg-outputxgqCot" :result nil :operation decrypt :pinentry-mode loopback := error-output "" :error-buffer #) SYM "/home/peniblec/.= authinfo.gpg") epg--status-GET_HIDDEN(#s(epg-context :protocol OpenPGP :program "/usr/bi= n/gpg2" :home-directory nil :armor nil :textmode nil :include-certs nil :ci= pher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphras= e-callback (epa-file-passphrase-callback-function . "/home/peniblec/.authin= fo.gpg") :progress-callback (epa-progress-callback-function . "Decrypting /= home/peniblec/.authinfo.gpg") :edit-callback nil :signers nil :sender nil := sig-notations nil :process # :output-file "/tmp/epg-outputxgqC= ot" :result nil :operation decrypt :pinentry-mode loopback :error-output ""= :error-buffer #) "passphrase.enter") epg--process-filter(# "[GNUPG:] INQUIRE_MAXLEN 100\n[GNUPG:]= GET_HIDDEN pa...") accept-process-output(# 1) epg-wait-for-status(#s(epg-context :protocol OpenPGP :program "/usr/bin/g= pg2" :home-directory nil :armor nil :textmode nil :include-certs nil :ciphe= r-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-c= allback (epa-file-passphrase-callback-function . "/home/peniblec/.authinfo.= gpg") :progress-callback (epa-progress-callback-function . "Decrypting /hom= e/peniblec/.authinfo.gpg") :edit-callback nil :signers nil :sender nil :sig= -notations nil :process # :output-file "/tmp/epg-outputxgqCot"= :result nil :operation decrypt :pinentry-mode loopback :error-output "" :e= rror-buffer #) ("BEGIN_DECRYPTION")) epg-start-decrypt(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg= 2" :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-= algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-cal= lback (epa-file-passphrase-callback-function . "/home/peniblec/.authinfo.gp= g") :progress-callback (epa-progress-callback-function . "Decrypting /home/= peniblec/.authinfo.gpg") :edit-callback nil :signers nil :sender nil :sig-n= otations nil :process # :output-file "/tmp/epg-outputxgqCot" := result nil :operation decrypt :pinentry-mode loopback :error-output "" :err= or-buffer #) #s(epg-data :file "/home/peniblec/.authin= fo.gpg" :string nil)) epg-decrypt-file(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg2= " :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-a= lgorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-call= back (epa-file-passphrase-callback-function . "/home/peniblec/.authinfo.gpg= ") :progress-callback (epa-progress-callback-function . "Decrypting /home/p= eniblec/.authinfo.gpg") :edit-callback nil :signers nil :sender nil :sig-no= tations nil :process # :output-file "/tmp/epg-outputxgqCot" :r= esult nil :operation decrypt :pinentry-mode loopback :error-output "" :erro= r-buffer #) "/home/peniblec/.authinfo.gpg" nil) epa-file-insert-file-contents("/home/peniblec/.authinfo.gpg" nil nil nil = nil) apply(epa-file-insert-file-contents ("/home/peniblec/.authinfo.gpg" nil n= il nil nil)) epa-file-handler(insert-file-contents "/home/peniblec/.authinfo.gpg" nil = nil nil nil) insert-file-contents("~/.authinfo.gpg") auth-source-netrc-parse(:max 2305843009213693951 :require (:port) :file "= ~/.authinfo.gpg" :host t :user t :port "ssh") auth-source-netrc-search(:backend # :type netrc :max 2305843009213693951 :require (:port) :create n= il :delete nil :port "ssh" :require (:port) :max 2305843009213693951) apply(auth-source-netrc-search :backend # :type netrc :max 2305843009213693951 :require (:port) :cr= eate nil :delete nil (:port "ssh" :require (:port) :max 2305843009213693951= )) auth-source-search-backends((# # #) (:port "ssh" :require (:port) :max 23058= 43009213693951) 2305843009213693951 nil nil (:port)) auth-source-search(:port "ssh" :require (:port) :max 2305843009213693951) tramp-parse-auth-sources("ssh") #f(compiled-function (x) #)((tramp-parse-aut= h-sources "ssh")) mapc(#f(compiled-function (x) #) ((tramp-par= se-default-user-host "ssh") (tramp-parse-auth-sources "ssh") (tramp-parse-c= onnection-properties "ssh") (tramp-parse-rhosts "/etc/hosts.equiv") (tramp-= parse-shosts "~/.ssh/known_hosts") (tramp-parse-sconfig "~/.ssh/config"))) tramp-completion-handle-file-name-all-completions("ssh:" "/") apply(tramp-completion-handle-file-name-all-completions ("ssh:" "/")) tramp-completion-file-name-handler(file-name-all-completions "ssh:" "/") file-name-all-completions("ssh:" "/") completion-file-name-table("/ssh:" #f(compiled-function (cand) #) t) all-completions("/ssh:" completion-file-name-table #f(compiled-function (= cand) #)) completion-pcm--all-completions("/" ("ssh:" point) completion-file-name-t= able #f(compiled-function (cand) #)) completion-basic-all-completions("/ssh:" completion-file-name-table #f(co= mpiled-function (cand) #) 5) #f(compiled-function (style) #)(basic) completion--some(#f(compiled-function (style) #) (basic partial-completion emacs22)) completion--nth-completion(2 "/usr/local/share/emacs/28.0.50/lisp//ssh:" = read-file-name-internal #f(compiled-function (cand) #) 41 (metadata (category . file) (completion--unquote-requote . t))) completion-all-completions("/usr/local/share/emacs/28.0.50/lisp//ssh:" re= ad-file-name-internal #f(compiled-function (cand) #) 41 (metadata (category . file) (completion--unquote-requote . t))) completion-all-sorted-completions(12 53) icomplete--sorted-completions() icomplete-completions("/usr/local/share/emacs/28.0.50/lisp//ssh:" read-fi= le-name-internal file-exists-p nil) icomplete-exhibit() (let ((non-essential t)) (icomplete-exhibit)) icomplete-post-command-hook() read-from-minibuffer("Find file: " "/usr/local/share/emacs/28.0.50/lisp/"= (keymap (keymap (32)) keymap (10 . minibuffer-complete-and-exit) (13 . min= ibuffer-complete-and-exit) keymap (menu-bar keymap (minibuf "Minibuf" keyma= p (tab menu-item "Complete" minibuffer-complete :help "Complete as far as p= ossible") (space menu-item "Complete Word" minibuffer-complete-word :help "= Complete at most one word") (63 menu-item "List Completions" minibuffer-com= pletion-help :help "Display all possible completions") "Minibuf")) (27 keym= ap (118 . switch-to-completions)) (prior . switch-to-completions) (63 . min= ibuffer-completion-help) (32 . minibuffer-complete-word) (9 . minibuffer-co= mplete) keymap (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-it= em "Previous History Item" previous-history-element :help "Put previous min= ibuffer history element in the min...") (next menu-item "Next History Item"= next-history-element :help "Put next minibuffer history element in the min= ibuf...") (isearch-backward menu-item "Isearch History Backward" isearch-ba= ckward :help "Incrementally search minibuffer history backward") (isearch-f= orward menu-item "Isearch History Forward" isearch-forward :help "Increment= ally search minibuffer history forward") (return menu-item "Enter" exit-min= ibuffer :key-sequence "\15" :help "Terminate input and exit minibuffer") (q= uit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minib= uffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . mini= buffer-keyboard-quit) (C-tab . file-cache-minibuffer-complete) (9 . self-in= sert-command) (XF86Back . previous-history-element) (up . previous-line-or-= history-element) (prior . previous-history-element) (XF86Forward . next-his= tory-element) (down . next-line-or-history-element) (next . next-history-el= ement) (27 keymap (60 . minibuffer-beginning-of-buffer) (114 . previous-mat= ching-history-element) (115 . next-matching-history-element) (112 . previou= s-history-element) (110 . next-history-element))) nil file-name-history "/u= sr/local/share/emacs/28.0.50/lisp/" nil) completing-read-default("Find file: " read-file-name-internal file-exists= -p confirm-after-completion "/usr/local/share/emacs/28.0.50/lisp/" file-nam= e-history "/usr/local/share/emacs/28.0.50/lisp/" nil) completing-read("Find file: " read-file-name-internal file-exists-p confi= rm-after-completion "/usr/local/share/emacs/28.0.50/lisp/" file-name-histor= y "/usr/local/share/emacs/28.0.50/lisp/") read-file-name-default("Find file: " nil "/usr/local/share/emacs/28.0.50/= lisp/" confirm-after-completion nil nil) read-file-name("Find file: " nil "/usr/local/share/emacs/28.0.50/lisp/" c= onfirm-after-completion) find-file-read-args("Find file: " confirm-after-completion) byte-code("\300\301\302 \"\207" [find-file-read-args "Find file: " confir= m-nonexistent-file-or-buffer] 3) call-interactively(find-file nil nil) command-execute(find-file) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I am mildly intrigued by this comment in icomplete-post-command-hook: (defun icomplete-post-command-hook () (let ((non-essential t)) ;E.g. don't prompt for password! (icomplete-exhibit))) As can be seen in the backtraces, prompts are definitely happening while calling icomplete-exhibit; I have no idea whether this is suspicious, or if that comment is a red herring=E2=80=A6 My hunch is that icomplete sets up *something* that is not cleared and keeps being triggered when the second prompt shows up; I haven't been able to pinpoint what yet. If any completion wizard out here has advice on how to debug this further, I'm all ears! --=-=-=--