GNU bug report logs - #51858
Completion in shell buffers not ignoring case

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita2 <at> gmail.com>

Date: Mon, 15 Nov 2021 05:48:02 UTC

Severity: normal

Found in version 29.0.50

To reply to this bug, email your comments to 51858 AT debbugs.gnu.org.

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#51858; Package emacs. (Mon, 15 Nov 2021 05:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carlos Pita <carlosjosepita2 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 15 Nov 2021 05:48:02 GMT) Full text and rfc822 format available.

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

From: Carlos Pita <carlosjosepita2 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; pcomplete not ignoring case
Date: Mon, 15 Nov 2021 02:47:20 -0300
Hi all,

the docstring for pcomplete-ignore-case (which is now an alias for
completion-ignore-case) says:

    Non-nil means don’t consider case significant in completion.
    For file-name completion, ‘read-file-name-completion-ignore-case’
    controls the behavior, rather than this variable.

But if I set read-file-name-completion-ignore-case to t I'm still unable
to complete, for example, "cd ~/desk<tab>" to "cd ~/Desktop" in a
shell. OTOH setting pcomplete-ignore-case to t gives the desired
completion.

I'm not sure whether something like "cd ~/desk<tab>" in a M-x shell
counts as "file-name completion" or not, but it seems to me that it
should.

Best regards,
Carlos

---


In GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.6 (Build 20G165))
 of 2021-11-14 built on Carloss-MacBook-Pro.local
Repository revision: 370d4038c5a671d3b9e3a4d28d849948c1a96f53
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2022
System Description:  macOS 11.6

Configured using:
 'configure --with-native-compilation'

Configured features:
ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY KQUEUE NS PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS WEBP
XIM ZLIB

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LC_CTYPE: UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  outline-minor-mode: t
  display-line-numbers-mode: t
  electric-pair-mode: t
  windmove-mode: t
  corfu-global-mode: t
  corfu-mode: t
  icomplete-vertical-mode: t
  icomplete-mode: t
  fido-mode: t
  winner-mode: t
  recentf-mode: t
  ns-auto-titlebar-mode: t
  minions-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
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/Users/carlos/.emacs.d/elpa/transient-20211105.100/transient hides /Applications/Emacs.app/Contents/Resources/lisp/transient
~/Install/Source/org-mode/lisp/ob-exp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-exp
~/Install/Source/org-mode/lisp/ob-emacs-lisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-emacs-lisp
~/Install/Source/org-mode/lisp/oc hides /Applications/Emacs.app/Contents/Resources/lisp/org/oc
~/Install/Source/org-mode/lisp/ob-css hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-css
~/Install/Source/org-mode/lisp/ob-lob hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lob
~/Install/Source/org-mode/lisp/ol-irc hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-irc
~/Install/Source/org-mode/lisp/ob-forth hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-forth
~/Install/Source/org-mode/lisp/org-macs hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-macs
~/Install/Source/org-mode/lisp/ob hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob
~/Install/Source/org-mode/lisp/org-version hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-version
~/Install/Source/org-mode/lisp/ob-scheme hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-scheme
~/Install/Source/org-mode/lisp/ox hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox
~/Install/Source/org-mode/lisp/ob-C hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-C
~/Install/Source/org-mode/lisp/org-capture hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-capture
~/Install/Source/org-mode/lisp/ob-ref hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ref
~/Install/Source/org-mode/lisp/ob-clojure hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-clojure
~/Install/Source/org-mode/lisp/org-mouse hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mouse
~/Install/Source/org-mode/lisp/org-ctags hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-ctags
~/Install/Source/org-mode/lisp/org-entities hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-entities
~/Install/Source/org-mode/lisp/org-archive hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-archive
~/Install/Source/org-mode/lisp/ob-screen hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-screen
~/Install/Source/org-mode/lisp/ol-bibtex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-bibtex
~/Install/Source/org-mode/lisp/ob-haskell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-haskell
~/Install/Source/org-mode/lisp/org-table hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-table
~/Install/Source/org-mode/lisp/ol-eww hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-eww
~/Install/Source/org-mode/lisp/ol-man hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-man
~/Install/Source/org-mode/lisp/ox-org hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-org
~/Install/Source/org-mode/lisp/org-num hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-num
~/Install/Source/org-mode/lisp/org-plot hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-plot
~/Install/Source/org-mode/lisp/ol-rmail hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-rmail
~/Install/Source/org-mode/lisp/ob-awk hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-awk
~/Install/Source/org-mode/lisp/ob-groovy hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-groovy
~/Install/Source/org-mode/lisp/ob-octave hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-octave
~/Install/Source/org-mode/lisp/org-faces hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-faces
~/Install/Source/org-mode/lisp/oc-biblatex hides /Applications/Emacs.app/Contents/Resources/lisp/org/oc-biblatex
~/Install/Source/org-mode/lisp/org-colview hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-colview
~/Install/Source/org-mode/lisp/ob-R hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-R
~/Install/Source/org-mode/lisp/org-refile hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-refile
~/Install/Source/org-mode/lisp/org-timer hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-timer
~/Install/Source/org-mode/lisp/org-mobile hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mobile
~/Install/Source/org-mode/lisp/ob-fortran hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-fortran
~/Install/Source/org-mode/lisp/ob-shell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-shell
~/Install/Source/org-mode/lisp/ob-perl hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-perl
~/Install/Source/org-mode/lisp/ob-sqlite hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sqlite
~/Install/Source/org-mode/lisp/oc-basic hides /Applications/Emacs.app/Contents/Resources/lisp/org/oc-basic
~/Install/Source/org-mode/lisp/ob-sed hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sed
~/Install/Source/org-mode/lisp/org-list hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-list
~/Install/Source/org-mode/lisp/ob-ruby hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ruby
~/Install/Source/org-mode/lisp/ob-eval hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-eval
~/Install/Source/org-mode/lisp/org-habit hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-habit
~/Install/Source/org-mode/lisp/org-clock hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-clock
~/Install/Source/org-mode/lisp/org-goto hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-goto
~/Install/Source/org-mode/lisp/ox-html hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-html
~/Install/Source/org-mode/lisp/org-src hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-src
~/Install/Source/org-mode/lisp/ob-lisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lisp
~/Install/Source/org-mode/lisp/ol-eshell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-eshell
~/Install/Source/org-mode/lisp/ob-ditaa hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ditaa
~/Install/Source/org-mode/lisp/org-pcomplete hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-pcomplete
~/Install/Source/org-mode/lisp/org-lint hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-lint
~/Install/Source/org-mode/lisp/ox-latex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-latex
~/Install/Source/org-mode/lisp/ob-sass hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sass
~/Install/Source/org-mode/lisp/ob-tangle hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-tangle
~/Install/Source/org-mode/lisp/ob-calc hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-calc
~/Install/Source/org-mode/lisp/ob-java hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-java
~/Install/Source/org-mode/lisp/ox-icalendar hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-icalendar
~/Install/Source/org-mode/lisp/ol-mhe hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-mhe
~/Install/Source/org-mode/lisp/org-attach-git hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-attach-git
~/Install/Source/org-mode/lisp/ox-md hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-md
~/Install/Source/org-mode/lisp/ox-beamer hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-beamer
~/Install/Source/org-mode/lisp/org-element hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-element
~/Install/Source/org-mode/lisp/oc-natbib hides /Applications/Emacs.app/Contents/Resources/lisp/org/oc-natbib
~/Install/Source/org-mode/lisp/org-protocol hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-protocol
~/Install/Source/org-mode/lisp/ob-gnuplot hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-gnuplot
~/Install/Source/org-mode/lisp/org-tempo hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-tempo
~/Install/Source/org-mode/lisp/ob-latex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-latex
~/Install/Source/org-mode/lisp/ol-w3m hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-w3m
~/Install/Source/org-mode/lisp/org-id hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-id
~/Install/Source/org-mode/lisp/ox-man hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-man
~/Install/Source/org-mode/lisp/ol-doi hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-doi
~/Install/Source/org-mode/lisp/org-feed hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-feed
~/Install/Source/org-mode/lisp/ob-julia hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-julia
~/Install/Source/org-mode/lisp/ob-lua hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lua
~/Install/Source/org-mode/lisp/ob-table hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-table
~/Install/Source/org-mode/lisp/ob-ocaml hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ocaml
~/Install/Source/org-mode/lisp/oc-csl hides /Applications/Emacs.app/Contents/Resources/lisp/org/oc-csl
~/Install/Source/org-mode/lisp/ol-gnus hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-gnus
~/Install/Source/org-mode/lisp/org-indent hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-indent
~/Install/Source/org-mode/lisp/ob-lilypond hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lilypond
~/Install/Source/org-mode/lisp/ob-matlab hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-matlab
~/Install/Source/org-mode/lisp/org-datetree hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-datetree
~/Install/Source/org-mode/lisp/ol-docview hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-docview
~/Install/Source/org-mode/lisp/ob-python hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-python
~/Install/Source/org-mode/lisp/ob-makefile hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-makefile
~/Install/Source/org-mode/lisp/org-duration hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-duration
~/Install/Source/org-mode/lisp/org-agenda hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-agenda
~/Install/Source/org-mode/lisp/ob-dot hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-dot
~/Install/Source/org-mode/lisp/ob-js hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-js
~/Install/Source/org-mode/lisp/ox-publish hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-publish
~/Install/Source/org-mode/lisp/org-inlinetask hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-inlinetask
~/Install/Source/org-mode/lisp/ob-org hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-org
~/Install/Source/org-mode/lisp/org-keys hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-keys
~/Install/Source/org-mode/lisp/ob-core hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-core
~/Install/Source/org-mode/lisp/org-compat hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-compat
~/Install/Source/org-mode/lisp/ol hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol
~/Install/Source/org-mode/lisp/ox-odt hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-odt
~/Install/Source/org-mode/lisp/ol-info hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-info
~/Install/Source/org-mode/lisp/ob-plantuml hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-plantuml
~/Install/Source/org-mode/lisp/ob-eshell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-eshell
~/Install/Source/org-mode/lisp/ox-ascii hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-ascii
~/Install/Source/org-mode/lisp/org-loaddefs hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-loaddefs
~/Install/Source/org-mode/lisp/ox-koma-letter hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-koma-letter
~/Install/Source/org-mode/lisp/ob-maxima hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-maxima
~/Install/Source/org-mode/lisp/org hides /Applications/Emacs.app/Contents/Resources/lisp/org/org
~/Install/Source/org-mode/lisp/ol-bbdb hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-bbdb
~/Install/Source/org-mode/lisp/org-macro hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-macro
~/Install/Source/org-mode/lisp/ob-sql hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sql
~/Install/Source/org-mode/lisp/org-attach hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-attach
~/Install/Source/org-mode/lisp/ob-processing hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-processing
~/Install/Source/org-mode/lisp/ox-texinfo hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-texinfo
~/Install/Source/org-mode/lisp/org-crypt hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-crypt
~/Install/Source/org-mode/lisp/org-footnote hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-footnote
~/Install/Source/org-mode/lisp/org-install hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-install
~/Install/Source/org-mode/lisp/ob-comint hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-comint

Features:
(shadow sort mail-extr emacsbug message yank-media rmc puny rfc822 mml
mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode
noutline outline display-line-numbers elec-pair server dired-x dired
dired-loaddefs exec-path-from-shell eshell esh-cmd esh-ext esh-opt
esh-proc esh-io esh-arg esh-module esh-groups esh-util windmove corfu
icomplete winner ring recentf tree-widget wid-edit ns-auto-titlebar
minions pcase easy-mmode modus-operandi-theme modus-themes finder-inf
info package browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars seq gv subr-x byte-opt bytecomp
byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win 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 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 emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads kqueue
cocoa ns lcms2 multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 346006 8237)
 (symbols 48 18661 0)
 (strings 32 85868 2513)
 (string-bytes 1 2323310)
 (vectors 16 26712)
 (vector-slots 8 505345 19072)
 (floats 8 130 803)
 (intervals 56 338 0)
 (buffers 992 10))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51858; Package emacs. (Mon, 15 Nov 2021 06:00:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Carlos Pita <carlosjosepita2 <at> gmail.com>
Cc: 51858 <at> debbugs.gnu.org
Subject: Re: bug#51858: 29.0.50; pcomplete not ignoring case
Date: Mon, 15 Nov 2021 06:59:41 +0100
Carlos Pita <carlosjosepita2 <at> gmail.com> writes:

> the docstring for pcomplete-ignore-case (which is now an alias for
> completion-ignore-case) says:
>
>     Non-nil means don’t consider case significant in completion.
>     For file-name completion, ‘read-file-name-completion-ignore-case’
>     controls the behavior, rather than this variable.
>
> But if I set read-file-name-completion-ignore-case to t I'm still unable
> to complete, for example, "cd ~/desk<tab>" to "cd ~/Desktop" in a
> shell. OTOH setting pcomplete-ignore-case to t gives the desired
> completion.
>
> I'm not sure whether something like "cd ~/desk<tab>" in a M-x shell
> counts as "file-name completion" or not, but it seems to me that it
> should.

Just to clarify -- read-file-name-completion-ignore-case works
everywhere else, but doesn't work in a *shell* buffer?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51858; Package emacs. (Mon, 15 Nov 2021 07:17:01 GMT) Full text and rfc822 format available.

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

From: Carlos Pita <carlosjosepita2 <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51858 <at> debbugs.gnu.org
Subject: Re: bug#51858: 29.0.50; pcomplete not ignoring case
Date: Mon, 15 Nov 2021 04:16:06 -0300
> Just to clarify -- read-file-name-completion-ignore-case works
> everywhere else, but doesn't work in a *shell* buffer?

C-x C-f ~/desk<tab>  --> ~/Desktop

M-x shell<enter> cd ~/desk<tab>  --> no completion

M-x shell<enter> cd ~/Desk<tab>  --> ~/Desktop

This is with default settings:

    read-file-name-completion-ignore-case t
    completion/pcomplete-ignore-case nil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51858; Package emacs. (Mon, 15 Nov 2021 08:01:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Carlos Pita <carlosjosepita2 <at> gmail.com>
Cc: 51858 <at> debbugs.gnu.org
Subject: Re: bug#51858: 29.0.50; pcomplete not ignoring case
Date: Mon, 15 Nov 2021 09:00:38 +0100
Carlos Pita <carlosjosepita2 <at> gmail.com> writes:

>> Just to clarify -- read-file-name-completion-ignore-case works
>> everywhere else, but doesn't work in a *shell* buffer?
>
> C-x C-f ~/desk<tab>  --> ~/Desktop
>
> M-x shell<enter> cd ~/desk<tab>  --> no completion
>
> M-x shell<enter> cd ~/Desk<tab>  --> ~/Desktop

I think that's a "yes".  😀

Following the call sequence here is quite complicated.  The following
fixes the issue, but is it the correct solution here?

diff --git a/lisp/comint.el b/lisp/comint.el
index 544f0b8b82..0182839d5c 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -3289,22 +3289,23 @@ comint-filename-completion
     (comint--complete-file-name-data)))
 
 (defun comint-completion-file-name-table (string pred action)
-  (if (not (file-name-absolute-p string))
-      (completion-file-name-table string pred action)
-    (cond
-     ((memq action '(t lambda))
-      (completion-file-name-table
-       (concat comint-file-name-prefix string) pred action))
-     ((null action)
-      (let ((res (completion-file-name-table
-                  (concat comint-file-name-prefix string) pred action)))
-        (if (and (stringp res)
-                 (string-match
-                  (concat "\\`" (regexp-quote comint-file-name-prefix))
-                  res))
-            (substring res (match-end 0))
-          res)))
-     (t (completion-file-name-table string pred action)))))
+  (let ((completion-ignore-case read-file-name-completion-ignore-case))
+    (if (not (file-name-absolute-p string))
+        (completion-file-name-table string pred action)
+      (cond
+       ((memq action '(t lambda))
+        (completion-file-name-table
+         (concat comint-file-name-prefix string) pred action))
+       ((null action)
+        (let ((res (completion-file-name-table
+                    (concat comint-file-name-prefix string) pred action)))
+          (if (and (stringp res)
+                   (string-match
+                    (concat "\\`" (regexp-quote comint-file-name-prefix))
+                    res))
+              (substring res (match-end 0))
+            res)))
+       (t (completion-file-name-table string pred action))))))
 
 (defvar comint-unquote-function #'comint--unquote-argument
   "Function to use for completion of quoted data.

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




Changed bug title to 'Completion in shell buffers not ignoring case' from '29.0.50; pcomplete not ignoring case' Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 15 Nov 2021 09:06:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51858; Package emacs. (Fri, 19 Nov 2021 05:08:01 GMT) Full text and rfc822 format available.

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

From: Carlos Pita <carlosjosepita2 <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51858 <at> debbugs.gnu.org
Subject: Re: bug#51858: 29.0.50; pcomplete not ignoring case
Date: Fri, 19 Nov 2021 02:06:43 -0300
Hi Lars,

Thanks! Your fix works for me. I'm not sure if this is the best place to set
completion-ignore-case though. If you look at the code for
comint--complete-file-name-data you will find that
completion-ignore-case is set in the same way that you did. But perhaps
too late because at that point comint-completion-file-name-table has
already been called. Perhaps the best fix is to bind completion-ignore-case
earlier in comint--complete-file-name-data. But if
comint-completion-file-name-table is intended to be called from other places,
then it's better to set completion-ignore-case there as you did.

Best regards,
Carlos




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51858; Package emacs. (Fri, 19 Nov 2021 05:33:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Carlos Pita <carlosjosepita2 <at> gmail.com>
Cc: 51858 <at> debbugs.gnu.org
Subject: Re: bug#51858: 29.0.50; pcomplete not ignoring case
Date: Fri, 19 Nov 2021 06:32:00 +0100
Carlos Pita <carlosjosepita2 <at> gmail.com> writes:

> Thanks! Your fix works for me. I'm not sure if this is the best place to set
> completion-ignore-case though.

Yeah, me neither.  The completion machinery is hard to grok -- there's
so many magical wrappers and stuff that reasoning about it is a challenge.

> If you look at the code for comint--complete-file-name-data you will
> find that completion-ignore-case is set in the same way that you
> did. But perhaps too late because at that point
> comint-completion-file-name-table has already been called.

Yes, I think so.

> Perhaps the best fix is to bind completion-ignore-case
> earlier in comint--complete-file-name-data. But if
> comint-completion-file-name-table is intended to be called from other places,
> then it's better to set completion-ignore-case there as you did.

I think I tried doing that, and it didn't do the right thing, but I may
be mistaken.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51858; Package emacs. (Tue, 20 Sep 2022 13:34:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Carlos Pita <carlosjosepita2 <at> gmail.com>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 51858 <at> debbugs.gnu.org
Subject: Re: bug#51858: Completion in shell buffers not ignoring case
Date: Tue, 20 Sep 2022 15:32:58 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>> Perhaps the best fix is to bind completion-ignore-case
>> earlier in comint--complete-file-name-data. But if
>> comint-completion-file-name-table is intended to be called from other places,
>> then it's better to set completion-ignore-case there as you did.
>
> I think I tried doing that, and it didn't do the right thing, but I may
> be mistaken.

I bet Stefan has some insights here; added to the CCs.




This bug report was last modified 2 years and 324 days ago.

Previous Next


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