GNU bug report logs - #30271
shell mode completion won't complete directory names in gzip arguments

Previous Next

Package: emacs;

Reported by: Mike Kupfer <mkupfer <at> alum.berkeley.edu>

Date: Sat, 27 Jan 2018 19:23:02 UTC

Severity: minor

Found in version 26.0.91

Fixed in version 28.1

Done: Stefan Kangas <stefan <at> marxist.se>

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 30271 in the body.
You can then email your comments to 30271 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#30271; Package emacs. (Sat, 27 Jan 2018 19:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mike Kupfer <mkupfer <at> alum.berkeley.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 27 Jan 2018 19:23:02 GMT) Full text and rfc822 format available.

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

From: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.91; shell mode completion sometimes fails to complete
Date: Sat, 27 Jan 2018 11:22:09 -0800
Assume $HOME/Desktop exists and has some files in it.

From emacs -Q:

  M-x shell<RET>
  ls Desk<TAB>

This completes to give me

  ls Desktop/

Fine so far.  I press RET and start a new command.

  gzip Desk<TAB>

I expect this to complete as well.  It does not.  Instead I get an error
message "No match".

I suspect that the completion code is trying to be clever, figuring that
directories are not compressable, so "gzip Desktop" would not make
sense.  But this just gets in the way if what I want to compress is a
file in Desktop.

Ideally, Emacs would work as I expect out of the box.  I'd settle for a
configuration option, but I've been unable to find anything relevant.

- "C-h k" in the shell buffer tells me that TAB is bound to
  completion-at-point, and that I should look at
  completion-at-point-functions.  "M-: completion-at-point-functions"
  gives me "(comint-completion-at-point t)".  "C-h f
  comint-completion-at-point" gives me "Not documented".

- The "Shell Options" Info page describes a few variables to control
  completion, but none of them seem relevant here.

I get the same behavior with Emacs 25.3, so this is not a regression.

In GNU Emacs 26.0.91 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
 of 2018-01-27 built on alto
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description:	Debian GNU/Linux 9.3 (stretch)

Recent messages:
Creating customization items...
Creating group...
Creating group entries...done
Creating customization items ...done
Resetting customization items...done
Creating customization setup...done
You can run the command ‘customize-group’ with M-x cu-g RET
Creating customization setup...done
Type "q" in help window to delete it
Mark saved where search started

Configured features:
XPM JPEG TIFF GIF PNG SOUND NOTIFY GNUTLS LIBXML2 FREETYPE LIBOTF XFT
ZLIB TOOLKIT_SCROLL_BARS LUCID X11

Important settings:
  value of $LC_TIME: C
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Info

Minor modes in effect:
  shell-dirtrack-mode: t
  delete-selection-mode: t
  global-eldoc-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
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow mh-mime mh-identity mh-tool-bar mh-letter mh-show goto-addr
gnus-cite gnus-art mm-uu mml2015 mh-xface mh-utils mh-comp mh-scan
mh-gnus mm-view mml-smime smime dig mailcap mh-e mh-compat mh-buffers
mh-loaddefs emacsbug pp cus-edit cus-start cus-load apropos eieio-opt
speedbar sb-image ezimage dframe cl-extra cl-print thingatpt help-fns
radix-tree help-mode misearch multi-isearch info pcmpl-unix pcmpl-gnu
org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum gnus-group
gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls
utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus
nnheader wid-edit mdk-mail smtpmail auth-source eieio eieio-core cl-macs
eieio-loaddefs sendmail message rmc puny seq byte-opt gv bytecomp
byte-compile cconv rfc822 mml mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr
mailabbrev mail-utils gmm-utils mailheader org-docview doc-view
jka-compr image-mode dired dired-loaddefs org-bibtex bibtex org-bbdb
org-w3m org-element cl-seq avl-tree generator org org-macro org-footnote
org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp
ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint
ob-core ob-eval org-compat org-macs org-loaddefs format-spec find-func
cal-menu calendar cal-loaddefs elec-pair server noutline outline
easy-mmode cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs shell pcomplete comint ansi-color ring xcscope
easymenu advice delsel vc cl-loaddefs cl-lib vc-dispatcher timeclock
mdk-hacks time-date mule-util tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
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 charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded 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 inotify dynamic-setting
font-render-setting x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 325256 25534)
 (symbols 48 39819 3)
 (miscs 40 392 502)
 (strings 32 97268 2583)
 (string-bytes 1 2999025)
 (vectors 16 38275)
 (vector-slots 8 770204 19326)
 (floats 8 311 82)
 (intervals 56 9403 0)
 (buffers 992 22))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30271; Package emacs. (Sun, 28 Jan 2018 18:20:02 GMT) Full text and rfc822 format available.

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

From: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
To: 30271 <at> debbugs.gnu.org
Subject: Re: bug#30271: 26.0.91;
 shell mode completion sometimes fails to complete
Date: Sun, 28 Jan 2018 09:55:27 -0800
Mike Kupfer wrote:

> I suspect that the completion code is trying to be clever, figuring that
> directories are not compressable, so "gzip Desktop" would not make
> sense.

I've verified that the completion code is going through
#'pcomplete/gzip.  From inspection, I see that #'pcmpl-gnu-zipped-files
only considers regular files, so directories get filtered out.

> But this just gets in the way if what I want to compress is a
> file in Desktop.

I haven't found any user options or variables that will let me get the
behavior I want, so I ended up putting this workaround in my startup
code:

(defadvice pcomplete-find-completion-function (after 
					       mdk-reliable-completions
					       compile
					       activate)
  "Force use of the generic completion function."
  (setq ad-return-value nil))

mike




Changed bug title to 'shell mode completion won't complete directory names in gzip arguments' from '26.0.91; shell mode completion sometimes fails to complete' Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Thu, 08 Feb 2018 13:50:01 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Thu, 08 Feb 2018 13:50:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30271; Package emacs. (Tue, 27 Oct 2020 02:22:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
Cc: 30271 <at> debbugs.gnu.org
Subject: Re: bug#30271: 26.0.91;
 shell mode completion sometimes fails to complete
Date: Mon, 26 Oct 2020 19:21:03 -0700
close 30271 28.1
thanks

Mike Kupfer <mkupfer <at> alum.berkeley.edu> writes:

> Mike Kupfer wrote:
>
>> I suspect that the completion code is trying to be clever, figuring that
>> directories are not compressable, so "gzip Desktop" would not make
>> sense.
>
> I've verified that the completion code is going through
> #'pcomplete/gzip.  From inspection, I see that #'pcmpl-gnu-zipped-files
> only considers regular files, so directories get filtered out.
>
>> But this just gets in the way if what I want to compress is a
>> file in Desktop.

This should now be fixed on master.  The fix will be in Emacs 28.1.




bug marked as fixed in version 28.1, send any further explanations to 30271 <at> debbugs.gnu.org and Mike Kupfer <mkupfer <at> alum.berkeley.edu> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Tue, 27 Oct 2020 02:22: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. (Tue, 24 Nov 2020 12:24:14 GMT) Full text and rfc822 format available.

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

Previous Next


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