all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: 40152@debbugs.gnu.org
Subject: bug#40152: 27.0.90; icomplete vs recursive prompts
Date: Sun, 24 Jan 2021 16:06:55 +0100	[thread overview]
Message-ID: <875z3m74s0.fsf@gmail.com> (raw)
In-Reply-To: <87sgbulznk.fsf@gmail.com> ("Kévin Le Gouguec"'s message of "Mon, 07 Sep 2020 11:11:27 +0200")

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

Kévin Le Gouguec <kevin.legouguec@gmail.com> 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.


[-- Attachment #2: tramp --]
[-- Type: text/plain, Size: 3109 bytes --]

Debugger entered--entering a function:
* read-file-name("Visit tags table (default TAGS): " "/usr/local/share/emacs/28.0.50/lisp/" "TAGS" t)
  visit-tags-table-buffer()
  #f(compiled-function (string pred action) #<bytecode -0x44eaa5b86f00cea>)("f" nil metadata)
  completion-metadata("f" #f(compiled-function (string pred action) #<bytecode -0x44eaa5b86f00cea>) nil)
  completion--field-metadata(22)
  icomplete-completions("f" #f(compiled-function (string pred action) #<bytecode -0x44eaa5b86f00cea>) 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 :help "Complete as far as possible") (space menu-item "Complete Word" minibuffer-complete-word :help "Complete at most one word") (63 menu-item "List Completions" minibuffer-completion-help :help "Display all possible completions") "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-element :help "Put previous minibuffer history element in the min...") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuf...") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\15" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . minibuffer-keyboard-quit) (C-tab . file-cache-minibuffer-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-buffer) (114 . previous-matching-history-element) (115 . next-matching-history-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 (string pred action) #<bytecode -0x44eaa5b86f00cea>) nil nil nil xref--read-identifier-history nil nil)
  completing-read("Find definitions of: " #f(compiled-function (string pred action) #<bytecode -0x44eaa5b86f00cea>) 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)

[-- Attachment #3: etags --]
[-- Type: text/plain, Size: 10582 bytes --]

Debugger entered--entering a function:
* read-passwd("Passphrase for symmetric encryption for /home/peni..." nil)
  epa-passphrase-callback-function(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/home/peniblec/.authinfo.gpg") :progress-callback (epa-progress-callback-function . "Decrypting /home/peniblec/.authinfo.gpg") :edit-callback nil :signers nil :sender nil :sig-notations nil :process #<process epg> :output-file "/tmp/epg-outputxgqCot" :result nil :operation decrypt :pinentry-mode loopback :error-output "" :error-buffer #<buffer  *epg-error*>) SYM "/home/peniblec/.authinfo.gpg")
  epa-file-passphrase-callback-function(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/home/peniblec/.authinfo.gpg") :progress-callback (epa-progress-callback-function . "Decrypting /home/peniblec/.authinfo.gpg") :edit-callback nil :signers nil :sender nil :sig-notations nil :process #<process epg> :output-file "/tmp/epg-outputxgqCot" :result nil :operation decrypt :pinentry-mode loopback :error-output "" :error-buffer #<buffer  *epg-error*>) SYM "/home/peniblec/.authinfo.gpg")
  epg--status-GET_HIDDEN(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/home/peniblec/.authinfo.gpg") :progress-callback (epa-progress-callback-function . "Decrypting /home/peniblec/.authinfo.gpg") :edit-callback nil :signers nil :sender nil :sig-notations nil :process #<process epg> :output-file "/tmp/epg-outputxgqCot" :result nil :operation decrypt :pinentry-mode loopback :error-output "" :error-buffer #<buffer  *epg-error*>) "passphrase.enter")
  epg--process-filter(#<process epg> "[GNUPG:] INQUIRE_MAXLEN 100\n[GNUPG:] GET_HIDDEN pa...")
  accept-process-output(#<process epg> 1)
  epg-wait-for-status(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/home/peniblec/.authinfo.gpg") :progress-callback (epa-progress-callback-function . "Decrypting /home/peniblec/.authinfo.gpg") :edit-callback nil :signers nil :sender nil :sig-notations nil :process #<process epg> :output-file "/tmp/epg-outputxgqCot" :result nil :operation decrypt :pinentry-mode loopback :error-output "" :error-buffer #<buffer  *epg-error*>) ("BEGIN_DECRYPTION"))
  epg-start-decrypt(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/home/peniblec/.authinfo.gpg") :progress-callback (epa-progress-callback-function . "Decrypting /home/peniblec/.authinfo.gpg") :edit-callback nil :signers nil :sender nil :sig-notations nil :process #<process epg> :output-file "/tmp/epg-outputxgqCot" :result nil :operation decrypt :pinentry-mode loopback :error-output "" :error-buffer #<buffer  *epg-error*>) #s(epg-data :file "/home/peniblec/.authinfo.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-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/home/peniblec/.authinfo.gpg") :progress-callback (epa-progress-callback-function . "Decrypting /home/peniblec/.authinfo.gpg") :edit-callback nil :signers nil :sender nil :sig-notations nil :process #<process epg> :output-file "/tmp/epg-outputxgqCot" :result nil :operation decrypt :pinentry-mode loopback :error-output "" :error-buffer #<buffer  *epg-error*>) "/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 nil 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 #<auth-source-backend auth-source-backend-12932da> :type netrc :max 2305843009213693951 :require (:port) :create nil :delete nil :port "ssh" :require (:port) :max 2305843009213693951)
  apply(auth-source-netrc-search :backend #<auth-source-backend auth-source-backend-12932da> :type netrc :max 2305843009213693951 :require (:port) :create nil :delete nil (:port "ssh" :require (:port) :max 2305843009213693951))
  auth-source-search-backends((#<auth-source-backend auth-source-backend-128eb04> #<auth-source-backend auth-source-backend-12932da> #<auth-source-backend auth-source-backend-1293302>) (:port "ssh" :require (:port) :max 2305843009213693951) 2305843009213693951 nil nil (:port))
  auth-source-search(:port "ssh" :require (:port) :max 2305843009213693951)
  tramp-parse-auth-sources("ssh")
  #f(compiled-function (x) #<bytecode -0x91f43f15f3a70d7>)((tramp-parse-auth-sources "ssh"))
  mapc(#f(compiled-function (x) #<bytecode -0x91f43f15f3a70d7>) ((tramp-parse-default-user-host "ssh") (tramp-parse-auth-sources "ssh") (tramp-parse-connection-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) #<bytecode -0x10bca56c8ccfa7>) t)
  all-completions("/ssh:" completion-file-name-table #f(compiled-function (cand) #<bytecode -0x10bca56c8ccfa7>))
  completion-pcm--all-completions("/" ("ssh:" point) completion-file-name-table #f(compiled-function (cand) #<bytecode -0x10bca56c8ccfa7>))
  completion-basic-all-completions("/ssh:" completion-file-name-table #f(compiled-function (cand) #<bytecode -0x10bca56c8ccfa7>) 5)
  #f(compiled-function (style) #<bytecode 0x1d925b84ec00208f>)(basic)
  completion--some(#f(compiled-function (style) #<bytecode 0x1d925b84ec00208f>) (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) #<bytecode -0x10bca56c8ccfa7>) 41 (metadata (category . file) (completion--unquote-requote . t)))
  completion-all-completions("/usr/local/share/emacs/28.0.50/lisp//ssh:" read-file-name-internal #f(compiled-function (cand) #<bytecode -0x10bca56c8ccfa7>) 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-file-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 . minibuffer-complete-and-exit) keymap (menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "Complete" minibuffer-complete :help "Complete as far as possible") (space menu-item "Complete Word" minibuffer-complete-word :help "Complete at most one word") (63 menu-item "List Completions" minibuffer-completion-help :help "Display all possible completions") "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-element :help "Put previous minibuffer history element in the min...") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuf...") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\15" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . minibuffer-keyboard-quit) (C-tab . file-cache-minibuffer-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-buffer) (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) nil file-name-history "/usr/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-name-history "/usr/local/share/emacs/28.0.50/lisp/" nil)
  completing-read("Find file: " read-file-name-internal file-exists-p confirm-after-completion "/usr/local/share/emacs/28.0.50/lisp/" file-name-history "/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/" confirm-after-completion)
  find-file-read-args("Find file: " confirm-after-completion)
  byte-code("\300\301\302 \"\207" [find-file-read-args "Find file: " confirm-nonexistent-file-or-buffer] 3)
  call-interactively(find-file nil nil)
  command-execute(find-file)

[-- Attachment #4: Type: text/plain, Size: 661 bytes --]


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…

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!

  reply	other threads:[~2021-01-24 15:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20 18:21 bug#40152: 27.0.90; icomplete vs recursive prompts Kévin Le Gouguec
2020-03-21  7:27 ` Eli Zaretskii
2020-03-21 12:21   ` Kévin Le Gouguec
2020-03-21 13:36     ` Eli Zaretskii
2020-03-21 20:03       ` Kévin Le Gouguec
2020-09-07  9:11 ` Kévin Le Gouguec
2021-01-24 15:06   ` Kévin Le Gouguec [this message]
2021-02-04 18:39     ` Kévin Le Gouguec
2021-08-19 22:05       ` João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875z3m74s0.fsf@gmail.com \
    --to=kevin.legouguec@gmail.com \
    --cc=40152@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.