I have set tramp-persistency-file-name
to a custom location since I want all the files generated by emacs stored in a specific location.
(setq files-dir "~/src/emacs.d/vendor/files/")
(setq custom-file (concat files-dir "custom.el")
tramp-persistency-file-name (concat files-dir "tramp")
host-file (concat hosts-dir (replace-regexp-in-string "[^A-Za-z0-9_-]" "-" (downcase (car (split-string (system-name) "\\.")))) ".el")
version-file (concat versions-dir (number-to-string emacs-major-version) ".el"))
I do have some bookmarks set to some remote locations, that are supposed to use tramp to reach some remote files.
So, the "first time" I use it, it works. I can reach my /scp:host:/path
remote path and open some files.
Then, Tramp generates the history file in the right location I've set (~/src/emacs.d/vendor/files/tramp
).
But the next time, I want to open such a location, it crashes and generates this backtrace:
Debugger entered--Lisp error: (invalid-function (["scp" nil "my-host" nil nil] ("locale" "LC_ALL=en_US.utf8") ("uname" "Linux 3.2.0-4-amd64") ("test" "test") ("remote-path" ("/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin" "/usr/local/sbin")) ("remote-shell" "/bin/sh") ("stat" "\\stat") ("file-exists" "test -e") ("id" "/usr/bin/id") ("gid-string" "my-user") ("ls" "/bin/ls --color=never") ("ls-dired" t) ("gid-integer" 1016) ("perl-file-spec" t) ("perl-cwd-realpath" t) ("perl" "\\perl") ("readlink" "\\readlink")))
((["scp" nil "my-host" nil nil] ("locale" "LC_ALL=en_US.utf8") ("uname" "Linux 3.2.0-4-amd64") ("test" "test") ("remote-path" ("/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin" "/usr/local/sbin")) ("remote-shell" "/bin/sh") ("stat" "\\stat") ("file-exists" "test -e") ("id" "/usr/bin/id") ("gid-string" "my-user") ("ls" "/bin/ls --color=never") ("ls-dired" t) ("gid-integer" 1016) ("perl-file-spec" t) ("perl-cwd-realpath" t) ("perl" "\\perl") ("readlink" "\\readlink")))
eval-buffer(#<buffer *load*> nil "/Users/my-user/src/emacs.d/vendor/files/tramp" nil t) ; Reading at buffer position 702
load-with-code-conversion("/Users/my-user/src/emacs.d/vendor/files/tramp" "/Users/my-user/src/emacs.d/vendor/files/tramp" nil t)
load("tramp" nil t)
(let ((default-directory (or (symbol-value (quote temporary-file-directory)) "/"))) (load "tramp" nil t))
tramp-autoload-file-name-handler(expand-file-name "/scp:my-host:/home/my-user/my/path" nil)
file-readable-p("/scp:my-host:/home/my-user/my/path")
bookmark-default-handler(("MyBookmark" (filename . "/scp:my-host:/home/my-user/my/path")))
byte-code("\301!\206�\302\303!!\207" [bookmark-name-or-record bookmark-get-handler bookmark-default-handler bookmark-get-bookmark] 3)
bookmark-handle-bookmark("MyBookmark")
bookmark--jump-via("MyBookmark" switch-to-buffer)
bookmark-jump("MyBookmark")
bookmark-bmenu-this-window()
call-interactively(bookmark-bmenu-this-window nil nil)
command-execute(bookmark-bmenu-this-window)
Note: if I comment the line setq tramp-persistency-file-name blabla
, it solves the problem but the file is located in my emacs.d
directory (which I do not want).
Do you have any idea what's going wrong ? Should I report a bug or am I the bug ?
EDIT: as requested here is the tramp
file generated after the first use of the feature
;; -*- emacs-lisp -*- <15/12/23 10:35:22 ~/src/emacs.d/vendor/files/tramp>
;; Tramp connection history. Don't change this file.
;; You can delete it, forcing Tramp to reapply the checks.
((["scp" nil "my-host" nil nil]
("locale" "LC_ALL=en_US.utf8")
("uname" "Linux 3.2.0-4-amd64")
("test" "test")
("remote-path"
("/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin" "/usr/local/sbin"))
("remote-shell" "/bin/sh")
("stat" "\\stat")
("file-exists" "test -e")
("id" "/usr/bin/id")
("gid-string" "my-user")
("ls" "/bin/ls --color=never")
("ls-dired" t)
("gid-integer" 1016)
("readlink" "\\readlink")
("perl-file-spec" t)
("perl-cwd-realpath" t)
("perl" "\\perl")))
/Users/my-user/src/emacs.d/vendor/files/tramp
(be careful to remove personal info)? Looks like something is wrong with that file.["scp" ...]
is not a function. Does this file look the same if you don't modify the path? (perhaps there's a'
before the first paren, or maybe even more code preceding it?).((["scp" nil "my-host" nil nil]
. Anyway, why would it change the content file by changing its location ? Is there any reason ?tramp-autoload-file-name-handler
there doesn't seem to be any reason for this file to look this way. It just looks like the contents of this file were meant for something else... I'd write to Emacs mailing list to ask why it looks the way it does. On the surface of it, it doesn't make sense.