all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#31704: 26.1; tramp-remote-path/shell: broken executable completion
@ 2018-06-04  1:32 xristos
  2018-06-05  9:58 ` Michael Albinus
  2018-07-25  3:24 ` bug#31704: fixed commit not handle eshell-path-env properly in Windows platform fangtao0901
  0 siblings, 2 replies; 9+ messages in thread
From: xristos @ 2018-06-04  1:32 UTC (permalink / raw)
  To: 31704

The issue lies in shell--command-completion-data which is called
by shell-command-completion, it only checks directories in
exec-path (local) rather than tramp-remote-path. This bug also
leaks the local exec-path to the remote server.

To reproduce:

emacs -Q

Evaluate:
(require 'tramp)

;; For debugging
(setq tramp-persistency-file-name nil
      tramp-verbose 10)

(add-to-list 'tramp-remote-path 'tramp-own-remote-path)

;; Assuming an account 'chris' exists at server 'remote',
;; to see the issue clearly make sure that there exists
;; a directory in the remote server PATH (e.g. ~/bin/)
;; but NOT in exec-path.

(let ((default-directory "/ssh:chris@remote:"))
  (shell "*remote*"))

;; Assuming executable 'testbin' exists in remote server ~/bin/
;; and not inside any directory in exec-path:

remote$ testb<TAB> ;; No completion

M-:
(add-to-list 'exec-path "~/bin/")

remote$ testb<TAB> ;; Completes fine

If one checks the tramp debug buffer, one will see tramp
checking (and leaking information to the remote server)
all the directories that exist in the local exec-path.






^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-09-10  7:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-04  1:32 bug#31704: 26.1; tramp-remote-path/shell: broken executable completion xristos
2018-06-05  9:58 ` Michael Albinus
2018-06-20 10:17   ` Michael Albinus
2018-07-25  3:24 ` bug#31704: fixed commit not handle eshell-path-env properly in Windows platform fangtao0901
2018-07-25  9:03   ` Michael Albinus
2018-07-26  4:37     ` Tao Fang
2018-09-06 10:21       ` Michael Albinus
2018-09-10  0:50         ` Tao Fang
2018-09-10  7:54           ` Michael Albinus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.