[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tramp+recentf: persistent errors due to expand-file-name
From: |
David Reitter |
Subject: |
tramp+recentf: persistent errors due to expand-file-name |
Date: |
Sun, 10 Aug 2008 19:08:02 +0200 |
I've been playing around with tramp, which does not recognize a
location such as /address@hidden:/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 "/address@hidden:/tmp/
123123//qweqwe" nil)
expand-file-name("/address@hidden:/tmp/123123//qweqwe")
recentf-expand-file-name("/address@hidden:/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 "/address@hidden:/tmp/
123123//qweqwe" nil)
expand-file-name("/address@hidden:/tmp/123123//qweqwe")
recentf-expand-file-name("/address@hidden:/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) "⇄蠀ࠀ씀= ই℀섀\"ৈ준#峊渀䀀℀蠀
尀渀䄀茀✀ 尀渀䄀戀舀⨀ 찀!)" [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) "⇄蠀ࠀ씀= ই℀섀\"ৈ준#峊渀䀀
℀蠀尀渀䄀茀✀ 尀渀䄀戀舀⨀ 찀!)" [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) "⇄蠀ࠀ씀= ই℀섀\"ৈ준#
峊渀䀀℀蠀尀渀䄀茀✀ 尀渀䄀戀舀⨀ 찀!)" [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.
smime.p7s
Description: S/MIME cryptographic signature
- tramp+recentf: persistent errors due to expand-file-name,
David Reitter <=
- Re: tramp+recentf: persistent errors due to expand-file-name, Michael Albinus, 2008/08/11
- Re: tramp+recentf: persistent errors due to expand-file-name, David Reitter, 2008/08/12
- Re: tramp+recentf: persistent errors due to expand-file-name, Michael Albinus, 2008/08/12
- Re: tramp+recentf: persistent errors due to expand-file-name, Lennart Borgman, 2008/08/12
- Re: tramp+recentf: persistent errors due to expand-file-name, David Reitter, 2008/08/12
- Re: tramp+recentf: persistent errors due to expand-file-name, Lennart Borgman (gmail), 2008/08/12
- Re: tramp+recentf: persistent errors due to expand-file-name, Stefan Monnier, 2008/08/12
- Re: tramp+recentf: persistent errors due to expand-file-name, Lennart Borgman (gmail), 2008/08/14