GNU bug report logs -
#18943
24.4; Cannot jump to bookmark with tramp-via-proxy
Previous Next
Reported by: Moritz Bunkus <moritz <at> bunkus.org>
Date: Tue, 4 Nov 2014 08:35:02 UTC
Severity: normal
Found in version 24.4
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18943 in the body.
You can then email your comments to 18943 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18943
; Package
emacs
.
(Tue, 04 Nov 2014 08:35:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Moritz Bunkus <moritz <at> bunkus.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 04 Nov 2014 08:35:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I'm using tramp with sshx & sudo for logging into remote machines as a
normal user and editing root-owned files there. I have some files that I
visit often, so I set a bookmark to these files. When I jump to such a
bookmark I receive the following error message:
--------------------------------------------------
Tramp: Opening connection for root <at> spector using sudo...failed
byte-code: Host `spector' looks like a remote host, `sudo' can only use the local host
--------------------------------------------------
How to reproduce:
1. Run `emacs -Q`
2. Connect to a remote host via a proxy,
e.g. "/sshx:mbunkus <at> spector|sudo:root <at> spector:/var/cache/bind/domain.db"
3. Set a bookmark with M-x bookmark-set
4. Save the bookmarks with M-x bookmark-save
Here's how such a bookmark looks like:
("domain.db"
(filename . "/sshx:mbunkus <at> spector|sudo:root <at> spector:/var/cache/bind/linet/domain.db")
(front-context-string . "; -*- mode: zone")
(rear-context-string)
(position . 1))
5. Exit and restart Emacs with `emacs -Q`
6. Jump to the bookmark set in 3.; now the error message occurs.
What's interesting is that I circumvent that error by manually opening a
similar tramp-sudo-via-sshx-proxy connection to any file on the same
host (e.g. to
"/sshx:mbunkus <at> spector|sudo:root <at> spector:/root/.bashrc"). After I've
done that once jumping to the bookmark miraculously starts working (no
further errors, the files are opened just as I expect them to
be). However, bookmarks to other hosts do not start working after such a
workaround.
In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.3)
of 2014-10-21 on bitzer.hoetzel.info
Windowing system distributor `The X.Org Foundation', version 11.0.11601000
Configured using:
`configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --with-x-toolkit=gtk3 --with-xft
'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
--param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'
Important settings:
value of $LC_COLLATE: de_DE.UTF-8
value of $LC_CTYPE: de_DE.UTF-8
value of $LC_MONETARY: de_DE.UTF-8
value of $LC_NUMERIC: de_DE.UTF-8
value of $LC_TIME: de_DE.UTF-8
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Messages
Minor modes in effect:
magit-auto-revert-mode: t
ido-everywhere: t
shell-dirtrack-mode: t
diff-auto-refine-mode: t
global-edit-server-edit-mode: t
which-function-mode: t
global-hl-line-mode: t
show-paren-mode: t
winner-mode: t
yas-global-mode: t
yas-minor-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
C-x r b <return> C-x C-f / s s h x : m b u n k u s
<return> / C-g C-x r b <up> <return> C-x b m e s <return>
M-x r e p o r t <return>
Recent messages:
Tramp: Sending command `exec ssh -o ControlPath=/tmp/tramp.151851xI.%r@%h:%p -o ControlMaster=auto -o ControlPersist=no -e none -t -t mirax.bunkus.org /bin/sh'
Tramp: Waiting for prompts from remote shell...
Tramp failed to connect. If this happens repeatedly, try
`M-x tramp-cleanup-this-connection'
Tramp: Waiting for prompts from remote shell...failed
Tramp: Opening connection for mirax.bunkus.org using sshx...failed
Error in post-command-hook (ido-exhibit): (file-error "Tramp failed to connect. If this happens repeatedly, try
`M-x tramp-cleanup-this-connection'")
Quit
Tramp: Opening connection for root <at> spector using sudo...failed
byte-code: Host `spector' looks like a remote host, `sudo' can only use the local host
Load-path shadows:
/home/mbunkus/.emacs.d/site-start.d/libs/paredit hides /home/mbunkus/.emacs.d/elpa/paredit-20140128.1248/paredit
/home/mbunkus/.emacs.d/site-start.d/libs/apache-mode hides /usr/share/emacs/site-lisp/apache-mode
/home/mbunkus/.emacs.d/elpa/markdown-mode-20140819.602/markdown-mode hides /usr/share/emacs/site-lisp/markdown-mode/markdown-mode
/home/mbunkus/.emacs.d/site-start.d/libs/buff-menu hides /usr/share/emacs/24.4/lisp/buff-menu
/home/mbunkus/.emacs.d/site-start.d/libs/cc-langs hides /usr/share/emacs/24.4/lisp/progmodes/cc-langs
/home/mbunkus/.emacs.d/site-start.d/libs/cc-align hides /usr/share/emacs/24.4/lisp/progmodes/cc-align
/home/mbunkus/.emacs.d/site-start.d/libs/cc-defs hides /usr/share/emacs/24.4/lisp/progmodes/cc-defs
/home/mbunkus/.emacs.d/site-start.d/libs/cc-mode hides /usr/share/emacs/24.4/lisp/progmodes/cc-mode
/home/mbunkus/.emacs.d/site-start.d/libs/cc-fonts hides /usr/share/emacs/24.4/lisp/progmodes/cc-fonts
/home/mbunkus/.emacs.d/site-start.d/libs/cc-styles hides /usr/share/emacs/24.4/lisp/progmodes/cc-styles
/home/mbunkus/.emacs.d/site-start.d/libs/cc-vars hides /usr/share/emacs/24.4/lisp/progmodes/cc-vars
/home/mbunkus/.emacs.d/site-start.d/libs/cc-menus hides /usr/share/emacs/24.4/lisp/progmodes/cc-menus
/home/mbunkus/.emacs.d/site-start.d/libs/cc-cmds hides /usr/share/emacs/24.4/lisp/progmodes/cc-cmds
/home/mbunkus/.emacs.d/site-start.d/libs/cc-awk hides /usr/share/emacs/24.4/lisp/progmodes/cc-awk
/home/mbunkus/.emacs.d/elpa/flymake-0.4.16/flymake hides /usr/share/emacs/24.4/lisp/progmodes/flymake
/home/mbunkus/.emacs.d/site-start.d/libs/cc-compat hides /usr/share/emacs/24.4/lisp/progmodes/cc-compat
/home/mbunkus/.emacs.d/site-start.d/libs/cc-engine hides /usr/share/emacs/24.4/lisp/progmodes/cc-engine
/home/mbunkus/.emacs.d/site-start.d/libs/cfengine hides /usr/share/emacs/24.4/lisp/progmodes/cfengine
/home/mbunkus/.emacs.d/site-start.d/libs/cperl-mode/cperl-mode hides /usr/share/emacs/24.4/lisp/progmodes/cperl-mode
/home/mbunkus/.emacs.d/site-start.d/libs/cc-bytecomp hides /usr/share/emacs/24.4/lisp/progmodes/cc-bytecomp
/home/mbunkus/.emacs.d/site-start.d/libs/cc-guess hides /usr/share/emacs/24.4/lisp/progmodes/cc-guess
/home/mbunkus/.emacs.d/site-start.d/libs/cl-lib hides /usr/share/emacs/24.4/lisp/emacs-lisp/cl-lib
Features:
(shadow sort mail-extr emacsbug tramp-cache tramp-sh vc-git bookmark pp
f s paredit two-column 70-perl cperl-mode 70-ido magit-blame
dired-sort-map dired-single magit-key-mode magit iswitchb ido esh-var
esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg eldoc esh-groups eshell
esh-module esh-mode esh-util ediff-merg ediff-wind ediff-diff ediff-mult
ediff-help ediff-init ediff-util ediff dired-x dired view tramp
tramp-compat auth-source gnus-util password-cache tramp-loaddefs
trampver shell pcomplete grep compile comint epa epg diff-mode
autorevert filenotify ansi-color git-rebase-mode thingatpt
git-commit-mode server log-edit message idna sendmail format-spec rfc822
mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils
mailheader pcvs-util add-log solarized-light-theme solarized-definitions
70-html-xml rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse
rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln
nxml-rap nxml-util nxml-glyph nxml-enc xmltok saveplace buff-menu+
buff-menu edit-server 70-helpers which-func imenu dash-functional dash
browse-kill-ring hl-line paren 70-text 70-tabs filladapt winner ring
01-version-test my-site-start yasnippet advice help-fns derived
easy-mmode edmacro kmacro help-mode ack-and-a-half-autoloads
ag-autoloads clojure-test-mode-autoloads cider-autoloads
dash-functional-autoloads elixir-mode-autoloads expand-region-autoloads
f-autoloads dash-autoloads flymake-autoloads flymake-yaml-autoloads
flymake-easy-autoloads gist-autoloads finder-inf gh-autoloads eieio
byte-opt bytecomp byte-compile cconv eieio-core logito-autoloads info
easymenu magit-autoloads git-rebase-mode-autoloads
git-commit-mode-autoloads markdown-mode-autoloads nrepl-autoloads
clojure-mode-autoloads paredit-autoloads pcache-autoloads
pkg-info-autoloads epl-autoloads s-autoloads tracwiki-mode-autoloads
xml-rpc-autoloads yaml-mode-autoloads package epg-config cl-macs cl gv
cl-loaddefs cl-lib time-date tooltip electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)
Memory information:
((conses 16 386179 23509)
(symbols 48 36382 18)
(miscs 40 138 115)
(strings 32 81254 21635)
(string-bytes 1 2245590)
(vectors 16 28782)
(vector-slots 8 606647 1907)
(floats 8 249 121)
(intervals 56 323 1)
(buffers 960 15)
(heap 1024 56800 2345))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18943
; Package
emacs
.
(Wed, 05 Nov 2014 11:03:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 18943 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hey,
I've attempted to trace the problem. It happens inside
bookmark-default-handler when it calls (file-readable-p file). Therefore
the test case can be boiled down to:
(file-readable-p "/sshx:mbunkus <at> spector|sudo:root <at> spector:/etc/fstab")
This function call returns t if there's already a tramp connection open
with the very same host & proxy. It errors if there's no tramp
connection open yet.
Kind regards,
mosu
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18943
; Package
emacs
.
(Fri, 07 Nov 2014 19:17:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 18943 <at> debbugs.gnu.org (full text, mbox):
Moritz Bunkus <moritz <at> bunkus.org> writes:
> Hey,
Hi Moritz,
> I've attempted to trace the problem. It happens inside
> bookmark-default-handler when it calls (file-readable-p file). Therefore
> the test case can be boiled down to:
>
> (file-readable-p "/sshx:mbunkus <at> spector|sudo:root <at> spector:/etc/fstab")
>
> This function call returns t if there's already a tramp connection open
> with the very same host & proxy. It errors if there's no tramp
> connection open yet.
Could you pls test the following patch?
--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/tramp/lisp/tramp.el.~master~ 2014-11-07 20:13:32.146821148 +0100
--- /home/albinus/src/tramp/lisp/tramp.el 2014-11-07 20:04:49.733712206 +0100
***************
*** 3919,3925 ****
(tramp-file-name-method vec)
(tramp-file-name-user vec)
(tramp-file-name-host vec)
! (tramp-file-name-localname vec))
(intern suffix))))
(remote-uid
(tramp-get-connection-property
--- 3919,3926 ----
(tramp-file-name-method vec)
(tramp-file-name-user vec)
(tramp-file-name-host vec)
! (tramp-file-name-localname vec)
! (tramp-file-name-hop vec))
(intern suffix))))
(remote-uid
(tramp-get-connection-property
--8<---------------cut here---------------end--------------->8---
> Kind regards,
> mosu
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18943
; Package
emacs
.
(Fri, 07 Nov 2014 20:07:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 18943 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hey,
thanks for the quick fix, Michael. I can confirm that it fixes the issue
for me. I've checked both cases (no tramp connection with that
host/proxy yet and with a connection already open), and both work just
fine with your patch applied against today's emacs-git at revision
a9dcf6b.
Kind regards,
mosu
[Message part 2 (application/pgp-signature, inline)]
Reply sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
You have taken responsibility.
(Fri, 07 Nov 2014 20:19:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Moritz Bunkus <moritz <at> bunkus.org>
:
bug acknowledged by developer.
(Fri, 07 Nov 2014 20:19:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 18943-done <at> debbugs.gnu.org (full text, mbox):
Moritz Bunkus <moritz <at> bunkus.org> writes:
> Hey,
Hi Moritz,
> thanks for the quick fix, Michael. I can confirm that it fixes the issue
> for me. I've checked both cases (no tramp connection with that
> host/proxy yet and with a connection already open), and both work just
> fine with your patch applied against today's emacs-git at revision
> a9dcf6b.
Thanks for confirmation. I've committed the patch to the emacs-24 bzr
branch; shall arrive your git checkout within a few days.
Closing the bug.
> Kind regards,
> mosu
Best regards, Michael.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 06 Dec 2014 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 282 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.