GNU bug report logs - #41423
27.0.91; eshell file completion in tramp dir is slow (3 minutes) [regression on pretest]

Previous Next

Package: emacs;

Reported by: rrandresf <at> gmail.com

Date: Wed, 20 May 2020 16:23:02 UTC

Severity: normal

Tags: moreinfo

Merged with 47389

Found in versions 27.0.91, 27.1.91

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 41423 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <ghe <at> sdf.org>
To: 41423 <at> debbugs.gnu.org
Subject: Re: bug#41423: 27.0.91; eshell file completion in tramp dir is slow
 (3 minutes) [regression on pretest]
Date: Fri, 28 Aug 2020 13:17:21 +0000
A last note: this bug exists because in Emacs 27 eshell uses 
`pcomplete-completions-at-point': TAB is bound to `completion-at-point' 
and `completion-at-point-functions' is `(pcomplete-completions-at-point 
t)'.

In Emacs 26 eshell used the (now obsolete) `pcomplete' function: TAB was 
bound to `eshell-pcomplete', which was defined as follows:

(defun eshell-pcomplete (&optional interactively)
   "Eshell wrapper for `pcomplete'."
   (interactive "p")
   (setq this-command 'pcomplete)
   (condition-case nil
       (if interactively
 	  (call-interactively 'pcomplete)
 	(pcomplete))
     (text-read-only (completion-at-point))))

IOW, pcomplete-completions-at-point was called only if `pcomplete' failed, 
and is now called by default.  (`completion-at-point-functions' was set to 
`(pcomplete-completions-at-point t)', as in Emacs 27.)

A simple fix is to eval

(setq completion-at-point-functions '(pcomplete t))

after starting eshell (or to put this in one of the eshell hooks), which 
will restore the previous default behavior.

I have no idea how `pcomplete-completions-at-point' should be adapted to 
avoid this bug.




This bug report was last modified 3 years and 25 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.