From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#51858: 29.0.50; pcomplete not ignoring case Date: Mon, 15 Nov 2021 09:00:38 +0100 Message-ID: <87sfvxzw49.fsf@gnus.org> References: <87ee7i0xiq.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22200"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51858@debbugs.gnu.org To: Carlos Pita Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 15 09:01:56 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmWw7-0005Zv-BW for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Nov 2021 09:01:55 +0100 Original-Received: from localhost ([::1]:54088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmWw5-0001Zi-Ik for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Nov 2021 03:01:53 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmWvH-0001CG-Qw for bug-gnu-emacs@gnu.org; Mon, 15 Nov 2021 03:01:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40932) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmWvH-0007Af-Eu for bug-gnu-emacs@gnu.org; Mon, 15 Nov 2021 03:01:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mmWvG-0000iU-DY for bug-gnu-emacs@gnu.org; Mon, 15 Nov 2021 03:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Nov 2021 08:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51858 X-GNU-PR-Package: emacs Original-Received: via spool by 51858-submit@debbugs.gnu.org id=B51858.16369632502726 (code B ref 51858); Mon, 15 Nov 2021 08:01:02 +0000 Original-Received: (at 51858) by debbugs.gnu.org; 15 Nov 2021 08:00:50 +0000 Original-Received: from localhost ([127.0.0.1]:52478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmWv3-0000hu-SK for submit@debbugs.gnu.org; Mon, 15 Nov 2021 03:00:50 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:41052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmWv2-0000hd-HB for 51858@debbugs.gnu.org; Mon, 15 Nov 2021 03:00:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=zTLIb/i5qW0Z/W7olJGni2i25bJXPnmrTaEpCB+lJAs=; b=oKlhf9ASQZeH4C9J+DuZnxnTpd DeZPlMwF7vew5YcVw1yx1PHaCGv207uvXPy2ocLe56ZIW88lrUtBoko0NIXeibZf4KdM/6kXT3482 d1mSnjJeQh3v+P+eNjYyJoKLm5HtGpivtRIFA9sgmth+RwkSMNNrk3yiVNbqvgSs9T6Q=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmWut-00030z-EX; Mon, 15 Nov 2021 09:00:42 +0100 X-Now-Playing: The Art of Noise's _Noise in the City (Live in Tokyo, 1986)_: "Legs" In-Reply-To: (Carlos Pita's message of "Mon, 15 Nov 2021 04:16:06 -0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:220040 Archived-At: Carlos Pita 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 --> ~/Desktop > > M-x shell cd ~/desk --> no completion > > M-x shell cd ~/Desk --> ~/Desktop I think that's a "yes". =F0=9F=98=80 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))) =20 (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)))))) =20 (defvar comint-unquote-function #'comint--unquote-argument "Function to use for completion of quoted data. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no