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#51130: 29.0.50; shell completion fails to complete filenames Date: Wed, 14 Sep 2022 14:28:26 +0200 Message-ID: <878rmmb0np.fsf@gnus.org> References: <87a67496rq.fsf@gnus.org> <87k0674j4k.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4168"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51130@debbugs.gnu.org, Carlos Pita To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 14 15:10:16 2022 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 1oYS9f-0000sI-9B for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 15:10:15 +0200 Original-Received: from localhost ([::1]:41902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYS9d-0008Al-NS for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 09:10:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYRVn-000363-Gc for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 08:29:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37115) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYRVn-0007d8-AM for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 08:29:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oYRVn-0008NE-4k for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 08:29:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Sep 2022 12:29:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51130 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 51130-submit@debbugs.gnu.org id=B51130.166315852332150 (code B ref 51130); Wed, 14 Sep 2022 12:29:03 +0000 Original-Received: (at 51130) by debbugs.gnu.org; 14 Sep 2022 12:28:43 +0000 Original-Received: from localhost ([127.0.0.1]:54045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYRVT-0008MT-Br for submit@debbugs.gnu.org; Wed, 14 Sep 2022 08:28:43 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:48260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYRVR-0008MB-RR for 51130@debbugs.gnu.org; Wed, 14 Sep 2022 08:28:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=/K90YlOMCjaga52fVLpPuZklNGS02lriIGvnFm16ZCg=; b=OlEguwart+0+a5fkY7BllcB5eM IZkrSCa2G8dSbdd4ErlyrGHDUaKC3UC8SxSVHpfYyKg2x9XQQk7PT2n1mqDpbYcdfwypzM8Dkn+ig Mor19f+AQUaxEmX+Qx/FVNSwGtmJRLsAp2NhWIHBh8oYCRms1XiGKuYKOj+g18nLBi5E=; Original-Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oYRVC-0006Or-M3; Wed, 14 Sep 2022 14:28:28 +0200 In-Reply-To: (Stefan Monnier's message of "Tue, 13 Sep 2022 09:32:43 -0400") X-Now-Playing: Mia Doi Todd's _Ten Views of Music Life_: "Music Life (Georgia Anne Muldrow Remix)" 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:242451 Archived-At: Stefan Monnier writes: > Look at `shell-dynamic-complete-functions`: > > (defcustom shell-dynamic-complete-functions > '(comint-c-a-p-replace-by-expanded-history > shell-environment-variable-completion > shell-command-completion > shell-c-a-p-replace-by-expanded-directory > pcomplete-completions-at-point > shell-filename-completion > comint-filename-completion) > "List of functions called to perform completion. > This variable is used to initialize `comint-dynamic-complete-functions' in the > shell buffer." > :type '(repeat function) > :group 'shell) > > if `pcomplete-default-completion-function` is left at its default value, > then `pcomplete-completions-at-point` will never return nil, so the > functions that appear after it in the above list will just never > be used. Ah, the detail I missed was that pcomplete-completions-at-point is (partially) controlled by pcomplete-default-completion-function -- from the documentation, I assumed that pcomplete-default-completion-function was run after all of the other completion functions had finished. > The change I introduced tried to preserve as much of the existing > completion as possible, by only using the non-fallback pcomplete rules > and keeping the existing `shell-filename-completion` and > `comint-filename-completion` thingies as the fallback. > > I don't know that it's the best choice. It was just the > conservative choice. Could just put an additional function at the end of the list there that does what pcomplete-completions-at-point does when pcomplete-default-completion-function isn't set to #'ignore?