From: Lars Ingebrigtsen <larsi@gnus.org>
To: Carlos Pita <carlosjosepita2@gmail.com>
Cc: 51858@debbugs.gnu.org
Subject: bug#51858: 29.0.50; pcomplete not ignoring case
Date: Mon, 15 Nov 2021 09:00:38 +0100 [thread overview]
Message-ID: <87sfvxzw49.fsf@gnus.org> (raw)
In-Reply-To: <CAEOO5Tc8qfcTm1H8ORRxvbJ7vFCKbexrAo72NMkvYiFv6C0Apg@mail.gmail.com> (Carlos Pita's message of "Mon, 15 Nov 2021 04:16:06 -0300")
Carlos Pita <carlosjosepita2@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
next prev parent reply other threads:[~2021-11-15 8:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 5:47 bug#51858: 29.0.50; pcomplete not ignoring case Carlos Pita
2021-11-15 5:59 ` Lars Ingebrigtsen
2021-11-15 7:16 ` Carlos Pita
2021-11-15 8:00 ` Lars Ingebrigtsen [this message]
2021-11-19 5:06 ` Carlos Pita
2021-11-19 5:32 ` Lars Ingebrigtsen
2022-09-20 13:32 ` bug#51858: Completion in shell buffers " Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sfvxzw49.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=51858@debbugs.gnu.org \
--cc=carlosjosepita2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).