GNU bug report logs - #19626
25.0.50; eshell: extended directory syntax ("...") does not complete

Previous Next

Package: emacs;

Reported by: Samer Masterson <nosefrog <at> gmail.com>

Date: Mon, 19 Jan 2015 11:19:02 UTC

Severity: minor

Found in version 25.0.50

Fixed in version 28.1

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

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 19626 in the body.
You can then email your comments to 19626 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#19626; Package emacs. (Mon, 19 Jan 2015 11:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Samer Masterson <nosefrog <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 19 Jan 2015 11:19:02 GMT) Full text and rfc822 format available.

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

From: Samer Masterson <nosefrog <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; eshell: extended directory syntax ("...") does not complete
Date: Mon, 19 Jan 2015 03:19:46 -0800
1. "emacs -Q"
2. M-x eshell
3. "cd .../"
4. Press tab
Bug: "No completions found" is echoed, even though completions exist.
Exptected: Eshell should have attempted to complete a directory name.



In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2014-11-18 on samer-dark-horse
Repository revision: b59998eb5b9c4e6e142b530604539c54028acb8d
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:	Ubuntu 14.04.1 LTS

Configured using:
 `configure --prefix=/home/samer/local'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB

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

Major mode: Apropos

Minor modes in effect:
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  global-flycheck-mode: t
  show-paren-mode: t
  flx-ido-mode: t
  guide-key-mode: t
  popwin-mode: t
  projectile-global-mode: t
  projectile-mode: t
  ido-everywhere: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-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

Recent messages:
Quit
No completions of .../sou
Quit [3 times]
Mark saved where search started

Quit [2 times]
Mark saved where search started

Mark saved where search started [2 times]

Quit [2 times]

Load-path shadows:
/home/samer/.emacs.d/elpa/emms-20141104.1238/tq hides /home/samer/local/share/emacs/25.0.50/lisp/emacs-lisp/tq

Features:
(shadow emacsbug apropos ediff-merg ediff-wind ediff-diff ediff-mult
ediff-help ediff-init ediff-util ediff company-go sh-script smie
executable make-mode rect eieio-opt conf-mode align js json cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs tabify man go-stacktracer magit-blame cal-move parse-time
org-element org-rmail org-mhe org-irc org-info org-gnus org-docview
org-bibtex bibtex org-bbdb org-w3m org org-macro org-footnote
org-pcomplete org-list org-faces org-entities noutline outline
org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs cal-menu calendar cal-loaddefs deft wid-edit find-dired
debug windmove pp tramp-cache pcmpl-unix em-unix em-term term disp-table
ehelp em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl
em-basic em-banner em-alias esh-var esh-io esh-cmd esh-opt esh-ext
esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util
cap-words superword subword misc hippie-exp ace-jump-mode company-files
company-oddmuse company-keywords company-etags company-gtags
company-dabbrev-code company-dabbrev company-capf company-cmake
company-ropemacs company-xcode company-clang company-semantic
company-eclim company-template company-css company-nxml company-bbdb
company imenu dired-aux magit-key-mode magit view tramp tramp-compat
tramp-loaddefs trampver shell pcomplete autorevert filenotify
git-rebase-mode git-commit-mode log-edit pcvs-util add-log epa-file
gnutls network-stream starttls tls mailalias mail-extr sort misearch
multi-isearch mule-util server vc-git diff-mode easy-mmode remember
flycheck help-mode rx subr-x pcase edmacro kmacro mu4e mu4e-speedbar
speedbar sb-image ezimage dframe mu4e-main mu4e-view epa derived epg
browse-url mu4e-headers mu4e-compose mu4e-draft mu4e-actions rfc2368
smtpmail sendmail mu4e-mark mu4e-message html2text mu4e-proc mu4e-utils
doc-view jka-compr image-mode mu4e-lists mu4e-about mu4e-vars message
format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils
mailheader hl-line mu4e-meta ctags paren flx-ido flx saveplace smex
go-eldoc go-mode url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap find-file ffap
url-parse auth-source eieio byte-opt bytecomp byte-compile cl-extra
cconv eieio-core gnus-util time-date mm-util mail-prsvr password-cache
url-vars etags guide-key face-remap popwin projectile advice ibuf-ext
ibuffer pkg-info find-func lisp-mnt epl grep thingatpt help-fns cl-macs
cl gv cl-loaddefs cl-lib ag vc-svn compile comint ansi-color ring ido s
ucs-normalize dash dired go-mode-autoloads info easymenu package
epg-config tooltip eldoc 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 elisp-mode 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 1192127 163442)
 (symbols 48 47172 21)
 (miscs 40 5332 3731)
 (strings 32 144171 31134)
 (string-bytes 1 4576347)
 (vectors 16 104892)
 (vector-slots 8 2394117 39473)
 (floats 8 12733 3169)
 (intervals 56 97212 433)
 (buffers 976 239)
 (heap 1024 173448 62749))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19626; Package emacs. (Wed, 25 Aug 2021 09:12:01 GMT) Full text and rfc822 format available.

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

From: "Michalis V." <mvar.40k <at> gmail.com>
To: Samer Masterson <nosefrog <at> gmail.com>
Cc: 19626 <at> debbugs.gnu.org
Subject: Re: bug#19626: 25.0.50; eshell: extended directory syntax ("...")
 does not complete
Date: Wed, 25 Aug 2021 12:10:58 +0300
Samer Masterson <nosefrog <at> gmail.com> writes:

> 1. "emacs -Q"
> 2. M-x eshell
> 3. "cd .../"
> 4. Press tab
> Bug: "No completions found" is echoed, even though completions exist.
> Exptected: Eshell should have attempted to complete a directory name.
>
>
>
> In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
>  of 2014-11-18 on samer-dark-horse

i cannot reproduce this in 28.0.50. Basically what i did was

mkdir ...

then repeat the steps above. Eshell autocompletes .../ fine, even adding
another similar directory will bring up the dialog:


Click on a completion to select it.
In this buffer, type RET to select the completion near point.

Possible completions are:
..../
.../


thanks,
Michalis




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19626; Package emacs. (Wed, 25 Aug 2021 11:20:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Michalis V." <mvar.40k <at> gmail.com>
Cc: Samer Masterson <nosefrog <at> gmail.com>, 19626 <at> debbugs.gnu.org
Subject: Re: bug#19626: 25.0.50; eshell: extended directory syntax ("...")
 does not complete
Date: Wed, 25 Aug 2021 13:19:42 +0200
"Michalis V." <mvar.40k <at> gmail.com> writes:

> i cannot reproduce this in 28.0.50. Basically what i did was
>
> mkdir ...
>
> then repeat the steps above. Eshell autocompletes .../ fine, even adding
> another similar directory will bring up the dialog:

I think eshell has an "extended directory" concept where "..." is
supposed to expand to (I think) all parent directories?  So there isn't
supposed to be any directory literally called "...".

I think.  But I'm not overly familiar with eshell.  Let's see...  Yup:

(defun eshell-expand-multiple-dots (filename)
  "Convert `...' to `../..', `....' to `../../..', etc..


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19626; Package emacs. (Fri, 27 Aug 2021 15:29:01 GMT) Full text and rfc822 format available.

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

From: "Michalis V." <mvar.40k <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "Michalis V." <mvar.40k <at> gmail.com>, Samer Masterson <nosefrog <at> gmail.com>,
 19626 <at> debbugs.gnu.org
Subject: Re: bug#19626: 25.0.50; eshell: extended directory syntax ("...")
 does not complete
Date: Fri, 27 Aug 2021 18:28:16 +0300
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> "Michalis V." <mvar.40k <at> gmail.com> writes:
>
>> i cannot reproduce this in 28.0.50. Basically what i did was
>>
>> mkdir ...
>>
>> then repeat the steps above. Eshell autocompletes .../ fine, even adding
>> another similar directory will bring up the dialog:
>
> I think eshell has an "extended directory" concept where "..." is
> supposed to expand to (I think) all parent directories?  So there isn't
> supposed to be any directory literally called "...".
>
> I think.  But I'm not overly familiar with eshell.  Let's see...  Yup:
>
> (defun eshell-expand-multiple-dots (filename)
>   "Convert `...' to `../..', `....' to `../../..', etc..

oops, i wasn't even aware of this eshell feature, sorry about that!

I did some debugging into how completion works and it looks like
eshell-complete-parse-arguments in em-cmpl.el is responsible for
parsing the arguments before passing them to the generic(?) completion
code. Attached is a patch that adds an additional check at the end of
said defun that will substitute any .../ dots into the proper expanded
form before returning. There are some other defuns that are called by
eshell-complete-parse-arguments, namely eshell-parse-argument(s) but i
*think* this substitution is better suited (read: safer) to be placed to
their caller.
Note that this works for "cd .../", completion for other operations like
cp do not work currently (most probably because cd has its own
implementation in eshell/cd?)

i'm not sure whether this is the correct solution to this problem so if
there are any concerns please let me know and i'll continue the digging

thanks,
Michalis

[em-cmpl.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19626; Package emacs. (Fri, 27 Aug 2021 16:48:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Michalis V." <mvar.40k <at> gmail.com>
Cc: Samer Masterson <nosefrog <at> gmail.com>, 19626 <at> debbugs.gnu.org
Subject: Re: bug#19626: 25.0.50; eshell: extended directory syntax ("...")
 does not complete
Date: Fri, 27 Aug 2021 18:47:27 +0200
"Michalis V." <mvar.40k <at> gmail.com> writes:

>> (defun eshell-expand-multiple-dots (filename)
>>   "Convert `...' to `../..', `....' to `../../..', etc..
>
> oops, i wasn't even aware of this eshell feature, sorry about that!

I didn't know about it either.  :-)

> i'm not sure whether this is the correct solution to this problem so if
> there are any concerns please let me know and i'll continue the digging

Thanks.  Looking at the code and the patch, that does seem right the
right solution, so I've now pushed it to Emacs 28.  (But I'm not really
very familiar with eshell.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 19626 <at> debbugs.gnu.org and Samer Masterson <nosefrog <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 27 Aug 2021 16:48:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 25 Sep 2021 11:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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