Subject: Re: bug#66697: 30.0.50; [PATCH] desktop-save-mode with expiring remote buffers

From: Manuel Giraud <[email-masked]>
Date: Mon, 23 Oct 2023 14:56:33 +0200

Eli Zaretskii <[email-masked]> writes:

[...]

> So you are saying that, even though these buffers are in
> desktop-files-not-to-save value, Emacs still asks for a password for
> them when desktop.el saves the desktop?

Yes.

> If so, can you set debug-on-quit non-nil and when Emacs prompts for
> the password, type C-g and post the backtrace here?

I have already (kind of) done that when trying to find out this issue:
I've placed a 'debug' call into 'tramp-read-passwd'.  Here is what I
get:

--8<---------------cut here---------------start------------->8---
Debugger entered: nil
  tramp-read-passwd(#<process *tramp/doas root@bb*>)
  tramp-action-password(#<process *tramp/doas root@bb*> (tramp-file-name "doas" #("root" 0 4 (tramp-default t)) nil #("bb" 0 2 (tramp-default t)) nil "~/" nil))
  tramp-maybe-open-connection((tramp-file-name "doas" #("root" 0 4 (tramp-default t)) nil #("bb" 0 2 (tramp-default t)) nil "~/" nil))
  tramp-send-command((tramp-file-name "doas" #("root" 0 4 (tramp-default t)) nil #("bb" 0 2 (tramp-default t)) nil "~/" nil) #("echo ~root 2>/dev/null; echo tramp_exit_status $?" 6 10 (tramp-default t)))
  tramp-send-command-and-check((tramp-file-name "doas" #("root" 0 4 (tramp-default t)) nil #("bb" 0 2 (tramp-default t)) nil "~/" nil) #("echo ~root" 6 10 (tramp-default t)))
  tramp-sh-handle-get-home-directory((tramp-file-name "doas" #("root" 0 4 (tramp-default t)) nil #("bb" 0 2 (tramp-default t)) nil "~/" nil) #("root" 0 4 (tramp-default t)))
  apply(tramp-sh-handle-get-home-directory ((tramp-file-name "doas" #("root" 0 4 (tramp-default t)) nil #("bb" 0 2 (tramp-default t)) nil "~/" nil) #("root" 0 4 (tramp-default t))))
  tramp-sh-file-name-handler(tramp-get-home-directory (tramp-file-name "doas" #("root" 0 4 (tramp-default t)) nil #("bb" 0 2 (tramp-default t)) nil "~/" nil) #("root" 0 4 (tramp-default t)))
  apply(tramp-sh-file-name-handler tramp-get-home-directory ((tramp-file-name "doas" #("root" 0 4 (tramp-default t)) nil #("bb" 0 2 (tramp-default t)) nil "~/" nil) #("root" 0 4 (tramp-default t))))
  tramp-file-name-handler(tramp-get-home-directory (tramp-file-name "doas" #("root" 0 4 (tramp-default t)) nil #("bb" 0 2 (tramp-default t)) nil "~/" nil) #("root" 0 4 (tramp-default t)))
  tramp-get-home-directory((tramp-file-name "doas" #("root" 0 4 (tramp-default t)) nil #("bb" 0 2 (tramp-default t)) nil "~/" nil) #("root" 0 4 (tramp-default t)))
  tramp-sh-handle-expand-file-name(#("/doas:root@bb:~/" 6 10 (tramp-default t) 11 13 (tramp-default t)) nil)
  apply(tramp-sh-handle-expand-file-name (#("/doas:root@bb:~/" 6 10 (tramp-default t) 11 13 (tramp-default t)) nil))
  tramp-sh-file-name-handler(expand-file-name #("/doas:root@bb:~/" 6 10 (tramp-default t) 11 13 (tramp-default t)) nil)
  apply(tramp-sh-file-name-handler expand-file-name (#("/doas:root@bb:~/" 6 10 (tramp-default t) 11 13 (tramp-default t)) nil))
  tramp-file-name-handler(expand-file-name #("/doas:root@bb:~/" 6 10 (tramp-default t) 11 13 (tramp-default t)) nil)
  expand-file-name(#("/doas:root@bb:~/" 6 10 (tramp-default t) 11 13 (tramp-default t)))
  desktop-file-name(#("/doas:root@bb:~/" 6 10 (tramp-default t) 11 13 (tramp-default t)) "/home/manuel/.emacs.d/")
  dired-desktop-buffer-misc-data("/home/manuel/.emacs.d/")
  desktop-buffer-info(#<buffer ~</doas:root@bb:>>)
  desktop-save("/home/manuel/.emacs.d/" nil t)
  desktop-auto-save()
  apply(desktop-auto-save nil)
  timer-event-handler([t 0 30 0 nil desktop-auto-save nil idle 0 nil])
--8<---------------cut here---------------end--------------->8---

-- 
Manuel Giraud