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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Mike Kupfer <mkupfer@HIDDEN>; dated Sat, 27 Jan 2018 19:23:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
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@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 30271 <at> debbugs.gnu.org:


Received: (at 30271) by debbugs.gnu.org; 28 Jan 2018 18:19:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 28 13:19:41 2018
Received: from localhost ([127.0.0.1]:46457 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1efrYL-0006ay-9f
	for submit <at> debbugs.gnu.org; Sun, 28 Jan 2018 13:19:41 -0500
Received: from shell1.rawbw.com ([198.144.192.42]:41428 ident=root)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mkupfer@HIDDEN>) id 1efrYI-0006ap-UK
 for 30271 <at> debbugs.gnu.org; Sun, 28 Jan 2018 13:19:39 -0500
Received: from alto (96-95-200-133-static.hfc.comcastbusiness.net
 [96.95.200.133]) (authenticated bits=0)
 by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id w0SHtSH7005798
 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO)
 for <30271 <at> debbugs.gnu.org>; Sun, 28 Jan 2018 09:55:35 -0800 (PST)
 (envelope-from mkupfer@HIDDEN)
X-Authentication-Warning: shell1.rawbw.com: Host
 96-95-200-133-static.hfc.comcastbusiness.net [96.95.200.133] claimed to be
 alto
From: Mike Kupfer <mkupfer@HIDDEN>
To: 30271 <at> debbugs.gnu.org
Subject: Re: bug#30271: 26.0.91;
 shell mode completion sometimes fails to complete
In-Reply-To: My message of "Sat, 27 Jan 2018 11:22:09 -0800."
 <809.1517080929@alto>
X-Mailer: MH-E 8.6+git; nmh 1.6; GNU Emacs 26.0.91
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <21054.1517162127.1@alto>
Date: Sun, 28 Jan 2018 09:55:27 -0800
Message-ID: <21055.1517162127@alto>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 30271
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30271; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Jan 2018 19:22:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 27 14:22:30 2018
Received: from localhost ([127.0.0.1]:45505 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1efW3Z-0005rW-Vh
	for submit <at> debbugs.gnu.org; Sat, 27 Jan 2018 14:22:30 -0500
Received: from eggs.gnu.org ([208.118.235.92]:57365)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mkupfer@HIDDEN>) id 1efW3Y-0005rI-CR
 for submit <at> debbugs.gnu.org; Sat, 27 Jan 2018 14:22:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mkupfer@HIDDEN>) id 1efW3R-0005Ix-Q9
 for submit <at> debbugs.gnu.org; Sat, 27 Jan 2018 14:22:23 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:57183)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mkupfer@HIDDEN>)
 id 1efW3R-0005Ir-Mr
 for submit <at> debbugs.gnu.org; Sat, 27 Jan 2018 14:22:21 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48334)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mkupfer@HIDDEN>) id 1efW3Q-0007nJ-6H
 for bug-gnu-emacs@HIDDEN; Sat, 27 Jan 2018 14:22:21 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mkupfer@HIDDEN>) id 1efW3N-0005Dk-0b
 for bug-gnu-emacs@HIDDEN; Sat, 27 Jan 2018 14:22:20 -0500
Received: from shell1.rawbw.com ([198.144.192.42]:52391)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mkupfer@HIDDEN>) id 1efW3M-0005CK-OK
 for bug-gnu-emacs@HIDDEN; Sat, 27 Jan 2018 14:22:16 -0500
Received: from alto (96-95-200-133-static.hfc.comcastbusiness.net
 [96.95.200.133]) (authenticated bits=0)
 by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id w0RJM9PU067376
 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO)
 for <bug-gnu-emacs@HIDDEN>; Sat, 27 Jan 2018 11:22:15 -0800 (PST)
 (envelope-from mkupfer@HIDDEN)
X-Authentication-Warning: shell1.rawbw.com: Host
 96-95-200-133-static.hfc.comcastbusiness.net [96.95.200.133] claimed to be
 alto
From: Mike Kupfer <mkupfer@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 26.0.91; shell mode completion sometimes fails to complete
X-Mailer: MH-E 8.6+git; nmh 1.6; GNU Emacs 26.0.91
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Date: Sat, 27 Jan 2018 11:22:09 -0800
Message-ID: <809.1517080929@alto>
X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

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 b=
ars)
 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 =E2=80=98customize-group=E2=80=99 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))




Acknowledgement sent to Mike Kupfer <mkupfer@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#30271; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 8 Feb 2018 14:00:02 UTC

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