unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
@ 2023-08-17 18:01 Michael Albinus
  2023-08-18  3:31 ` Jim Porter
  0 siblings, 1 reply; 18+ messages in thread
From: Michael Albinus @ 2023-08-17 18:01 UTC (permalink / raw)
  To: 65356; +Cc: Jim Porter

[-- Attachment #1: Type: text/plain, Size: 13415 bytes --]


When we open a file with find-file, the minibuffer offers method, user
name and host name completion for remote files. That is, after typing
"C-x C-f /ss TAB" we're offered with the completions "ssh:", "sshfs:"
and "sshx:". Same for user name and host name.

In eshell, this feature does not exist. I would like if I could type
"cd /ss TAB" and could see the same offering of "ssh:", "sshfs:" and
"sshx:". Same for user name and host name.

The appended patch does this for me. I have no idea how good it fits
into the eshell machinery, for example whether there are problems with
the em-elecslash.el module. Comments welcome!

Disclaimer: The idea has appeared on
<https://emacs.stackexchange.com/questions/78479/can-eshell-provide-tramp-auto-completion>.

Best regards, Michael.


In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.17.8) of 2023-08-15 built on gandalf
Repository revision: 5c101b1adac2b4f3cc4e08a6492b406952c529f3
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12201009
System Description: Fedora Linux 38 (Workstation Edition)

Configured using:
 'configure --with-tree-sitter'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8

Major mode: ELisp/l

Minor modes in effect:
  debbugs-browse-mode: t
  bug-reference-prog-mode: t
  display-time-mode: t
  delete-selection-mode: t
  icomplete-mode: t
  global-goto-address-mode: t
  goto-address-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/albinus/src/elpa/packages/debbugs/debbugs hides /home/albinus/.emacs.d/elpa/debbugs-0.36/debbugs
/home/albinus/src/elpa/packages/debbugs/debbugs-org hides /home/albinus/.emacs.d/elpa/debbugs-0.36/debbugs-org
/home/albinus/src/elpa/packages/debbugs/debbugs-gnu hides /home/albinus/.emacs.d/elpa/debbugs-0.36/debbugs-gnu
/home/albinus/src/elpa/packages/debbugs/debbugs-guix hides /home/albinus/.emacs.d/elpa/debbugs-0.36/debbugs-guix
/home/albinus/src/elpa/packages/debbugs/debbugs-browse hides /home/albinus/.emacs.d/elpa/debbugs-0.36/debbugs-browse
/home/albinus/src/elpa/packages/debbugs/debbugs-pkg hides /home/albinus/.emacs.d/elpa/debbugs-0.36/debbugs-pkg
/home/albinus/src/elpa/packages/debbugs/debbugs-autoloads hides /home/albinus/.emacs.d/elpa/debbugs-0.36/debbugs-autoloads
/home/albinus/src/elpa/packages/debbugs/debbugs-compat hides /home/albinus/.emacs.d/elpa/debbugs-0.36/debbugs-compat
~/lisp/telepathy hides /home/albinus/.emacs.d/elpa/telepathy-20131209.1258/telepathy
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-autoloads hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-autoloads
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-pkg hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-pkg
/home/albinus/.emacs.d/elpa/hydra-0.15.0/lv hides /home/albinus/.emacs.d/elpa/lv-0.15.0/lv
/home/albinus/src/tramp/lisp/tramp-sh hides /usr/local/share/emacs/site-lisp/tramp-sh
/home/albinus/src/tramp/lisp/tramp-cmds hides /usr/local/share/emacs/site-lisp/tramp-cmds
/home/albinus/src/tramp/lisp/tramp-gvfs hides /usr/local/share/emacs/site-lisp/tramp-gvfs
/home/albinus/src/tramp/lisp/tramp-ftp hides /usr/local/share/emacs/site-lisp/tramp-ftp
/home/albinus/src/tramp/lisp/tramp-crypt hides /usr/local/share/emacs/site-lisp/tramp-crypt
/home/albinus/src/tramp/lisp/tramp-adb hides /usr/local/share/emacs/site-lisp/tramp-adb
/home/albinus/src/tramp/lisp/tramp hides /usr/local/share/emacs/site-lisp/tramp
/home/albinus/src/tramp/lisp/tramp-cache hides /usr/local/share/emacs/site-lisp/tramp-cache
/home/albinus/src/tramp/lisp/tramp-rclone hides /usr/local/share/emacs/site-lisp/tramp-rclone
/home/albinus/src/tramp/lisp/tramp-compat hides /usr/local/share/emacs/site-lisp/tramp-compat
/home/albinus/src/tramp/lisp/tramp-integration hides /usr/local/share/emacs/site-lisp/tramp-integration
/home/albinus/src/tramp/lisp/tramp-archive hides /usr/local/share/emacs/site-lisp/tramp-archive
/home/albinus/src/tramp/lisp/tramp-sudoedit hides /usr/local/share/emacs/site-lisp/tramp-sudoedit
/home/albinus/src/tramp/lisp/tramp-loaddefs hides /usr/local/share/emacs/site-lisp/tramp-loaddefs
/home/albinus/src/tramp/lisp/tramp-uu hides /usr/local/share/emacs/site-lisp/tramp-uu
/home/albinus/src/tramp/lisp/tramp-smb hides /usr/local/share/emacs/site-lisp/tramp-smb
/home/albinus/src/tramp/lisp/trampver hides /usr/local/share/emacs/site-lisp/trampver
/home/albinus/.emacs.d/elpa/transient-20230602.2121/transient hides /usr/local/share/emacs/30.0.50/lisp/transient
~/lisp/dbus hides /usr/local/share/emacs/30.0.50/lisp/net/dbus
/home/albinus/src/tramp/lisp/tramp-sh hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-sh
/home/albinus/src/tramp/lisp/tramp-fuse hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-fuse
/home/albinus/src/tramp/lisp/tramp-loaddefs hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-loaddefs
/home/albinus/src/tramp/lisp/tramp-ftp hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-ftp
/home/albinus/src/tramp/lisp/tramp hides /usr/local/share/emacs/30.0.50/lisp/net/tramp
/home/albinus/src/tramp/lisp/tramp-cache hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-cache
/home/albinus/src/tramp/lisp/tramp-uu hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-uu
/home/albinus/src/tramp/lisp/tramp-rclone hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-rclone
/home/albinus/src/tramp/lisp/tramp-integration hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-integration
/home/albinus/src/tramp/lisp/tramp-archive hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-archive
/home/albinus/src/tramp/lisp/tramp-adb hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-adb
/home/albinus/src/tramp/lisp/tramp-cmds hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-cmds
/home/albinus/src/tramp/lisp/tramp-compat hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-compat
/home/albinus/src/tramp/lisp/tramp-sudoedit hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-sudoedit
/home/albinus/src/tramp/lisp/tramp-container hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-container
/home/albinus/src/tramp/lisp/tramp-gvfs hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-gvfs
/home/albinus/src/tramp/lisp/tramp-crypt hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-crypt
/home/albinus/src/tramp/lisp/tramp-message hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-message
/home/albinus/src/tramp/lisp/tramp-smb hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-smb
/home/albinus/src/tramp/lisp/trampver hides /usr/local/share/emacs/30.0.50/lisp/net/trampver
/home/albinus/src/tramp/lisp/tramp-sshfs hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-sshfs

Features:
(shadow sort mail-extr warnings emacsbug message yank-media puny rfc822
mml mml-sec epa derived epg rfc6068 epg-config gnus-util mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
cl-print cl-extra find-func shortdoc em-xtra em-unix em-tramp em-term
term disp-table ehelp em-script em-prompt em-pred em-ls em-hist em-glob
em-cmpl em-dirs em-basic em-banner em-alias esh-mode esh-var eshell
esh-cmd generator esh-ext esh-opt esh-proc esh-io esh-arg esh-module
esh-groups esh-util help-fns radix-tree mule-util display-line-numbers
pulse color find-dired xref project grep compile text-property-search
misearch multi-isearch ediff-vers ediff ediff-merg ediff-mult ediff-wind
ediff-diff ediff-help ediff-init ediff-util vc-git diff-mode easy-mmode
debbugs-browse bug-reference dired-aux face-remap ob-shell ob ob-tangle
ol org-src ob-ref ob-lob ob-table ob-exp ob-comint ob-core org-cycle
org-fold org-fold-core ob-eval org-keys oc org-compat org-version
org-macs vc vc-dispatcher time tramp-cache time-stamp tramp-sh lxc-tramp
lxd-tramp tramp trampver tramp-integration files-x tramp-message
help-mode tramp-compat xdg shell pcomplete comint ansi-osc ring
parse-time iso8601 time-date format-spec ansi-color tramp-loaddefs rx
delsel ido jka-compr icomplete cus-edit pp cus-load icons wid-edit dired
dired-loaddefs goto-addr thingatpt alert-autoloads
android-mode-autoloads auth-source-gopass-autoloads
auth-source-keytar-autoloads auth-source-kwallet-autoloads
auth-source-xoauth2-autoloads auto-sudoedit-autoloads
auto-virtualenv-autoloads auto-virtualenvwrapper-autoloads
clang-format-autoloads company-shell-autoloads company-autoloads
counsel-toki-autoloads counsel-tramp-autoloads counsel-autoloads
dbus-codegen-autoloads debbugs-autoloads dired-du-autoloads
dired-rsync-autoloads direnv-autoloads disk-usage-autoloads
dockerfile-mode-autoloads ednc-autoloads el-get-autoloads
envrc-autoloads exec-path-from-shell-autoloads fontaine-autoloads
forge-autoloads closql-autoloads emacsql-autoloads
friendly-tramp-path-autoloads ggtags-autoloads ghub-autoloads
gited-autoloads gitlab-ci-mode-flycheck-autoloads
gitlab-ci-mode-autoloads flycheck-autoloads gntp-autoloads
gnus-desktop-notify-autoloads helm-gitlab-autoloads
helm-projectile-autoloads helm-autoloads helm-core-autoloads
async-autoloads ibuffer-tramp-autoloads inheritenv-autoloads
ivy-gitlab-autoloads gitlab-autoloads jarchive-autoloads
journalctl-mode-autoloads keepass-mode-autoloads keytar-autoloads
kubel-autoloads kubernetes-autoloads log4e-autoloads lsp-java-autoloads
dap-mode-autoloads lsp-docker-autoloads bui-autoloads
lsp-treemacs-autoloads lsp-mode-autoloads lxc-tramp-autoloads
lxd-tramp-autoloads magit-filenotify-autoloads magit-autoloads pcase
git-commit-autoloads magit-popup-autoloads magit-section-autoloads
marcopolo-autoloads nexus-autoloads nnir-est-autoloads oauth2-autoloads
ob-restclient-autoloads orderless-autoloads org-tree-slide-autoloads
pkg-info-autoloads epl-autoloads popup-autoloads projectile-autoloads
promise-autoloads pyenv-mode-autoloads pylint-autoloads
python-environment-autoloads deferred-autoloads pythonic-autoloads
f-autoloads pyvenv-autoloads recentf-remove-sudo-tramp-prefix-autoloads
relint-autoloads request-autoloads restclient-test-autoloads
restclient-autoloads s3ed-autoloads finder-inf slime-autoloads
macrostep-autoloads spinner-autoloads ssh-deploy-autoloads
swiper-autoloads ivy-autoloads sx-autoloads markdown-mode-autoloads
telepathy-autoloads tramp-theme-autoloads transient-dwim-autoloads
transient-autoloads treemacs-autoloads cfrs-autoloads posframe-autoloads
ht-autoloads pfuture-autoloads ace-window-autoloads avy-autoloads
treepy-autoloads urgrep-autoloads uuid-autoloads vdiff-autoloads
hydra-autoloads lv-autoloads vertico-autoloads virtualenv-autoloads
virtualenvwrapper-autoloads s-autoloads dash-autoloads
web-server-autoloads with-editor-autoloads info compat-autoloads
xr-autoloads yaml-autoloads yaml-mode-autoloads package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x
map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process emacs)

Memory information:
((conses 16 234759 52920) (symbols 48 19742 1) (strings 32 66564 4085)
 (string-bytes 1 2281459) (vectors 16 40066)
 (vector-slots 8 1166864 141729) (floats 8 244 2758)
 (intervals 56 11249 545) (buffers 992 27))


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1264 bytes --]

diff --git a/lisp/eshell/em-tramp.el b/lisp/eshell/em-tramp.el
index 94eb9797033..c90e689f6de 100644
--- a/lisp/eshell/em-tramp.el
+++ b/lisp/eshell/em-tramp.el
@@ -51,11 +51,23 @@ eshell-tramp-initialize
   "Initialize the Tramp-using commands code."
   (when (eshell-using-module 'eshell-cmpl)
     (add-hook 'pcomplete-try-first-hook
-	      'eshell-complete-host-reference nil t))
+              'eshell-complete-partial-tramp-file-name))
   (setq-local eshell-complex-commands
               (append '("su" "sudo" "doas")
                       eshell-complex-commands)))

+(defun eshell-complete-partial-tramp-file-name ()
+  "Complete a partial Tramp file name (method, user name, hostname)."
+  (let ((arg (pcomplete-actual-arg))
+        (non-essential t)
+        (minibuffer-completing-file-name t))
+    (when (string-match tramp-completion-file-name-regexp arg)
+      (setq pcomplete-stub (substring arg (length tramp-prefix-format))
+            pcomplete-last-completion-raw t
+            pcomplete-termination-string "")
+      (throw 'pcomplete-completions
+             (file-name-all-completions pcomplete-stub tramp-prefix-format)))))
+
 (autoload 'eshell-parse-command "esh-cmd")

 (defun eshell/su (&rest args)

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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-17 18:01 bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell Michael Albinus
@ 2023-08-18  3:31 ` Jim Porter
  2023-08-18  6:45   ` Michael Albinus
  0 siblings, 1 reply; 18+ messages in thread
From: Jim Porter @ 2023-08-18  3:31 UTC (permalink / raw)
  To: Michael Albinus, 65356; +Cc: monnier

X-Debbugs-Cc: monnier@iro.umontreal.ca

On 8/17/2023 11:01 AM, Michael Albinus wrote:
> In eshell, this feature does not exist. I would like if I could type
> "cd /ss TAB" and could see the same offering of "ssh:", "sshfs:" and
> "sshx:". Same for user name and host name.
> 
> The appended patch does this for me. I have no idea how good it fits
> into the eshell machinery, for example whether there are problems with
> the em-elecslash.el module. Comments welcome!

Thanks. This would be a useful feature indeed. I have a couple of main 
concerns, which I'm not quite sure what to do about at the moment:

1) Should this go in the Eshell Tramp extension module? Currently, that 
module is there to add built-in versions of su/sudo/doas, as an 
alternative to the "standard" Eshell way of connecting to a remote host: 
"cd /ssh:user@host:~". Therefore, I think we'd want tab-completion of 
Tramp file names even (or especially!) when the Tramp extension module 
is disabled (which is the default).

2) I'm not sure 'pcomplete-try-first-hook' is the right way to enable 
this. Pcomplete has quite a few ways of performing completions, and it 
already knows when it should specifically complete file names (as 
opposed to "--options" for example). Maybe we should enhance Pcomplete 
itself so that you can opt into completion of remote file names too? 
Then when you tab-complete in Eshell, it would just work in all the 
contexts where you can normally complete a file name. I Cc'ed Stefan 
since he might have some thoughts on the Pcomplete machinery here.





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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-18  3:31 ` Jim Porter
@ 2023-08-18  6:45   ` Michael Albinus
  2023-08-18 11:43     ` Michael Albinus
  0 siblings, 1 reply; 18+ messages in thread
From: Michael Albinus @ 2023-08-18  6:45 UTC (permalink / raw)
  To: Jim Porter; +Cc: 65356, monnier

Jim Porter <jporterbugs@gmail.com> writes:

Hi Jim,

> X-Debbugs-Cc: monnier@iro.umontreal.ca

Well, this works only if you *submit* a new bug. If you *reply*, just
use Cc. I've added Stefan in this reply.

>> In eshell, this feature does not exist. I would like if I could type
>> "cd /ss TAB" and could see the same offering of "ssh:", "sshfs:" and
>> "sshx:". Same for user name and host name.
>>
>> The appended patch does this for me. I have no idea how good it fits
>> into the eshell machinery, for example whether there are problems with
>> the em-elecslash.el module. Comments welcome!
>
> Thanks. This would be a useful feature indeed. I have a couple of main
> concerns, which I'm not quite sure what to do about at the moment:
>
> 1) Should this go in the Eshell Tramp extension module? Currently,
> that module is there to add built-in versions of su/sudo/doas, as an
> alternative to the "standard" Eshell way of connecting to a remote
> host: "cd /ssh:user@host:~". Therefore, I think we'd want
> tab-completion of Tramp file names even (or especially!) when the
> Tramp extension module is disabled (which is the default).

I have no preference where it shall be in eshell. I've used em-tramp.el
during my work, because it is the least invasive place: it requires
already Tramp. You might have seen, that the new function uses two Tramp
variables.

> 2) I'm not sure 'pcomplete-try-first-hook' is the right way to enable
> this. Pcomplete has quite a few ways of performing completions, and it
> already knows when it should specifically complete file names (as
> opposed to "--options" for example). Maybe we should enhance Pcomplete
> itself so that you can opt into completion of remote file names too?
> Then when you tab-complete in Eshell, it would just work in all the
> contexts where you can normally complete a file name. I Cc'ed Stefan
> since he might have some thoughts on the Pcomplete machinery here.

When I've started to implement this, I was a n00b wrt pcomplete. Well,
I'm still a n00b, all what I have done is stealing code from somewhere
else, shamelessly.

It would be great if this completion function applies only to possible
*Lisp* file names. Roughly said, to arguments of commands not being
external, and not in a pipe. If this could be arranged I'd appreciate
it. So I count on you and Stefan :-)

Best regards, Michael.





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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-18  6:45   ` Michael Albinus
@ 2023-08-18 11:43     ` Michael Albinus
  2023-08-18 13:25       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 18+ messages in thread
From: Michael Albinus @ 2023-08-18 11:43 UTC (permalink / raw)
  To: Jim Porter; +Cc: 65356, monnier

Michael Albinus <michael.albinus@gmx.de> writes:

Hi Jim,

>> 2) I'm not sure 'pcomplete-try-first-hook' is the right way to enable
>> this. Pcomplete has quite a few ways of performing completions, and it
>> already knows when it should specifically complete file names (as
>> opposed to "--options" for example). Maybe we should enhance Pcomplete
>> itself so that you can opt into completion of remote file names too?
>> Then when you tab-complete in Eshell, it would just work in all the
>> contexts where you can normally complete a file name. I Cc'ed Stefan
>> since he might have some thoughts on the Pcomplete machinery here.
>
> When I've started to implement this, I was a n00b wrt pcomplete. Well,
> I'm still a n00b, all what I have done is stealing code from somewhere
> else, shamelessly.
>
> It would be great if this completion function applies only to possible
> *Lisp* file names. Roughly said, to arguments of commands not being
> external, and not in a pipe. If this could be arranged I'd appreciate
> it. So I count on you and Stefan :-)

I've digged further. Perhaps, we don't need to plug into eshell. It
could be sufficient to teach pcomplete.

First, we need a completion table for Tramp prefixes. Like

--8<---------------cut here---------------start------------->8---
(defun pcomplete-tramp ()
  "Completion table for partial Tramp file names."
  (completion-table-dynamic
   (lambda (string)
     (when (string-match-p tramp-completion-file-name-regexp string)
       (mapcar
	(lambda (x) (concat tramp-prefix-format x))
	(let ((non-essential t)
	      (minibuffer-completing-file-name t))
	  (file-name-all-completions string tramp-prefix-format)))))))
--8<---------------cut here---------------end--------------->8---

We could use this table to pimp up (existing) pcomplete functions for
builtin commands, like

--8<---------------cut here---------------start------------->8---
(defun pcomplete/cd ()
  "Completion for `cd'."
  (while (pcomplete-here (completion-table-in-turn
			  (pcomplete-tramp)
			  (pcomplete-dirs)))))
--8<---------------cut here---------------end--------------->8---

WDYT?

Best regards, Michael.





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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-18 11:43     ` Michael Albinus
@ 2023-08-18 13:25       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-18 15:12         ` Michael Albinus
  2023-08-18 17:50         ` Michael Albinus
  0 siblings, 2 replies; 18+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-18 13:25 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Jim Porter, 65356

> --8<---------------cut here---------------start------------->8---
> (defun pcomplete/cd ()
>   "Completion for `cd'."
>   (while (pcomplete-here (completion-table-in-turn
> 			  (pcomplete-tramp)
> 			  (pcomplete-dirs)))))
> --8<---------------cut here---------------end--------------->8---

AFIK this applies to `M-x shell` as well, so it doesn't seem
quite right.


        Stefan






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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-18 13:25       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-18 15:12         ` Michael Albinus
  2023-08-18 22:33           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-18 17:50         ` Michael Albinus
  1 sibling, 1 reply; 18+ messages in thread
From: Michael Albinus @ 2023-08-18 15:12 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Jim Porter, 65356

Stefan Monnier <monnier@iro.umontreal.ca> writes:

Hi Stefan,

>> --8<---------------cut here---------------start------------->8---
>> (defun pcomplete/cd ()
>>   "Completion for `cd'."
>>   (while (pcomplete-here (completion-table-in-turn
>> 			  (pcomplete-tramp)
>> 			  (pcomplete-dirs)))))
>> --8<---------------cut here---------------end--------------->8---
>
> AFIK this applies to `M-x shell` as well, so it doesn't seem
> quite right.

Yes. However, there is already another problem in shell-mode. My patch
completes only incomplete Tramp file names, like "/ss". Complete Tramp
file names are handled by pcomplete-dirs already. So we see in a *shell*
buffer, w/o my patch:

--8<---------------cut here---------------start------------->8---
[albinus@gandalf ~]$ cd /ssh:host: TAB
=> all directories on that remote host
--8<---------------cut here---------------end--------------->8---

So we must fix completion of remote file names in shell-mode anyway. This
would prevent also the modified pcomplete/cd to show any Tramp related
file name.

>         Stefan

Best regards, Michael.





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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-18 13:25       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-18 15:12         ` Michael Albinus
@ 2023-08-18 17:50         ` Michael Albinus
  1 sibling, 0 replies; 18+ messages in thread
From: Michael Albinus @ 2023-08-18 17:50 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Jim Porter, 65356

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> --8<---------------cut here---------------start------------->8---
>> (defun pcomplete/cd ()
>>   "Completion for `cd'."
>>   (while (pcomplete-here (completion-table-in-turn
>> 			  (pcomplete-tramp)
>> 			  (pcomplete-dirs)))))
>> --8<---------------cut here---------------end--------------->8---
>
> AFIK this applies to `M-x shell` as well, so it doesn't seem
> quite right.

We might use a flag which determines, whether remote file name completion
is appropriate. In shell-mode remote file names shall be suppressed, and in
eshell-mode it should be set depending on the command. "cd" should
support remote file names, "*cd" should suppress them. Other packages
use pcomplete as well, like erc and org. Whether they need to handle
remote file names I don't know.

This flag should be checked in pcomplete-tramp, pcomplete-dirs and
whatever other pcomplete completion tables are concerned. This would fix
also the other (minor) bug I've uncovered in shell-mode in my last message.

There are already such flags, which control this kind of completion,
like pcomplete-file-ignore, pcomplete-dir-ignore, pcomplete-autolist,
you name it. What about a new boolean flag pcomplete-remote-ignore?

WDYT?

>         Stefan

Best regards, Michael.





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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-18 15:12         ` Michael Albinus
@ 2023-08-18 22:33           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-19  3:26             ` Jim Porter
  0 siblings, 1 reply; 18+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-18 22:33 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Jim Porter, 65356

> Yes. However, there is already another problem in shell-mode. My patch
> completes only incomplete Tramp file names, like "/ss". Complete Tramp
> file names are handled by pcomplete-dirs already. So we see in a *shell*
> buffer, w/o my patch:

Good point.

Still, we have the problem that `pcomplete/<CMD>` should be used only
for external commands (because they are independent from the language
used to write the command, a.k.a the shell), but for things like `cd` we
should be more precise to distinguish the completion rules for Eshell's
`cd` from those of bash's `cd`.


        Stefan






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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-18 22:33           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-19  3:26             ` Jim Porter
  2023-08-19 17:48               ` Michael Albinus
  0 siblings, 1 reply; 18+ messages in thread
From: Jim Porter @ 2023-08-19  3:26 UTC (permalink / raw)
  To: Stefan Monnier, Michael Albinus; +Cc: 65356

On 8/18/2023 3:33 PM, Stefan Monnier via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
>> Yes. However, there is already another problem in shell-mode. My patch
>> completes only incomplete Tramp file names, like "/ss". Complete Tramp
>> file names are handled by pcomplete-dirs already. So we see in a *shell*
>> buffer, w/o my patch:
> 
> Good point.
> 
> Still, we have the problem that `pcomplete/<CMD>` should be used only
> for external commands (because they are independent from the language
> used to write the command, a.k.a the shell), but for things like `cd` we
> should be more precise to distinguish the completion rules for Eshell's
> `cd` from those of bash's `cd`.

That should be possible by defining 'pcomplete/eshell-mode/CMD', but 
that runs into two issues: 1) it's annoying to manually write all of 
these, and 2) there may be other contexts in Eshell we want to 
tab-complete remote directories that aren't covered by the 
command-specific Pcomplete functions like that.

(#1 should be fixable with a new version of 'eshell-eval-using-options', 
but I haven't looked at that in much detail yet.)





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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-19  3:26             ` Jim Porter
@ 2023-08-19 17:48               ` Michael Albinus
  2023-08-19 18:37                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-20  5:23                 ` Jim Porter
  0 siblings, 2 replies; 18+ messages in thread
From: Michael Albinus @ 2023-08-19 17:48 UTC (permalink / raw)
  To: Jim Porter; +Cc: 65356, Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 2113 bytes --]

Jim Porter <jporterbugs@gmail.com> writes:

Hi Jim & Stefan,

>>> Yes. However, there is already another problem in shell-mode. My patch
>>> completes only incomplete Tramp file names, like "/ss". Complete Tramp
>>> file names are handled by pcomplete-dirs already. So we see in a *shell*
>>> buffer, w/o my patch:
>> Good point.
>> Still, we have the problem that `pcomplete/<CMD>` should be used
>> only
>> for external commands (because they are independent from the language
>> used to write the command, a.k.a the shell), but for things like `cd` we
>> should be more precise to distinguish the completion rules for Eshell's
>> `cd` from those of bash's `cd`.
>
> That should be possible by defining 'pcomplete/eshell-mode/CMD', but
> that runs into two issues: 1) it's annoying to manually write all of
> these, and 2) there may be other contexts in Eshell we want to
> tab-complete remote directories that aren't covered by the
> command-specific Pcomplete functions like that.
>
> (#1 should be fixable with a new version of
> 'eshell-eval-using-options', but I haven't looked at that in much
> detail yet.)

I gave it another try. There is a new user option pcomplete-remote-ignore.
When nil (the default), pcomplete expands remote file names, including
method, user name and host name. The corresponding let-bindings in
pcomplete--entries are short.

In shell-completion-vars, I set it buffer-local to t. This prevents
remote file name completion in *shell* buffers, fixing also the bug
mentioned above.

In eshell I haven't set anything, so by default remote file names are
expanded. It should be easy to set pcomplete-remote-ignore, depending
on whether the command is a built-in (keep it nil), or an external
command (set it to t).

The patch is appended. Please note, that this has effect only when Tramp
is loaded, so you might need to test with "emacs -Q -l tramp". People,
who never use Tramp, won't see a difference.

For testing you need a recent checkout of Emacs master, because I have
added another function to tramp.el. This is already pushed to master.

Comments?

Best regards, Michael.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1819 bytes --]

diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index c7ec228c1db..e8bede9d605 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -138,6 +138,11 @@ pcomplete-dir-ignore
   "A regexp of names to be disregarded during directory completion."
   :type '(choice regexp (const :tag "None" nil)))

+(defcustom pcomplete-remote-ignore nil
+  "Whether to ignore remote file names."
+  :version "30.1"
+  :type 'boolean)
+
 (define-obsolete-variable-alias 'pcomplete-ignore-case 'completion-ignore-case
   "28.1")

@@ -924,7 +929,10 @@ pcomplete--entries
                            (sort comps pcomplete-compare-entry-function)))
                      ,@(cdr (completion-file-name-table s p a)))
         (let ((completion-ignored-extensions nil)
-	      (completion-ignore-case completion-ignore-case))
+	      (completion-ignore-case completion-ignore-case)
+              (tramp-mode (and tramp-mode (not pcomplete-remote-ignore)))
+              (non-essential (not (file-remote-p s)))
+              (minibuffer-completing-file-name  (not (file-remote-p s))))
           (completion-table-with-predicate
            #'comint-completion-file-name-table pred 'strict s p a))))))

diff --git a/lisp/shell.el b/lisp/shell.el
index 7ea9d1c2ead..17ab12dda6d 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -595,6 +595,8 @@ shell-completion-vars
   ;; Don't use pcomplete's defaulting mechanism, rely on
   ;; shell-dynamic-complete-functions instead.
   (setq-local pcomplete-default-completion-function #'ignore)
+  ;; Do not expand remote file names.
+  (setq-local pcomplete-remote-ignore t)
   (setq-local comint-input-autoexpand shell-input-autoexpand)
   ;; Not needed in shell-mode because it's inherited from comint-mode, but
   ;; placed here for read-shell-command.

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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-19 17:48               ` Michael Albinus
@ 2023-08-19 18:37                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-19 19:14                   ` Michael Albinus
  2023-08-20  5:23                 ` Jim Porter
  1 sibling, 1 reply; 18+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-19 18:37 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Jim Porter, 65356

> I gave it another try. There is a new user option pcomplete-remote-ignore.

FWIW, `pcomplete` is a generic completion library for use when
completing things like function/command calls where the things to be
completely at point depend on the position of the argument and the
command/function that is called.

It was originally designed for Eshell where those functions/commands are
actual commands in the host system, but it's also used for things like
ERC where the commands have nothing to do with executables installed in
your machine.

In theory is could be used for completion in code buffers where it
could provide specialized completion depending on the expected type of
the argument being completed.


        Stefan






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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-19 18:37                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-19 19:14                   ` Michael Albinus
  2023-08-20  0:02                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 18+ messages in thread
From: Michael Albinus @ 2023-08-19 19:14 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Jim Porter, 65356

Stefan Monnier <monnier@iro.umontreal.ca> writes:

Hi Stefan,

>> I gave it another try. There is a new user option pcomplete-remote-ignore.
>
> FWIW, `pcomplete` is a generic completion library for use when
> completing things like function/command calls where the things to be
> completely at point depend on the position of the argument and the
> command/function that is called.
>
> It was originally designed for Eshell where those functions/commands are
> actual commands in the host system, but it's also used for things like
> ERC where the commands have nothing to do with executables installed in
> your machine.

ERC should could set pcomplete-remote-ignore to t, as I have proposed
for shell buffers. Likely, even this isn't needed. The default (w/o my
patch) is to complete remote file names. This hasn't disturbed ERC until
now.

> In theory is could be used for completion in code buffers where it
> could provide specialized completion depending on the expected type of
> the argument being completed.

Hmm. Does it mean you agree with the patch, or not? My change should affect
only file name completion, any other completion should work as before.

>         Stefan

Best regards, Michael.





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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-19 19:14                   ` Michael Albinus
@ 2023-08-20  0:02                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-20  7:50                       ` Michael Albinus
  0 siblings, 1 reply; 18+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-20  0:02 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Jim Porter, 65356

> ERC should could set pcomplete-remote-ignore to t, as I have proposed

Not sure if ERC's pcomplete ever completes file names, to be honest.

>> In theory is could be used for completion in code buffers where it
>> could provide specialized completion depending on the expected type of
>> the argument being completed.
> Hmm.  Does it mean you agree with the patch, or not?  My change should
> affect only file name completion, any other completion should work
> as before.

Yes, it's OK.  I was just pointing out that pcomplete doesn't
specifically have anything to do with (completion of) file names, so the
new variable is not really relevant to "pcomplete proper" but only to
the set of defaults that are provided along with pcomplete.
The name might try and reflect that a bit more, e.g. by including
"file" somewhere.


        Stefan






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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-19 17:48               ` Michael Albinus
  2023-08-19 18:37                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-20  5:23                 ` Jim Porter
  2023-08-20 10:53                   ` Michael Albinus
  1 sibling, 1 reply; 18+ messages in thread
From: Jim Porter @ 2023-08-20  5:23 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 65356, Stefan Monnier

On 8/19/2023 10:48 AM, Michael Albinus wrote:
> The patch is appended. Please note, that this has effect only when Tramp
> is loaded, so you might need to test with "emacs -Q -l tramp". People,
> who never use Tramp, won't see a difference.
> 
> For testing you need a recent checkout of Emacs master, because I have
> added another function to tramp.el. This is already pushed to master.
> 
> Comments?

This works for me, and I think it makes sense overall. It might be nice 
to add the ability to ignore remote file names in Eshell when completing 
an argument to an external command (which doesn't understand Tramp 
syntax), but that would probably require a bunch of work on the Eshell 
side, and we can worry about that later, I think.





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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-20  0:02                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-20  7:50                       ` Michael Albinus
  0 siblings, 0 replies; 18+ messages in thread
From: Michael Albinus @ 2023-08-20  7:50 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Jim Porter, 65356

Stefan Monnier <monnier@iro.umontreal.ca> writes:

Hi Stefan,

> Yes, it's OK.  I was just pointing out that pcomplete doesn't
> specifically have anything to do with (completion of) file names, so the
> new variable is not really relevant to "pcomplete proper" but only to
> the set of defaults that are provided along with pcomplete.
> The name might try and reflect that a bit more, e.g. by including
> "file" somewhere.

I've pushed it to master. The user option is called now
pcomplete-remote-file-ignore.

>         Stefan

Best regards, Michael.





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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-20  5:23                 ` Jim Porter
@ 2023-08-20 10:53                   ` Michael Albinus
  2023-08-23  0:30                     ` Jim Porter
  0 siblings, 1 reply; 18+ messages in thread
From: Michael Albinus @ 2023-08-20 10:53 UTC (permalink / raw)
  To: Jim Porter; +Cc: 65356, Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

Jim Porter <jporterbugs@gmail.com> writes:

Hi Jim,

> This works for me, and I think it makes sense overall. It might be
> nice to add the ability to ignore remote file names in Eshell when
> completing an argument to an external command (which doesn't
> understand Tramp syntax), but that would probably require a bunch of
> work on the Eshell side, and we can worry about that later, I think.

As POC, I've written the appended patch. It works for me in a simple
case, but I'm pretty sure it needs to handle more cases. Since I'm not
so familiar with Eshell, I let it to you :-)

... unless you say it is sufficient ATM.

Best regards, Michael.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2518 bytes --]

diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el
index 732bbb3f1fa..25dccbd695c 100644
--- a/lisp/eshell/em-cmpl.el
+++ b/lisp/eshell/em-cmpl.el
@@ -148,6 +148,10 @@ eshell-cmpl-dir-ignore
   (eshell-cmpl--custom-variable-docstring 'pcomplete-dir-ignore)
   :type (get 'pcomplete-dir-ignore 'custom-type))

+(defcustom eshell-cmpl-remote-file-ignore nil
+  (eshell-cmpl--custom-variable-docstring 'pcomplete-remote-file-ignore)
+  :type (get 'pcomplete-remote-file-ignore 'custom-type))
+
 (defcustom eshell-cmpl-ignore-case (eshell-under-windows-p)
   (eshell-cmpl--custom-variable-docstring 'completion-ignore-case)
   :type (get 'completion-ignore-case 'custom-type))
@@ -248,6 +252,8 @@ eshell-cmpl-initialize
               eshell-cmpl-file-ignore)
   (setq-local pcomplete-dir-ignore
               eshell-cmpl-dir-ignore)
+  (setq-local pcomplete-remote-file-ignore
+              eshell-cmpl-remote-file-ignore)
   (setq-local completion-ignore-case
               eshell-cmpl-ignore-case)
   (setq-local pcomplete-autolist
@@ -325,6 +331,15 @@ eshell-complete--eval-argument-form
             "Failed to evaluate argument form during completion: %S" arg)
      (propertize "\0" 'eshell-argument-stub 'error))))

+;; Code stolen from `eshell-plain-command'.
+(defun eshell-external-command-p (command)
+  "Whether an external command shall be called."
+  (let* ((esym (eshell-find-alias-function command))
+	 (sym (or esym (intern-soft command))))
+    (not (and sym (fboundp sym)
+	      (or esym eshell-prefer-lisp-functions
+		  (not (eshell-search-path command)))))))
+
 (defun eshell-complete-parse-arguments ()
   "Parse the command line arguments for `pcomplete-argument'."
   (when (and eshell-no-completion-during-jobs
@@ -406,6 +421,14 @@ eshell-complete-parse-arguments
        args posns)
       (setq args (nreverse evaled-args)
             posns (nreverse evaled-posns)))
+    ;; Determine, whether remote file names shall be completed.  They
+    ;; shouldn't for external commands, or when in a pipe.  Respect
+    ;; also `eshell-cmpl-remote-file-ignore', which could be set by
+    ;; the user.
+    (setq-local pcomplete-remote-file-ignore
+                (or eshell-cmpl-remote-file-ignore
+                    eshell-in-pipeline-p ; does not work
+                    (eshell-external-command-p (car args))))
     ;; Convert arguments to forms that Pcomplete can understand.
     (cons (mapcar
            (lambda (arg)

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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-20 10:53                   ` Michael Albinus
@ 2023-08-23  0:30                     ` Jim Porter
  2023-08-23  7:56                       ` Michael Albinus
  0 siblings, 1 reply; 18+ messages in thread
From: Jim Porter @ 2023-08-23  0:30 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 65356, Stefan Monnier

On 8/20/2023 3:53 AM, Michael Albinus wrote:
> As POC, I've written the appended patch. It works for me in a simple
> case, but I'm pretty sure it needs to handle more cases. Since I'm not
> so familiar with Eshell, I let it to you :-)
> 
> ... unless you say it is sufficient ATM.

Let's just go with the change to add 'pcomplete-remote-file-ignore' for 
now. I'll have to think more about how Eshell can selectively ignore 
remote files correctly in all cases; there are a bunch of areas where 
Eshell could be smarter about completion already, and I have the feeling 
they'll conflict with each other if we don't plan this out carefully...





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

* bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell
  2023-08-23  0:30                     ` Jim Porter
@ 2023-08-23  7:56                       ` Michael Albinus
  0 siblings, 0 replies; 18+ messages in thread
From: Michael Albinus @ 2023-08-23  7:56 UTC (permalink / raw)
  To: Jim Porter; +Cc: 65356-done, Stefan Monnier

Version: 30.1

Jim Porter <jporterbugs@gmail.com> writes:

Hi Jim,

> Let's just go with the change to add 'pcomplete-remote-file-ignore'
> for now. I'll have to think more about how Eshell can selectively
> ignore remote files correctly in all cases; there are a bunch of areas
> where Eshell could be smarter about completion already, and I have the
> feeling they'll conflict with each other if we don't plan this out
> carefully...

Agreed. Pushed to master, I'm closing the bug.

Best regards, Michael.





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

end of thread, other threads:[~2023-08-23  7:56 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-17 18:01 bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell Michael Albinus
2023-08-18  3:31 ` Jim Porter
2023-08-18  6:45   ` Michael Albinus
2023-08-18 11:43     ` Michael Albinus
2023-08-18 13:25       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-18 15:12         ` Michael Albinus
2023-08-18 22:33           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-19  3:26             ` Jim Porter
2023-08-19 17:48               ` Michael Albinus
2023-08-19 18:37                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-19 19:14                   ` Michael Albinus
2023-08-20  0:02                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-20  7:50                       ` Michael Albinus
2023-08-20  5:23                 ` Jim Porter
2023-08-20 10:53                   ` Michael Albinus
2023-08-23  0:30                     ` Jim Porter
2023-08-23  7:56                       ` Michael Albinus
2023-08-18 17:50         ` Michael Albinus

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).