From: David Reitter <david.reitter@gmail.com>
To: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: tramp+recentf: persistent errors due to expand-file-name
Date: Sun, 10 Aug 2008 19:08:02 +0200 [thread overview]
Message-ID: <9E807BB3-1944-44F8-A5F5-1DBED9C99927@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4587 bytes --]
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)
when opening:
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-hooks(find-file-hook)
after-find-file(nil t)
find-file-noselect-1(#<buffer recentf.el.gz> "/Applications/
Aquamacs Emacs.app/Contents/Resources/lisp/recentf.el.gz" nil nil "/
Applications/Aquamacs Emacs.app/Contents/Resources/lisp/
recentf.el.gz" (21798801 234881026))
find-file-noselect("/Applications/Aquamacs Emacs.app/Contents/
Resources/lisp/recentf.el.gz")
find-function-search-for-symbol(recentf-track-opened-file nil
"recentf.el")
#[(fun file) "⇄蠀ࠀ씀=\x11\0ই℀섀\"\x10ৈ준\b#\x1a峊渀䀀℀蠀
尀渀䄀茀✀\0尀渀䄀戀舀⨀\0찀!)" [file fun location require
find-func C-source help-C-file-name indirect-function find-function-
search-for-symbol nil pop-to-buffer message "Unable to find location
in file"] 4](recentf-track-opened-file "recentf.el")
apply(#[(fun file) "⇄蠀ࠀ씀=\x11\0ই℀섀\"\x10ৈ준\b#\x1a峊渀䀀
℀蠀尀渀䄀茀✀\0尀渀䄀戀舀⨀\0찀!)" [file fun location
require find-func C-source help-C-file-name indirect-function find-
function-search-for-symbol nil pop-to-buffer message "Unable to find
location in file"] 4] (recentf-track-opened-file "recentf.el"))
help-do-xref(59 #[(fun file) "⇄蠀ࠀ씀=\x11\0ই℀섀\"\x10ৈ준\b#\x1a
峊渀䀀℀蠀尀渀䄀茀✀\0尀渀䄀戀舀⨀\0찀!)" [file fun
location require find-func C-source help-C-file-name indirect-function
find-function-search-for-symbol nil pop-to-buffer message "Unable to
find location in file"] 4] (recentf-track-opened-file "recentf.el"))
help-button-action(#<marker (moves after insertion) at 63 in *Help*>)
push-button(63 t)
push-button((mouse-2 (#<window 15 on *Help*> 63 (439 . 10) 71778152
nil 63 (62 . 0) nil (5 . 10) (7 . 15))))
call-interactively(push-button)
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.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]
next reply other threads:[~2008-08-10 17:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-10 17:08 David Reitter [this message]
2008-08-11 19:18 ` tramp+recentf: persistent errors due to expand-file-name Michael Albinus
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9E807BB3-1944-44F8-A5F5-1DBED9C99927@gmail.com \
--to=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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).