From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#27108: 26.0.50; tramp and recentf again Date: Wed, 31 May 2017 11:51:47 +0200 Message-ID: <87wp8xl5fw.fsf@detlef> References: <87poeuf0t9.fsf@rosalinde> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1496224338 13230 195.159.176.226 (31 May 2017 09:52:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 31 May 2017 09:52:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 27108@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 31 11:52:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dG0IW-000352-QT for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 May 2017 11:52:13 +0200 Original-Received: from localhost ([::1]:58175 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG0Ib-000101-Sj for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 May 2017 05:52:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG0IQ-0000yR-HO for bug-gnu-emacs@gnu.org; Wed, 31 May 2017 05:52:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dG0IM-0004Z3-KI for bug-gnu-emacs@gnu.org; Wed, 31 May 2017 05:52:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43518) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dG0IM-0004Yx-Fq for bug-gnu-emacs@gnu.org; Wed, 31 May 2017 05:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dG0IM-0005Ku-3M for bug-gnu-emacs@gnu.org; Wed, 31 May 2017 05:52:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87poeuf0t9.fsf@rosalinde> Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 May 2017 09:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27108 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27108-submit@debbugs.gnu.org id=B27108.149622431720501 (code B ref 27108); Wed, 31 May 2017 09:52:02 +0000 Original-Received: (at 27108) by debbugs.gnu.org; 31 May 2017 09:51:57 +0000 Original-Received: from localhost ([127.0.0.1]:46195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dG0IH-0005Kb-4h for submit@debbugs.gnu.org; Wed, 31 May 2017 05:51:57 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:63996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dG0IF-0005KM-2O for 27108@debbugs.gnu.org; Wed, 31 May 2017 05:51:55 -0400 Original-Received: from detlef.gmx.de ([213.220.151.12]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LhkiL-1dkxRl146r-00mqN7; Wed, 31 May 2017 11:51:48 +0200 X-Provags-ID: V03:K0:WUBPfssxmzSnhzG1mL+PJA7ilWzdGPyvw0fDRcbR5N4VhgoDeQ/ tsZG4ddzABf5o7Lh49Q2bAN0bVORPdrsNIQXyuEPqqI7gYa6JSGM0SO5pIX38LixJyTvaSp HCMDVt07CeFCx20qlrLwDMZ6Yc9Iab54bB+kbmPHvJZcGEAjCrzCMubnXNbQXqt2fOsLPHl j0roZyU/vyBVER9eyzWxw== X-UI-Out-Filterresults: notjunk:1;V01:K0:WdXNFe8D+c4=:prvXFXwEpJnAlT/f5QvVer B0Oib1swkGElPMnJS4rr8qOqQnfc4UndrVa4XRFkQmhN+5bPkDPSFjFyBhdxPiB/IyQyItnVu NY0iIyV2NvH/hLFr+W/Yt5OcaD5BBvjp9L8gatrkS69be9CWWc3yfXuTiqQ5G9sUxRuB/T9j8 nZSgFjoRpbs1C/ebj522gw1eluUU9oCs/uPgU0fOjdtqd71tdtS8yEYNLNVsQJ/yo2lhCy370 1P7eC8F0DbYYAqhu9tuL78SUseD0aQ29pXg/XgCDSe0+W04O1zI3rwMjuOXPjDIRzhJlkNlm3 rL5OtxzD1A21t0qTFiqMd6Jz8kEU6In+wc+J+VPISYoLvr/0up5ymsfQOmYCssrTXdQ6VcLcy 8uYU8O6W47XsHbdXx39FP1lyB5qeqs+t0GVEaEinFE9NZa2x0IUoJ/vuoGPLbJLIhD43FZNMJ JXmP1aRN0Zb7rwujiQx7nUbVnwPomV01fuHolMd6WHzylPsrNEPkFH+m4QMRw1zlwsQkcfdt7 6Pm3MJLgdNVtJ5jzrWsofq5x4+Ohnt2Z0DKF4aIoQfhB5cmHZ9ITt321LmHzFtPsg7hyJ8/Qe 2/4Dp7BxIZo2zExh/5qjD6tE7rmu8CrgUeE7QcyHZp7MeFvckUt/apEfqFZ86jWN913N/3uQL +3cO7vMeWRM0QV0lDS1frd5M39QHqlwI/ndROu07BuGtOcugdOeQHs2UWBjq6e5pvVs0EHYqL yNWZnr3JpDjlVe8emL4BenTl8w34zfO3FR8LiZ3BM/kqCffQHet3TvbH8W8= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133081 Archived-At: --=-=-= Content-Type: text/plain Stephen Berman writes: Hi Stephen, > Starting with this change: > > commit dca22e86e02d16a31128c163925b13404f777c0f > Author: Michael Albinus > Date: Wed May 24 16:16:53 2017 +0200 > > Introduce a defstruct `tramp-file-name' as central data structure. > > The problem also happens when I have the above recentf file and start > emacs like this: > > emacs -Q --eval "(custom-set-variables '(recentf-mode t))" > > This recalls bug#26258 but now there is no error, just the login prompt. Thanks for the report. I could reproduce it locally. However, I don't know whether this counts as a bug. The password request comes from the function `file-name-case-insensitive-p', called when recentf scans the saved file name list. Tramp has different approaches to implement this function; for the sudo method (as in your case) it performs some tests on the remote account. Usually, you don't see this, because Tramp keeps the result of this function in its own persistency file "~/.emacs.d/tramp". As you have observed, it didn't work this way after the switch to use defstruct's in Tramp. Due to this change, the data in Tramp's persistency file were invalid, and they were ignored at startup. Tramp's `file-name-case-insensitive-p' implementation couldn't use the cached value, and so it tried to recompute it, accessing the sudo account, asking for the password. As a skilled bug hunter, you have tried to find the problem by starting further Emacs instances with "emacs -Q". But when Emacs is started with the "-Q" argument, Tramp doesn't read its persistency file, it doesn't know the cached value, and you have the same problem. So it looks like a bug. I'm pretty sure, if you continue to work the usual way, calling Emacs w/o "-Q", the problem disappears latest after the second Emacs startup, because the cached value is available then from the persistency file. That's why I believe it isn't a bug. OTOH, I understand that the problem is annoying when it appears, and when it isn't obvious why this happens. The appended small patch in `recentf-load-list' would avoid this, instructing Tramp not to open a new connection while reading the previously saved recent list. Would it be OK to apply this patch? Best regards, Michael. --=-=-= Content-Type: text/plain Content-Disposition: attachment diff --git a/lisp/recentf.el b/lisp/recentf.el index 4f0573911b..462ccb6db5 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -1304,7 +1304,9 @@ recentf-load-list When `recentf-initialize-file-name-history' is non-nil, initialize an empty `file-name-history' with the recent list." (interactive) - (let ((file (expand-file-name recentf-save-file))) + (let ((file (expand-file-name recentf-save-file)) + ;; We do not want Tramp asking for passwords. + (non-essential t)) (when (file-readable-p file) (load-file file) (and recentf-initialize-file-name-history --=-=-=--