GNU bug report logs - #5303
23.1.91; Cannot load .emacs-history from savehist.el

Previous Next

Packages: w32, emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Tue, 5 Jan 2010 14:09:02 UTC

Severity: normal

Merged with 5309

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 5303 <at> debbugs.gnu.org, Chong Yidong <cyd <at> stupidchicken.com>,
	Drew Adams <drew.adams <at> oracle.com>
Subject: bug#5303: 23.1.91; Cannot load .emacs-history from savehist.el
Date: Tue, 19 Jan 2010 14:40:53 +0100
[Message part 1 (text/plain, inline)]
Lennart Borgman <lennart.borgman <at> gmail.com> writes:

> Yes, it is broken and it has been so for very long time. I just have
> not understood before that it was in the special case with a file in
> the root of a w32 drive.

I could break down the example file from Drew to the following contents:

[emacs-history (text/plain, inline)]
(setq command-history '((describe-key "")))
[Message part 3 (text/plain, inline)]
When enabling traces of all Tramp functions, I see

[2 (text/plain, inline)]
======================================================================
1 -> tramp-completion-file-name-handler: operation=load args=("c:/emacs-history" nil nil t)
| 2 -> tramp-completion-run-real-handler: operation=load args=("c:/emacs-history" nil nil t)
| | 3 -> tramp-completion-file-name-handler: operation=substitute-in-file-name args=("c:/emacs-history")
| | | 4 -> tramp-completion-run-real-handler: operation=substitute-in-file-name args=("c:/emacs-history")
| | | 4 <- tramp-completion-run-real-handler: "c:/emacs-history"
| | 3 <- tramp-completion-file-name-handler: "c:/emacs-history"
| | 3 -> tramp-completion-file-name-handler: operation=expand-file-name args=("c:/emacs-history" "l:/usr/local/src/emacs-jabber")
| | | 4 -> tramp-completion-run-real-handler: operation=expand-file-name args=("c:/emacs-history" "l:/usr/local/src/emacs-jabber")
| | | 4 <- tramp-completion-run-real-handler: "c:/emacs-history"
| | 3 <- tramp-completion-file-name-handler: "c:/emacs-history"
| | 3 -> tramp-completion-file-name-handler: operation=expand-file-name args=("c:/emacs-history" nil)
| | | 4 -> tramp-completion-run-real-handler: operation=expand-file-name args=("c:/emacs-history" nil)
| | | 4 <- tramp-completion-run-real-handler: "c:/emacs-history"
| | 3 <- tramp-completion-file-name-handler: "c:/emacs-history"
| | 3 -> tramp-completion-file-name-handler: operation=file-readable-p args=("c:/emacs-history")
| | | 4 -> tramp-completion-run-real-handler: operation=file-readable-p args=("c:/emacs-history")
| | | | 5 -> tramp-completion-file-name-handler: operation=expand-file-name args=("c:/emacs-history" nil)
| | | | | 6 -> tramp-completion-run-real-handler: operation=expand-file-name args=("c:/emacs-history" nil)
| | | | | 6 <- tramp-completion-run-real-handler: "c:/emacs-history"
| | | | 5 <- tramp-completion-file-name-handler: "c:/emacs-history"
| | | 4 <- tramp-completion-run-real-handler: t
| | 3 <- tramp-completion-file-name-handler: t
| | 3 -> tramp-completion-file-name-handler: operation=expand-file-name args=("c:/emacs-history" "c:/")
| | | 4 -> tramp-completion-run-real-handler: operation=expand-file-name args=("c:/emacs-history" "c:/")
| | | 4 <- tramp-completion-run-real-handler: "c:/emacs-history"
| | 3 <- tramp-completion-file-name-handler: "c:/emacs-history"
| | 3 -> tramp-completion-file-name-handler: operation=file-directory-p args=("c:/emacs-history")
| | | 4 -> tramp-completion-run-real-handler: operation=file-directory-p args=("c:/emacs-history")
| | | | 5 -> tramp-completion-file-name-handler: operation=expand-file-name args=("c:/emacs-history" "c:/")
| | | | | 6 -> tramp-completion-run-real-handler: operation=expand-file-name args=("c:/emacs-history" "c:/")
| | | | | 6 <- tramp-completion-run-real-handler: "c:/emacs-history"
| | | | 5 <- tramp-completion-file-name-handler: "c:/emacs-history"
| | | 4 <- tramp-completion-run-real-handler: nil
| | 3 <- tramp-completion-file-name-handler: nil
| | 3 -> tramp-completion-file-name-handler: operation=file-truename args=("c:/emacs-history")
| | | 4 -> tramp-completion-run-real-handler: operation=file-truename args=("c:/emacs-history")
| | | | 5 -> tramp-completion-file-name-handler: operation=expand-file-name args=("c:/emacs-history" nil)
| | | | | 6 -> tramp-completion-run-real-handler: operation=expand-file-name args=("c:/emacs-history" nil)
| | | | | 6 <- tramp-completion-run-real-handler: "c:/emacs-history"
| | | | 5 <- tramp-completion-file-name-handler: "c:/emacs-history"
| | | 4 <- tramp-completion-run-real-handler: "c:/emacs-history"
| | 3 <- tramp-completion-file-name-handler: "c:/emacs-history"
======================================================================
[Message part 5 (text/plain, inline)]
As you can see, the error happens inside
`tramp-completion-file-name-handler'.  I've debugged it; the last action
I can see is disabling Tramp' file name completion handler, and calling
`load', again. The error does not seem to be caused inside a Tramp
function.

As I am not able to debug C sources on W32, I must let it to you. It
seems to be something inside FLoad.

> However I wonder why those files at all are interesting for tramp. I
> know little about tramp, but does not remote file names always start
> with something like "/ssh:", "/ftp:", "/telnet:" etc?
>
> If so why look for file names starting with "c:/"?

Some packages ( I don't remember which ones) do add the volume letter to
file names, which haven't one. Tramp silently removes the volume letter
then, and continues.

> And why does this file handler at all jump in during `load'? Shouldn't
> tramp-completion-file-name-handler just come in during completion? It
> should be invoked when the operations are file-name-completion or
> file-name-all-completion (see
> tramp-completion-file-name-handler-alist), but are these operations
> used during `load'?

In `tramp-completion-file-name-handler' it is checked, whether Emacs is
in (file name) completion mode. If not, Tramp's file name completion
handler is disables, and the function is re-called, recursively.

Best regards, Michael.

This bug report was last modified 15 years and 121 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.