all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: 5303@debbugs.gnu.org, Chong Yidong <cyd@stupidchicken.com>
Subject: bug#5303: 23.1.91; Cannot load .emacs-history from savehist.el
Date: Tue, 19 Jan 2010 14:40:53 +0100	[thread overview]
Message-ID: <87r5pm2owq.fsf@gmx.de> (raw)
In-Reply-To: <8F73D1539CE042B8A9B48F767127C43B@us.oracle.com>

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

Lennart Borgman <lennart.borgman@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:


[-- Attachment #2: emacs-history --]
[-- Type: text/plain, Size: 45 bytes --]

(setq command-history '((describe-key "\x1a")))

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


When enabling traces of all Tramp functions, I see


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

======================================================================
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"
======================================================================

[-- Attachment #5: Type: text/plain, Size: 1360 bytes --]


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.

  reply	other threads:[~2010-01-19 13:40 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8F73D1539CE042B8A9B48F767127C43B@us.oracle.com>
2010-01-16 19:33 ` bug#5303: 23.1.91; Cannot load .emacs-history from savehist.el Chong Yidong
2010-01-16 20:03   ` Lennart Borgman
2010-01-16 21:11     ` Kevin Rodgers
2010-01-17 16:54     ` Michael Albinus
2010-01-17 16:58       ` Lennart Borgman
2010-01-17 17:18         ` Michael Albinus
2010-01-17 19:46           ` Lennart Borgman
2010-01-19 13:40             ` Michael Albinus [this message]
2010-01-19 17:39               ` Drew Adams
2010-01-19 19:28                 ` Eli Zaretskii
2010-01-19 19:30                   ` Chong Yidong
2010-01-19 19:36                   ` Michael Albinus
2010-01-19 21:24                     ` Eli Zaretskii
2010-01-19 22:13                       ` Eli Zaretskii
2010-01-20  1:25                       ` Lennart Borgman
2010-01-20  8:44                       ` Michael Albinus
2010-01-20  8:46                         ` Lennart Borgman
2010-01-20  8:56                           ` Michael Albinus
2010-01-20  9:02                             ` Lennart Borgman
2010-01-20  9:45                         ` Michael Albinus
2010-01-20 10:39                           ` Eli Zaretskii
2010-01-20 10:50                             ` Michael Albinus
2010-01-19 19:37                   ` Drew Adams
2010-01-19 19:44                     ` Eli Zaretskii
2010-01-19 19:52                       ` Drew Adams
2010-01-19 21:31                         ` Eli Zaretskii
2010-01-19 20:01               ` Lennart Borgman
2010-01-20  9:00                 ` Michael Albinus
2010-01-20  9:04                   ` Lennart Borgman
2010-01-20 10:13                     ` Michael Albinus
2010-01-20 10:38                       ` Lennart Borgman
2010-01-20 12:01                         ` Michael Albinus
2010-01-20 12:03                           ` Lennart Borgman
2010-01-20 12:15                             ` Michael Albinus
2010-01-20 12:21                               ` Lennart Borgman
2010-01-20 15:32                           ` Drew Adams
2010-01-20 15:41                             ` Michael Albinus
2010-01-20 17:33                               ` Drew Adams
2010-01-20 18:18                               ` Eli Zaretskii
2010-01-21  1:02                                 ` Lennart Borgman
2010-01-21 18:24                                   ` Eli Zaretskii
2010-01-21 18:42                                     ` Chong Yidong
2010-01-21 20:41                                       ` Chong Yidong
2010-01-20 18:17                             ` Eli Zaretskii

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=87r5pm2owq.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=5303@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=lennart.borgman@gmail.com \
    /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.