When trying to open /ssh:server|su:server:/, Helm only sends "/su:server:/" to tramp. Handling of multi-hop file paths seems to be incorrect. Things work fine with plain emacs (no helm).
The debug trace:
Debugger entered--Lisp error: (file-error "Host `server' looks like a remote host, `su' can only use the local host")
signal(file-error ("Host `server' looks like a remote host, `su' can only use the local host"))
tramp-compute-multi-hops(["su" "root" "server" "" nil])
byte-code("..." [p tramp-terminal-type tramp-initial-end-of-output vec target-alist tramp-use-ssh-controlmaster-options processp delete-process setenv "TERM" "LC_ALL" "en_US.utf8" "HISTFILE" "/dev/null" "PROMPT_COMMAND" "PS1" tramp-compute-multi-hops "" nil boundp temporary-file-directory eval standard-value fboundp temp-directory subrp functionp getenv "TEMP" file-directory-p file-name-as-directory "TMP" "TMPDIR" file-exists-p "c:/temp" message "Neither `temporary-file-directory' nor `temp-directory' is defined -- using /tmp." "/tmp" apply start-process tramp-get-connection-name tramp-get-connection-buffer tramp-set-connection-property "vector" set-process-sentinel tramp-process-sentinel tramp-compat-set-process-query-on-exit-flag butlast append 2 ...] 10)
byte-code("..." [p vec arguments fmt-string level vec-or-proc processp process-status (run open) boundp non-essential throw 3 "%s..." zerop tramp-file-name-user format "Opening connection for %s using %s" tramp-file-name-host tramp-file-name-method "Opening connection for %s@%s using %s" nil (byte-code "..." [level tramp-verbose save-match-data-internal tramp-message-show-message fmt-string arguments match-data ((byte-code "..." [save-match-data-internal set-match-data evaporate] 3)) 3 apply message 0 "" 1 2 "Warning: " "Tramp: " 4 processp tramp-get-connection-property "vector" nil vectorp tramp-debug-message format "(%d) # " vec-or-proc] 6) ((error)) "failed" (byte-code "..." [vec pr subrp make-progress-reporter functionp zerop tramp-file-name-user format "Opening connection for %s using %s" tramp-file-name-host tramp-file-name-method "Opening connection for %s@%s using %s" run-at-time 3 0.1 tramp-progress-reporter-update] 8) ((error)) ((byte-code "..." [tm vec cookie arguments fmt-string level subrp cancel-timer functionp 3 "%s...%s" zerop tramp-file-name-user format "Opening connection for %s using %s" tramp-file-name-host tramp-file-name-method "Opening connection for %s@%s using %s" nil (byte-code "..." [level tramp-verbose save-match-data-internal tramp-message-show-message fmt-string arguments match-data ((byte-code "..." [save-match-data-internal set-match-data evaporate] 3)) 3 apply message 0 "" 1 2 "Warning: " "Tramp: " 4 processp tramp-get-connection-property "vector" nil vectorp tramp-debug-message format "(%d) # " vec-or-proc] 6) ((error)) vec-or-proc] 9)) uname-changed (byte-code "..." [p tramp-terminal-type tramp-initial-end-of-output vec target-alist tramp-use-ssh-controlmaster-options processp delete-process setenv "TERM" "LC_ALL" "en_US.utf8" "HISTFILE" "/dev/null" "PROMPT_COMMAND" "PS1" tramp-compute-multi-hops "" nil boundp temporary-file-directory eval standard-value fboundp temp-directory subrp functionp getenv "TEMP" file-directory-p file-name-as-directory "TMP" "TMPDIR" file-exists-p "c:/temp" message "Neither `temporary-file-directory' nor `temp-directory' is defined -- using /tmp." "/tmp" apply start-process tramp-get-connection-name tramp-get-connection-buffer tramp-set-connection-property "vector" set-process-sentinel tramp-process-sentinel tramp-compat-set-process-query-on-exit-flag butlast append 2 ...] 10) "done" tramp-message-show-message tramp-verbose tm cookie] 9)
tramp-maybe-open-connection(["su" "root" "server" "" nil])
tramp-send-command(["su" "root" "server" "" nil] "cd ~root; pwd")
tramp-sh-handle-expand-file-name("/su:root@server:" "~/")
apply(tramp-sh-handle-expand-file-name ("/su:root@server:" "~/"))
tramp-sh-file-name-handler(expand-file-name "/su:root@server:" "~/")
apply(tramp-sh-file-name-handler expand-file-name ("/su:root@server:" "~/"))
byte-code("..." [suppress (apply foreign operation args)] 2)
byte-code("..." [save-match-data-internal set-match-data evaporate] 3)) 3 apply message 0 "" 1 2 "Warning: " "Tramp: " 4 processp tramp-get-connection-property "vector" nil vectorp tramp-debug-message format "(%d) # " vec-or-proc] 6) ((error)) tramp-run-real-handler suppress 1 "Suppress received in operation %s" tramp-cleanup-connection t v operation args arguments fmt-string level vec-or-proc ...] 7)
tramp-file-name-handler(expand-file-name "/su:root@server:" "~/")
expand-file-name("/su:root@server:" "~/")
apply(expand-file-name ("/su:root@server:" "~/"))
tramp-completion-run-real-handler(expand-file-name ("/su:root@server:" "~/"))
tramp-completion-file-name-handler(expand-file-name "/su:root@server:" "~/")
file-directory-p("/su:root@server:")
helm-find-files-get-candidates()
apply(helm-find-files-get-candidates nil)
helm-funcall-with-source(((name . "Find Files") (header-name lambda (name) (concat name helm-find-files-doc-header)) (init lambda nil (setq helm-ff-auto-update-flag helm-ff-auto-update-initial-value) (setq helm-ff--auto-update-state helm-ff-auto-update-flag)) (candidates . helm-find-files-get-candidates) (action ("Find File" . helm-find-file-or-marked) ("Find file in Dired" . helm-point-file-in-dired) ("View file" . view-file) ("Checksum File" . helm-ff-checksum) ("Query replace fnames on marked" . helm-ff-query-replace-on-marked) ("Query replace contents on marked" . helm-ff-query-replace) ("Query replace regexp contents on marked" . helm-ff-query-replace-regexp) ("Serial rename files" . helm-ff-serial-rename) ("Serial rename by symlinking files" . helm-ff-serial-rename-by-symlink) ("Serial rename by copying files" . helm-ff-serial-rename-by-copying) ("Open file with default tool" . helm-open-file-with-default-tool) ("Find file in hex dump" . hexl-find-file) ("Browse project" . helm-ff-browse-project) ("Complete at point `C-c i'" . helm-insert-file-name-completion-at-point) ("Insert as org link `C-c @'" . helm-files-insert-as-org-link) ("Find shell command `C-c /'" . helm-ff-find-sh-command) ("Add marked files to file-cache" . helm-ff-cache-add-file) ("Open file externally `C-c C-x, C-u to choose'" . helm-open-file-externally) ("Grep File(s) `C-s, C-u Recurse'" . helm-find-files-grep) ("Zgrep File(s) `M-g z, C-u Recurse'" . helm-ff-zgrep) ("Switch to Eshell `M-e'" . helm-ff-switch-to-eshell) ("Etags `M-., C-u reload tag file'" . helm-ff-etags-select) ("Eshell command on file(s) `M-!, C-u take all marked as arguments.'" . helm-find-files-eshell-command-on-file) ("Find file as root `C-c r'" . helm-find-file-as-root) ("Ediff File `C-='" . helm-find-files-ediff-files) ("Ediff Merge File `C-c ='" . helm-find-files-ediff-merge-files) ("Delete File(s) `M-D'" . helm-delete-marked-files) ("Copy file(s) `M-C, C-u to follow'" . helm-find-files-copy) ("Rename file(s) `M-R, C-u to follow'" . helm-find-files-rename) ("Symlink files(s) `M-S, C-u to follow'" . helm-find-files-symlink) ("Relsymlink file(s) `C-u to follow'" . helm-find-files-relsymlink) ("Hardlink file(s) `M-H, C-u to follow'" . helm-find-files-hardlink) ("Find file other window `C-c o'" . find-file-other-window) ("Switch to history `M-p'" . helm-find-files-switch-to-hist) ("Find file other frame `C-c C-o'" . find-file-other-frame) ("Print File `C-c p, C-u to refresh'" . helm-ff-print) ("Locate `C-x C-f, C-u to specify locate db'" . helm-ff-locate)) (persistent-action . helm-find-files-persistent-action) (persistent-help . "Hit1 Expand Candidate, Hit2 or (C-u) Find file") (filtered-candidate-transformer . helm-ff-sort-candidates) (filter-one-by-one . helm-ff-filter-candidate-one-by-one) (action-transformer . helm-find-files-action-transformer) (candidate-number-limit . 9999) (volatile) (match helm-mp-exact-match helm-mp-match) (nohighlight) (mode-line . helm-ff-mode-line-string) (header-line . "C-j: Hit1 Expand Candidate, Hit2 or (C-u) Find file (keeping session)") (dont-plug helm-compile-source--match-plugin helm-compile-source--persistent-help) (matchplugin) (before-init-hook . helm-find-files-before-init-hook) (after-init-hook . helm-find-files-after-init-hook)) helm-find-files-get-candidates)
helm-interpret-value(helm-find-files-get-candidates ((name . "Find Files") (header-name lambda (name) (concat name helm-find-files-doc-header)) (init lambda nil (setq helm-ff-auto-update-flag helm-ff-auto-update-initial-value) (setq helm-ff--auto-update-state helm-ff-auto-update-flag)) (candidates . helm-find-files-get-candidates) (action ("Find File" . helm-find-file-or-marked) ("Find file in Dired" . helm-point-file-in-dired) ("View file" . view-file) ("Checksum File" . helm-ff-checksum) ("Query replace fnames on marked" . helm-ff-query-replace-on-marked) ("Query replace contents on marked" . helm-ff-query-replace) ("Query replace regexp contents on marked" . helm-ff-query-replace-regexp) ("Serial rename files" . helm-ff-serial-rename) ("Serial rename by symlinking files" . helm-ff-serial-rename-by-symlink) ("Serial rename by copying files" . helm-ff-serial-rename-by-copying) ("Open file with default tool" . helm-open-file-with-default-tool) ("Find file in hex dump" . hexl-find-file) ("Browse project" . helm-ff-browse-project) ("Complete at point `C-c i'" . helm-insert-file-name-completion-at-point) ("Insert as org link `C-c @'" . helm-files-insert-as-org-link) ("Find shell command `C-c /'" . helm-ff-find-sh-command) ("Add marked files to file-cache" . helm-ff-cache-add-file) ("Open file externally `C-c C-x, C-u to choose'" . helm-open-file-externally) ("Grep File(s) `C-s, C-u Recurse'" . helm-find-files-grep) ("Zgrep File(s) `M-g z, C-u Recurse'" . helm-ff-zgrep) ("Switch to Eshell `M-e'" . helm-ff-switch-to-eshell) ("Etags `M-., C-u reload tag file'" . helm-ff-etags-select) ("Eshell command on file(s) `M-!, C-u take all marked as arguments.'" . helm-find-files-eshell-command-on-file) ("Find file as root `C-c r'" . helm-find-file-as-root) ("Ediff File `C-='" . helm-find-files-ediff-files) ("Ediff Merge File `C-c ='" . helm-find-files-ediff-merge-files) ("Delete File(s) `M-D'" . helm-delete-marked-files) ("Copy file(s) `M-C, C-u to follow'" . helm-find-files-copy) ("Rename file(s) `M-R, C-u to follow'" . helm-find-files-rename) ("Symlink files(s) `M-S, C-u to follow'" . helm-find-files-symlink) ("Relsymlink file(s) `C-u to follow'" . helm-find-files-relsymlink) ("Hardlink file(s) `M-H, C-u to follow'" . helm-find-files-hardlink) ("Find file other window `C-c o'" . find-file-other-window) ("Switch to history `M-p'" . helm-find-files-switch-to-hist) ("Find file other frame `C-c C-o'" . find-file-other-frame) ("Print File `C-c p, C-u to refresh'" . helm-ff-print) ("Locate `C-x C-f, C-u to specify locate db'" . helm-ff-locate)) (persistent-action . helm-find-files-persistent-action) (persistent-help . "Hit1 Expand Candidate, Hit2 or (C-u) Find file") (filtered-candidate-transformer . helm-ff-sort-candidates) (filter-one-by-one . helm-ff-filter-candidate-one-by-one) (action-transformer . helm-find-files-action-transformer) (candidate-number-limit . 9999) (volatile) (match helm-mp-exact-match helm-mp-match) (nohighlight) (mode-line . helm-ff-mode-line-string) (header-line . "C-j: Hit1 Expand Candidate, Hit2 or (C-u) Find file (keeping session)") (dont-plug helm-compile-source--match-plugin helm-compile-source--persistent-help) (matchplugin) (before-init-hook . helm-find-files-before-init-hook) (after-init-hook . helm-find-files-after-init-hook)))
#[0 "..." [((name . "Find Files") (header-name lambda (name) (concat name helm-find-files-doc-header)) (init lambda nil (setq helm-ff-auto-update-flag helm-ff-auto-update-initial-value) (setq helm-ff--auto-update-state helm-ff-auto-update-flag)) (candidates . helm-find-files-get-candidates) (action ("Find File" . helm-find-file-or-marked) ("Find file in Dired" . helm-point-file-in-dired) ("View file" . view-file) ("Checksum File" . helm-ff-checksum) ("Query replace fnames on marked" . helm-ff-query-replace-on-marked) ("Query replace contents on marked" . helm-ff-query-replace) ("Query replace regexp contents on marked" . helm-ff-query-replace-regexp) ("Serial rename files" . helm-ff-serial-rename) ("Serial rename by symlinking files" . helm-ff-serial-rename-by-symlink) ("Serial rename by copying files" . helm-ff-serial-rename-by-copying) ("Open file with default tool" . helm-open-file-with-default-tool) ("Find file in hex dump" . hexl-find-file) ("Browse project" . helm-ff-browse-project) ("Complete at point `C-c i'" . helm-insert-file-name-completion-at-point) ("Insert as org link `C-c @'" . helm-files-insert-as-org-link) ("Find shell command `C-c /'" . helm-ff-find-sh-command) ("Add marked files to file-cache" . helm-ff-cache-add-file) ("Open file externally `C-c C-x, C-u to choose'" . helm-open-file-externally) ("Grep File(s) `C-s, C-u Recurse'" . helm-find-files-grep) ("Zgrep File(s) `M-g z, C-u Recurse'" . helm-ff-zgrep) ("Switch to Eshell `M-e'" . helm-ff-switch-to-eshell) ("Etags `M-., C-u reload tag file'" . helm-ff-etags-select) ("Eshell command on file(s) `M-!, C-u take all marked as arguments.'" . helm-find-files-eshell-command-on-file) ("Find file as root `C-c r'" . helm-find-file-as-root) ("Ediff File `C-='" . helm-find-files-ediff-files) ("Ediff Merge File `C-c ='" . helm-find-files-ediff-merge-files) ("Delete File(s) `M-D'" . helm-delete-marked-files) ("Copy file(s) `M-C, C-u to follow'" . helm-find-files-copy) ("Rename file(s) `M-R, C-u to follow'" . helm-find-files-rename) ("Symlink files(s) `M-S, C-u to follow'" . helm-find-files-symlink) ("Relsymlink file(s) `C-u to follow'" . helm-find-files-relsymlink) ("Hardlink file(s) `M-H, C-u to follow'" . helm-find-files-hardlink) ("Find file other window `C-c o'" . find-file-other-window) ("Switch to history `M-p'" . helm-find-files-switch-to-hist) ("Find file other frame `C-c C-o'" . find-file-other-frame) ("Print File `C-c p, C-u to refresh'" . helm-ff-print) ("Locate `C-x C-f, C-u to specify locate db'" . helm-ff-locate)) (persistent-action . helm-find-files-persistent-action) (persistent-help . "Hit1 Expand Candidate, Hit2 or (C-u) Find file") (filtered-candidate-transformer . helm-ff-sort-candidates) (filter-one-by-one . helm-ff-filter-candidate-one-by-one) (action-transformer . helm-find-files-action-transformer) (candidate-number-limit . 9999) (volatile) (match helm-mp-exact-match helm-mp-match) (nohighlight) (mode-line . helm-ff-mode-line-string) (header-line . "C-j: Hit1 Expand Candidate, Hit2 or (C-u) Find file (keeping session)") (dont-plug helm-compile-source--match-plugin helm-compile-source--persistent-help) (matchplugin) (before-init-hook . helm-find-files-before-init-hook) (after-init-hook . helm-find-files-after-init-hook)) helm-find-files-get-candidates nil helm-interpret-value] 3 "\n\n(fn)"]()
funcall(#[0 "..." [((name . "Find Files") (header-name lambda (name) (concat name helm-find-files-doc-header)) (init lambda nil (setq helm-ff-auto-update-flag helm-ff-auto-update-initial-value) (setq helm-ff--auto-update-state helm-ff-auto-update-flag)) (candidates . helm-find-files-get-candidates) (action ("Find File" . helm-find-file-or-marked) ("Find file in Dired" . helm-point-file-in-dired) ("View file" . view-file) ("Checksum File" . helm-ff-checksum) ("Query replace fnames on marked" . helm-ff-query-replace-on-marked) ("Query replace contents on marked" . helm-ff-query-replace) ("Query replace regexp contents on marked" . helm-ff-query-replace-regexp) ("Serial rename files" . helm-ff-serial-rename) ("Serial rename by symlinking files" . helm-ff-serial-rename-by-symlink) ("Serial rename by copying files" . helm-ff-serial-rename-by-copying) ("Open file with default tool" . helm-open-file-with-default-tool) ("Find file in hex dump" . hexl-find-file) ("Browse project" . helm-ff-browse-project) ("Complete at point `C-c i'" . helm-insert-file-name-completion-at-point) ("Insert as org link `C-c @'" . helm-files-insert-as-org-link) ("Find shell command `C-c /'" . helm-ff-find-sh-command) ("Add marked files to file-cache" . helm-ff-cache-add-file) ("Open file externally `C-c C-x, C-u to choose'" . helm-open-file-externally) ("Grep File(s) `C-s, C-u Recurse'" . helm-find-files-grep) ("Zgrep File(s) `M-g z, C-u Recurse'" . helm-ff-zgrep) ("Switch to Eshell `M-e'" . helm-ff-switch-to-eshell) ("Etags `M-., C-u reload tag file'" . helm-ff-etags-select) ("Eshell command on file(s) `M-!, C-u take all marked as arguments.'" . helm-find-files-eshell-command-on-file) ("Find file as root `C-c r'" . helm-find-file-as-root) ("Ediff File `C-='" . helm-find-files-ediff-files) ("Ediff Merge File `C-c ='" . helm-find-files-ediff-merge-files) ("Delete File(s) `M-D'" . helm-delete-marked-files) ("Copy file(s) `M-C, C-u to follow'" . helm-find-files-copy) ("Rename file(s) `M-R, C-u to follow'" . helm-find-files-rename) ("Symlink files(s) `M-S, C-u to follow'" . helm-find-files-symlink) ("Relsymlink file(s) `C-u to follow'" . helm-find-files-relsymlink) ("Hardlink file(s) `M-H, C-u to follow'" . helm-find-files-hardlink) ("Find file other window `C-c o'" . find-file-other-window) ("Switch to history `M-p'" . helm-find-files-switch-to-hist) ("Find file other frame `C-c C-o'" . find-file-other-frame) ("Print File `C-c p, C-u to refresh'" . helm-ff-print) ("Locate `C-x C-f, C-u to specify locate db'" . helm-ff-locate)) (persistent-action . helm-find-files-persistent-action) (persistent-help . "Hit1 Expand Candidate, Hit2 or (C-u) Find file") (filtered-candidate-transformer . helm-ff-sort-candidates) (filter-one-by-one . helm-ff-filter-candidate-one-by-one) (action-transformer . helm-find-files-action-transformer) (candidate-number-limit . 9999) (volatile) (match helm-mp-exact-match helm-mp-match) (nohighlight) (mode-line . helm-ff-mode-line-string) (header-line . "C-j: Hit1 Expand Candidate, Hit2 or (C-u) Find file (keeping session)") (dont-plug helm-compile-source--match-plugin helm-compile-source--persistent-help) (matchplugin) (before-init-hook . helm-find-files-before-init-hook) (after-init-hook . helm-find-files-after-init-hook)) helm-find-files-get-candidates nil helm-interpret-value] 3 "\n\n(fn)"])
helm-get-candidates(((name . "Find Files") (header-name lambda (name) (concat name helm-find-files-doc-header)) (init lambda nil (setq helm-ff-auto-update-flag helm-ff-auto-update-initial-value) (setq helm-ff--auto-update-state helm-ff-auto-update-flag)) (candidates . helm-find-files-get-candidates) (action ("Find File" . helm-find-file-or-marked) ("Find file in Dired" . helm-point-file-in-dired) ("View file" . view-file) ("Checksum File" . helm-ff-checksum) ("Query replace fnames on marked" . helm-ff-query-replace-on-marked) ("Query replace contents on marked" . helm-ff-query-replace) ("Query replace regexp contents on marked" . helm-ff-query-replace-regexp) ("Serial rename files" . helm-ff-serial-rename) ("Serial rename by symlinking files" . helm-ff-serial-rename-by-symlink) ("Serial rename by copying files" . helm-ff-serial-rename-by-copying) ("Open file with default tool" . helm-open-file-with-default-tool) ("Find file in hex dump" . hexl-find-file) ("Browse project" . helm-ff-browse-project) ("Complete at point `C-c i'" . helm-insert-file-name-completion-at-point) ("Insert as org link `C-c @'" . helm-files-insert-as-org-link) ("Find shell command `C-c /'" . helm-ff-find-sh-command) ("Add marked files to file-cache" . helm-ff-cache-add-file) ("Open file externally `C-c C-x, C-u to choose'" . helm-open-file-externally) ("Grep File(s) `C-s, C-u Recurse'" . helm-find-files-grep) ("Zgrep File(s) `M-g z, C-u Recurse'" . helm-ff-zgrep) ("Switch to Eshell `M-e'" . helm-ff-switch-to-eshell) ("Etags `M-., C-u reload tag file'" . helm-ff-etags-select) ("Eshell command on file(s) `M-!, C-u take all marked as arguments.'" . helm-find-files-eshell-command-on-file) ("Find file as root `C-c r'" . helm-find-file-as-root) ("Ediff File `C-='" . helm-find-files-ediff-files) ("Ediff Merge File `C-c ='" . helm-find-files-ediff-merge-files) ("Delete File(s) `M-D'" . helm-delete-marked-files) ("Copy file(s) `M-C, C-u to follow'" . helm-find-files-copy) ("Rename file(s) `M-R, C-u to follow'" . helm-find-files-rename) ("Symlink files(s) `M-S, C-u to follow'" . helm-find-files-symlink) ("Relsymlink file(s) `C-u to follow'" . helm-find-files-relsymlink) ("Hardlink file(s) `M-H, C-u to follow'" . helm-find-files-hardlink) ("Find file other window `C-c o'" . find-file-other-window) ("Switch to history `M-p'" . helm-find-files-switch-to-hist) ("Find file other frame `C-c C-o'" . find-file-other-frame) ("Print File `C-c p, C-u to refresh'" . helm-ff-print) ("Locate `C-x C-f, C-u to specify locate db'" . helm-ff-locate)) (persistent-action . helm-find-files-persistent-action) (persistent-help . "Hit1 Expand Candidate, Hit2 or (C-u) Find file") (filtered-candidate-transformer . helm-ff-sort-candidates) (filter-one-by-one . helm-ff-filter-candidate-one-by-one) (action-transformer . helm-find-files-action-transformer) (candidate-number-limit . 9999) (volatile) (match helm-mp-exact-match helm-mp-match) (nohighlight) (mode-line . helm-ff-mode-line-string) (header-line . "C-j: Hit1 Expand Candidate, Hit2 or (C-u) Find file (keeping session)") (dont-plug helm-compile-source--match-plugin helm-compile-source--persistent-help) (matchplugin) (before-init-hook . helm-find-files-before-init-hook) (after-init-hook . helm-find-files-after-init-hook)))
helm-get-cached-candidates(((name . "Find Files") (header-name lambda (name) (concat name helm-find-files-doc-header)) (init lambda nil (setq helm-ff-auto-update-flag helm-ff-auto-update-initial-value) (setq helm-ff--auto-update-state helm-ff-auto-update-flag)) (candidates . helm-find-files-get-candidates) (action ("Find File" . helm-find-file-or-marked) ("Find file in Dired" . helm-point-file-in-dired) ("View file" . view-file) ("Checksum File" . helm-ff-checksum) ("Query replace fnames on marked" . helm-ff-query-replace-on-marked) ("Query replace contents on marked" . helm-ff-query-replace) ("Query replace regexp contents on marked" . helm-ff-query-replace-regexp) ("Serial rename files" . helm-ff-serial-rename) ("Serial rename by symlinking files" . helm-ff-serial-rename-by-symlink) ("Serial rename by copying files" . helm-ff-serial-rename-by-copying) ("Open file with default tool" . helm-open-file-with-default-tool) ("Find file in hex dump" . hexl-find-file) ("Browse project" . helm-ff-browse-project) ("Complete at point `C-c i'" . helm-insert-file-name-completion-at-point) ("Insert as org link `C-c @'" . helm-files-insert-as-org-link) ("Find shell command `C-c /'" . helm-ff-find-sh-command) ("Add marked files to file-cache" . helm-ff-cache-add-file) ("Open file externally `C-c C-x, C-u to choose'" . helm-open-file-externally) ("Grep File(s) `C-s, C-u Recurse'" . helm-find-files-grep) ("Zgrep File(s) `M-g z, C-u Recurse'" . helm-ff-zgrep) ("Switch to Eshell `M-e'" . helm-ff-switch-to-eshell) ("Etags `M-., C-u reload tag file'" . helm-ff-etags-select) ("Eshell command on file(s) `M-!, C-u take all marked as arguments.'" . helm-find-files-eshell-command-on-file) ("Find file as root `C-c r'" . helm-find-file-as-root) ("Ediff File `C-='" . helm-find-files-ediff-files) ("Ediff Merge File `C-c ='" . helm-find-files-ediff-merge-files) ("Delete File(s) `M-D'" . helm-delete-marked-files) ("Copy file(s) `M-C, C-u to follow'" . helm-find-files-copy) ("Rename file(s) `M-R, C-u to follow'" . helm-find-files-rename) ("Symlink files(s) `M-S, C-u to follow'" . helm-find-files-symlink) ("Relsymlink file(s) `C-u to follow'" . helm-find-files-relsymlink) ("Hardlink file(s) `M-H, C-u to follow'" . helm-find-files-hardlink) ("Find file other window `C-c o'" . find-file-other-window) ("Switch to history `M-p'" . helm-find-files-switch-to-hist) ("Find file other frame `C-c C-o'" . find-file-other-frame) ("Print File `C-c p, C-u to refresh'" . helm-ff-print) ("Locate `C-x C-f, C-u to specify locate db'" . helm-ff-locate)) (persistent-action . helm-find-files-persistent-action) (persistent-help . "Hit1 Expand Candidate, Hit2 or (C-u) Find file") (filtered-candidate-transformer . helm-ff-sort-candidates) (filter-one-by-one . helm-ff-filter-candidate-one-by-one) (action-transformer . helm-find-files-action-transformer) (candidate-number-limit . 9999) (volatile) (match helm-mp-exact-match helm-mp-match) (nohighlight) (mode-line . helm-ff-mode-line-string) (header-line . "C-j: Hit1 Expand Candidate, Hit2 or (C-u) Find file (keeping session)") (dont-plug helm-compile-source--match-plugin helm-compile-source--persistent-help) (matchplugin) (before-init-hook . helm-find-files-before-init-hook) (after-init-hook . helm-find-files-after-init-hook)))
helm-compute-matches(((name . "Find Files") (header-name lambda (name) (concat name helm-find-files-doc-header)) (init lambda nil (setq helm-ff-auto-update-flag helm-ff-auto-update-initial-value) (setq helm-ff--auto-update-state helm-ff-auto-update-flag)) (candidates . helm-find-files-get-candidates) (action ("Find File" . helm-find-file-or-marked) ("Find file in Dired" . helm-point-file-in-dired) ("View file" . view-file) ("Checksum File" . helm-ff-checksum) ("Query replace fnames on marked" . helm-ff-query-replace-on-marked) ("Query replace contents on marked" . helm-ff-query-replace) ("Query replace regexp contents on marked" . helm-ff-query-replace-regexp) ("Serial rename files" . helm-ff-serial-rename) ("Serial rename by symlinking files" . helm-ff-serial-rename-by-symlink) ("Serial rename by copying files" . helm-ff-serial-rename-by-copying) ("Open file with default tool" . helm-open-file-with-default-tool) ("Find file in hex dump" . hexl-find-file) ("Browse project" . helm-ff-browse-project) ("Complete at point `C-c i'" . helm-insert-file-name-completion-at-point) ("Insert as org link `C-c @'" . helm-files-insert-as-org-link) ("Find shell command `C-c /'" . helm-ff-find-sh-command) ("Add marked files to file-cache" . helm-ff-cache-add-file) ("Open file externally `C-c C-x, C-u to choose'" . helm-open-file-externally) ("Grep File(s) `C-s, C-u Recurse'" . helm-find-files-grep) ("Zgrep File(s) `M-g z, C-u Recurse'" . helm-ff-zgrep) ("Switch to Eshell `M-e'" . helm-ff-switch-to-eshell) ("Etags `M-., C-u reload tag file'" . helm-ff-etags-select) ("Eshell command on file(s) `M-!, C-u take all marked as arguments.'" . helm-find-files-eshell-command-on-file) ("Find file as root `C-c r'" . helm-find-file-as-root) ("Ediff File `C-='" . helm-find-files-ediff-files) ("Ediff Merge File `C-c ='" . helm-find-files-ediff-merge-files) ("Delete File(s) `M-D'" . helm-delete-marked-files) ("Copy file(s) `M-C, C-u to follow'" . helm-find-files-copy) ("Rename file(s) `M-R, C-u to follow'" . helm-find-files-rename) ("Symlink files(s) `M-S, C-u to follow'" . helm-find-files-symlink) ("Relsymlink file(s) `C-u to follow'" . helm-find-files-relsymlink) ("Hardlink file(s) `M-H, C-u to follow'" . helm-find-files-hardlink) ("Find file other window `C-c o'" . find-file-other-window) ("Switch to history `M-p'" . helm-find-files-switch-to-hist) ("Find file other frame `C-c C-o'" . find-file-other-frame) ("Print File `C-c p, C-u to refresh'" . helm-ff-print) ("Locate `C-x C-f, C-u to specify locate db'" . helm-ff-locate)) (persistent-action . helm-find-files-persistent-action) (persistent-help . "Hit1 Expand Candidate, Hit2 or (C-u) Find file") (filtered-candidate-transformer . helm-ff-sort-candidates) (filter-one-by-one . helm-ff-filter-candidate-one-by-one) (action-transformer . helm-find-files-action-transformer) (candidate-number-limit . 9999) (volatile) (match helm-mp-exact-match helm-mp-match) (nohighlight) (mode-line . helm-ff-mode-line-string) (header-line . "C-j: Hit1 Expand Candidate, Hit2 or (C-u) Find file (keeping session)") (dont-plug helm-compile-source--match-plugin helm-compile-source--persistent-help) (matchplugin) (before-init-hook . helm-find-files-before-init-hook) (after-init-hook . helm-find-files-after-init-hook)))
helm--compute-sources((((name . "Find Files") (header-name lambda (name) (concat name helm-find-files-doc-header)) (init lambda nil (setq helm-ff-auto-update-flag helm-ff-auto-update-initial-value) (setq helm-ff--auto-update-state helm-ff-auto-update-flag)) (candidates . helm-find-files-get-candidates) (action ("Find File" . helm-find-file-or-marked) ("Find file in Dired" . helm-point-file-in-dired) ("View file" . view-file) ("Checksum File" . helm-ff-checksum) ("Query replace fnames on marked" . helm-ff-query-replace-on-marked) ("Query replace contents on marked" . helm-ff-query-replace) ("Query replace regexp contents on marked" . helm-ff-query-replace-regexp) ("Serial rename files" . helm-ff-serial-rename) ("Serial rename by symlinking files" . helm-ff-serial-rename-by-symlink) ("Serial rename by copying files" . helm-ff-serial-rename-by-copying) ("Open file with default tool" . helm-open-file-with-default-tool) ("Find file in hex dump" . hexl-find-file) ("Browse project" . helm-ff-browse-project) ("Complete at point `C-c i'" . helm-insert-file-name-completion-at-point) ("Insert as org link `C-c @'" . helm-files-insert-as-org-link) ("Find shell command `C-c /'" . helm-ff-find-sh-command) ("Add marked files to file-cache" . helm-ff-cache-add-file) ("Open file externally `C-c C-x, C-u to choose'" . helm-open-file-externally) ("Grep File(s) `C-s, C-u Recurse'" . helm-find-files-grep) ("Zgrep File(s) `M-g z, C-u Recurse'" . helm-ff-zgrep) ("Switch to Eshell `M-e'" . helm-ff-switch-to-eshell) ("Etags `M-., C-u reload tag file'" . helm-ff-etags-select) ("Eshell command on file(s) `M-!, C-u take all marked as arguments.'" . helm-find-files-eshell-command-on-file) ("Find file as root `C-c r'" . helm-find-file-as-root) ("Ediff File `C-='" . helm-find-files-ediff-files) ("Ediff Merge File `C-c ='" . helm-find-files-ediff-merge-files) ("Delete File(s) `M-D'" . helm-delete-marked-files) ("Copy file(s) `M-C, C-u to follow'" . helm-find-files-copy) ("Rename file(s) `M-R, C-u to follow'" . helm-find-files-rename) ("Symlink files(s) `M-S, C-u to follow'" . helm-find-files-symlink) ("Relsymlink file(s) `C-u to follow'" . helm-find-files-relsymlink) ("Hardlink file(s) `M-H, C-u to follow'" . helm-find-files-hardlink) ("Find file other window `C-c o'" . find-file-other-window) ("Switch to history `M-p'" . helm-find-files-switch-to-hist) ("Find file other frame `C-c C-o'" . find-file-other-frame) ("Print File `C-c p, C-u to refresh'" . helm-ff-print) ("Locate `C-x C-f, C-u to specify locate db'" . helm-ff-locate)) (persistent-action . helm-find-files-persistent-action) (persistent-help . "Hit1 Expand Candidate, Hit2 or (C-u) Find file") (filtered-candidate-transformer . helm-ff-sort-candidates) (filter-one-by-one . helm-ff-filter-candidate-one-by-one) (action-transformer . helm-find-files-action-transformer) (candidate-number-limit . 9999) (volatile) (match helm-mp-exact-match helm-mp-match) (nohighlight) (mode-line . helm-ff-mode-line-string) (header-line . "C-j: Hit1 Expand Candidate, Hit2 or (C-u) Find file (keeping session)") (dont-plug helm-compile-source--match-plugin helm-compile-source--persistent-help) (matchplugin) (before-init-hook . helm-find-files-before-init-hook) (after-init-hook . helm-find-files-after-init-hook))))
helm-update()
helm-check-new-input("/ssh:server|su:server:")
helm-check-minibuffer-input()
byte-code("..." [timer apply 5 6] 4)
...
...
...
helm-find-files-1("/home/user/" nil)
helm-find-files(nil)
call-interactively(helm-find-files nil nil)
command-execute(helm-find-files)
ecraven [email protected] writes:
When trying to open /ssh:server|su:server:/, Helm only sends
"/su:server:/" to tramp. Handling of multi-hop file paths seems to be
incorrect. Things work fine with plain emacs (no helm).
This is just not supported by helm (and will not),
please use `tramp-default-proxies-alist'.
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
Is there a way to conditionally disable helm if file path contains | or something similar? it would be good enough not to have completion, if I just get the right end result...
ecraven [email protected] writes:
Is there a way to conditionally disable helm if file path contains |
or something similar? it would be good enough not to have completion,
if I just get the right end result...
I don't know what you are using to find files.
1) If you use M-x helm-find-files, setup `tramp-default-proxies-alist'
in you init file:
(add-to-list 'tramp-default-proxies-alist
'("`your_remote_server\'" "\`root\'" "/ssh:%h:"))
Then you can do M-x helm-find-files => /sudo:your_remote_server:
2) If you are using M-x find-file with helm-mode enabled,
`tramp-default-proxies-alist' will work fine, but if you really want to
use the new multihop syntax (inconvenient IMO) disable helm for this
function:
(add-to-list 'helm-completing-read-handlers-alist '(find-file . nil))
After evaling this, M-x find-file will not use helm completion.
PS: I assume that if one is allowed to open files as root on a remote
server, he is familiar to this server and connect often to it, in this
case having tramp-default-proxies-alist set for this server is a good
idea.
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
ok, thank you very much for your explanations!
Is this very difficult to implement? I'm working with a large number of rapidly changing hosts, and I would spend more time managing my tramp-default-proxies-alist than doing actual work.
The first ten time I did this or so, and helm didn't work, I was really surprised.
Love Helm! Love Multi-hop
They don't love each other :-(
Here's a little function to switch back to the default find-file.
``````
;; Add function to fall back to default find-file
(defun old-ff (&optional no-op) (interactive)
(add-to-list 'helm-completing-read-handlers-alist '(find-file . nil))
(call-interactively 'find-file)
(delete '(find-file . nil) helm-completing-read-handlers-alist))
(helm-add-action-to-source "Fallback find-file" 'old-ff helm-source-find-files)
(define-key helm-map (kbd "C-q")
(lambda () (interactive)
(helm-quit-and-execute-action 'old-ff)))```
``````
Using thierryvolpiatto suggestion I wrote the following:
> (add-to-list 'tramp-default-proxies-alist
> '(nil "\\`root\\'" "/ssh:%h:") ;; https://github.com/emacs-helm/helm/issues/981
> ))
This causes sudo on any remote host, which is great. The problem is that it breaks sudo on my own machine (via C-f \sudo::/var/log/whatever.log); any suggestions on how to fix this would be much appreciated.
Tory S. Anderson [email protected] writes:
Using thierryvolpiatto suggestion I wrote the following:
(add-to-list 'tramp-default-proxies-alist
'(nil "`root\'" "/ssh:%h:") ;; https://github.com/emacs-helm/helm/issues/981
))This causes sudo on any remote host,
No, only is you use "/sudo:remote_host:".
which is great. The problem is that it breaks sudo on my own machine
I use this always and it breaks nothing.
Please tell me what is broken, recipe, backtrace or whatever that
could help me to understand your problem, "it breaks" means nothing.
Which emacs version ?
NOTE: Reading a remote password with helm version 2.0 and an emacs
version < to 24.5 is no more possible.
Thierry
Version: emacs 24.5.1
Yeah, /sudo:<remote>:<path> works nicely. But when I try to /sudo::<local_path> it doesn't work, and is trying to ssh to my own computer.
Recipe:
<C-f>/sudo:: ;; lags indefinitely, eventually afils with an error about ssh to local host
Tory S. Anderson [email protected] writes:
Using thierryvolpiatto suggestion I wrote the following:
I never write this, please read carefully the post, I wrote:
(add-to-list 'tramp-default-proxies-alist
'("\\`your_remote_server\\'" "\\`root\\'" "/ssh:%h:"))
Where your_remote_server is a valid remote server.
See the man page of tramp about this.
(add-to-list 'tramp-default-proxies-alist
'(nil "`root\'" "/ssh:%h:") ;; https://github.com/emacs-helm/helm/issues/981
))
So nil here is not enough IMO.
FYI I replace nil by a ssh shortcut from my .ssh/config file.
Thierry
thierryvopiatto -- Yes, understood. I used "nil" so it would SUDO anywhere I tried, because as with PythonNut above, I work on too many servers too rapidly changing for adding an entry for each one to be worthwhile. "nil" matches everything, which works great EXCEPT for my localhost situation (where trying to ssh to localhost just doesn't work)
Tory S. Anderson [email protected] writes:
thierryvopiatto -- Yes, understood. I used "nil" so it would SUDO
anywhere I tried, because as with PythonNut above, I work on too many
servers too rapidly changing for adding an entry for each one to be
worthwhile. "nil" matches everything, which works great EXCEPT for my
localhost situation (where trying to ssh to localhost just doesn't
work)
So this is more a problem with tramp than with helm itself, perhaps you
could ask the tramp mailing list for help about this.
Thierry
@WorldsEndless I guess you forgot to add a nil rule to your own system:
(add-to-list 'tramp-default-proxies-alist
'((regexp-quote (system-name)) nil nil))
Most helpful comment
ecraven [email protected] writes:
I don't know what you are using to find files.
1) If you use M-x helm-find-files, setup `tramp-default-proxies-alist'
in you init file:
(add-to-list 'tramp-default-proxies-alist
'("`your_remote_server\'" "\`root\'" "/ssh:%h:"))
Then you can do M-x helm-find-files => /sudo:your_remote_server:
2) If you are using M-x find-file with helm-mode enabled,
`tramp-default-proxies-alist' will work fine, but if you really want to
use the new multihop syntax (inconvenient IMO) disable helm for this
function:
(add-to-list 'helm-completing-read-handlers-alist '(find-file . nil))
After evaling this, M-x find-file will not use helm completion.
PS: I assume that if one is allowed to open files as root on a remote
server, he is familiar to this server and connect often to it, in this
case having tramp-default-proxies-alist set for this server is a good
idea.
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997