From: Michael Albinus <michael.albinus@gmx.de>
To: David Reitter <david.reitter@gmail.com>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: tramp+recentf: persistent errors due to expand-file-name
Date: Mon, 11 Aug 2008 21:18:31 +0200 [thread overview]
Message-ID: <87hc9rqs1k.fsf@gmx.de> (raw)
In-Reply-To: <9E807BB3-1944-44F8-A5F5-1DBED9C99927@gmail.com> (David Reitter's message of "Sun, 10 Aug 2008 19:08:02 +0200")
David Reitter <david.reitter@gmail.com> writes:
> I've been playing around with tramp, which does not recognize a
> location such as /dr@localhost:/tmp/123123//bar as a local /bar file.
>
> Worse than that, the error that ensues (in combination with recentf-
> mode) prevents users from saving or openeing other files in the future:
>
> Debugger entered--Lisp error: (error "Not a tramp file name: /qweqwe")
> signal(error ("Not a tramp file name: /qweqwe"))
> ad-Orig-error("Not a tramp file name: %s" "/qweqwe")
> apply(ad-Orig-error ("Not a tramp file name: %s" "/qweqwe"))
> error("Not a tramp file name: %s" "/qweqwe")
> tramp-dissect-file-name("/qweqwe")
> tramp-file-name-handler(expand-file-name "/dr@localhost:/tmp/
> 123123//qweqwe" nil)
> expand-file-name("/dr@localhost:/tmp/123123//qweqwe")
> recentf-expand-file-name("/dr@localhost:/tmp/123123//qweqwe")
> recentf-track-opened-file()
> run-hook-with-args-until-success(recentf-track-opened-file)
> basic-save-buffer()
> save-buffer()
> mac-key-save-file()
> call-interactively(mac-key-save-file)
I cannot reproduce it here:
(recentf-expand-file-name "/dr@localhost:/tmp/123123//qweqwe")
=> "/scp:dr@localhost:/tmp/123123/qweqwe"
(expand-file-name "/dr@localhost:/tmp/123123//qweqwe")
=> "/scp:dr@localhost:/tmp/123123/qweqwe"
(expand-file-name "/tmp/123123//qweqwe")
=> "/tmp/123123/qweqwe"
Btw, where does the "//" comes from?
> The patch below fixes this - comments appreciated.
>
> The alternative would be to fix tramp so it doesn't throw an error
> when expand-file-name is called, but this might prevent it from giving
> proper feedback to the user.
>
> *** lisp/recentf.el 06 Apr 2008 13:51:37 +0200 1.56.2.2
> --- lisp/recentf.el 10 Aug 2008 19:04:41 +0200
> ***************
> *** 394,400 ****
> "Convert file NAME to absolute, and canonicalize it.
> NAME is first passed to the function `expand-file-name', then to
> `recentf-filename-handlers' to post process it."
> ! (recentf-apply-filename-handlers (expand-file-name name)))
>
> (defun recentf-include-p (filename)
> "Return non-nil if FILENAME should be included in the recent list.
> --- 394,402 ----
> "Convert file NAME to absolute, and canonicalize it.
> NAME is first passed to the function `expand-file-name', then to
> `recentf-filename-handlers' to post process it."
> ! (condition-case nil
> ! (recentf-apply-filename-handlers (expand-file-name name))
> ! (error name)))
>
> (defun recentf-include-p (filename)
> "Return non-nil if FILENAME should be included in the recent list.
This leaves `name' in an unexpanded state, which might be not
desirable. I would prefer to find the reason, why Tramp returns it the
way you have shown (and I cannot reproduce).
Could you, please, provide me a recipe for reproducing, w/o mac
specifics?
Best regards, Michael.
next prev parent reply other threads:[~2008-08-11 19:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-10 17:08 tramp+recentf: persistent errors due to expand-file-name David Reitter
2008-08-11 19:18 ` Michael Albinus [this message]
2008-08-12 7:01 ` David Reitter
2008-08-12 12:57 ` Michael Albinus
2008-08-12 13:04 ` Lennart Borgman
2008-08-12 14:41 ` David Reitter
2008-08-12 15:06 ` Lennart Borgman (gmail)
2008-08-12 19:27 ` Stefan Monnier
2008-08-14 18:35 ` Lennart Borgman (gmail)
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=87hc9rqs1k.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=david.reitter@gmail.com \
--cc=emacs-devel@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.