From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument 'last Date: Wed, 04 Jan 2023 16:08:32 +0000 Message-ID: References: <87358u5y6l.fsf@daniel-mendler.de> <226b32f79f2d431d75b6@heytings.org> <009141ba-c21a-a5cb-a81b-c72a12a26207@daniel-mendler.de> <226b32f79f728e6bfed4@heytings.org> <82cf05e4-3c3f-9804-4801-eb31988f6d7d@daniel-mendler.de> <226b32f79f325daf9c7a@heytings.org> <226b32f79fe1e154cfb4@heytings.org> <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@gmail.com> <3a2a25bc-9b15-cdc9-ace2-b859f71b5e71@daniel-mendler.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14407"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Daniel Mendler , Eli Zaretskii , 60464@debbugs.gnu.org, Jim Porter To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 04 17:09:09 2023 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 1pD6KC-0003Tt-3Q for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Jan 2023 17:09:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pD6K7-0003HU-Hq; Wed, 04 Jan 2023 11:09:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pD6K6-0003HJ-L1 for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2023 11:09:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pD6K6-0003Dy-8f for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2023 11:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pD6K5-0008Rd-TN for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2023 11:09:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Jan 2023 16:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60464 X-GNU-PR-Package: emacs Original-Received: via spool by 60464-submit@debbugs.gnu.org id=B60464.167284852132430 (code B ref 60464); Wed, 04 Jan 2023 16:09:01 +0000 Original-Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 16:08:41 +0000 Original-Received: from localhost ([127.0.0.1]:49406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD6Jk-0008R0-Ou for submit@debbugs.gnu.org; Wed, 04 Jan 2023 11:08:41 -0500 Original-Received: from heytings.org ([95.142.160.155]:58740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD6Je-0008Qn-RT for 60464@debbugs.gnu.org; Wed, 04 Jan 2023 11:08:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672848512; bh=IiW49PqX+B7jyiVMDbaVz1lDUVeZeXyniP/1fZNZBfM=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=enj048wuc1f/VVIadOGnUdFegzctiIbX9abAMP0B1t1yg+c1zU+pF82KtMivwGN2n JYULpM2Z8xfYE+1V+Hn/Ucy3GF3eWkmw8Zo9AURxSLwDfv5romuDpqMAPNBz18uoKy 5VW8JASZatDgnrGlQxn+0xM2Ikh6yiL40H4d4BJwhokqpjHydF8VXX9F713OR4vWyq W8yg+jTSDHLSr/M4puKkqV6ymMEuBT3pmZVjkOO9jK+xVDSYz6hpObwB5PHvXff+eQ mQrjr1ppqX1ajuZPX8u7o0+Kc++mhSmmiU7yJALHNEIMeoDQTcn/OarY7h97SaXISV IqQs9UWnjsvIg== In-Reply-To: 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:252503 Archived-At: >> I'm not the one who wrote that code. According to my analysis of the >> code, the only place where pcomplete-arg is called with a 'last' >> argument is pcomplete-parse-arguments, where you will see the >> following: >> >> (defun pcomplete-parse-arguments (&optional expand-p) >> ... >> (let ((results (funcall pcomplete-parse-arguments-function))) >> (when results >> (setq ... >> pcomplete-stub (pcomplete-arg 'last)) >> (let ... >> (if (and (listp pcomplete-stub) ;?? >> (not pcomplete-expand-only-p)) >> ;; If `pcomplete-stub' is a list, it means it's a list of >> ;; completions computed during parsing, e.g. Eshell uses >> ;; that to turn globs into lists of completions. > > That's also my understanding. So I think The Right Fix (or at least The > Better Fix) is to pay no special attention to `last` in `pcomplete-arg` > and instead in the above code of `pcomplete-parse-arguments` to look for > the `pcomplete-arg-value` property. > That would be even better, indeed. But it would be a larger change. > > Maybe for `emacs-29` we can use your patch (with a comment about why > `last` is handled specially pointing to its handling in > `pcomplete-parse-arguments`) and then in `master` we remove this special > handling of `last`? > I'm fine with that. Unless someone objects, I'll push that patch in a day or two, and I'll do that change on master afterwards.