GNU bug report logs - #60464
29.0.60; Regression - pcomplete-arg fails with argument 'last

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Daniel Mendler <mail@HIDDEN>; dated Sun, 1 Jan 2023 10:48:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 18:41:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 13:41:21 2023
Received: from localhost ([127.0.0.1]:49601 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD8hU-0004Kl-Ou
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 13:41:20 -0500
Received: from mail-pj1-f46.google.com ([209.85.216.46]:42955)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jporterbugs@HIDDEN>) id 1pD8hT-0004KZ-PI
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 13:41:20 -0500
Received: by mail-pj1-f46.google.com with SMTP id
 z9-20020a17090a468900b00226b6e7aeeaso2438471pjf.1
 for <60464 <at> debbugs.gnu.org>; Wed, 04 Jan 2023 10:41:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:mime-version:date:message-id:from:to:cc
 :subject:date:message-id:reply-to;
 bh=YrhJxXaPoKo3Y7Huq9x2F9xPa01hDPFg7v/pI7CMFoo=;
 b=FEX8qbr+B0ArfwKGnlUuIW/8nSsWvw2cK1iJMIhb1sVyX+1fcg1g0mtjB9KwMv4Ql9
 y+tAD6blZHjgGYiWz6JDfU+NiaHlMS/EYzb+CtKZPqYkomQJA2B0hZCNfL+IFtUwaq+X
 PJk7g0tOmRlA/O7f4yC0cmwSJiJsLGllYuVXYpDomuXl6UuUz/jjNp+pLoC7R3Gt++P6
 46t3WRW97fNy/eviHh3P4KEdPGgabsbanHSTCIlFODG1ZhK+nKJuutqjil4tagVLWH5p
 5tDcHsWfZUmAOUeOSSaX7zOj4H9yrXTIZyYZjsYtAQtqwBgfQkvtSPZtsOuaEwoSeC6A
 5cNA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:mime-version:date:message-id
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=YrhJxXaPoKo3Y7Huq9x2F9xPa01hDPFg7v/pI7CMFoo=;
 b=lp82ucGZ0TjqIOUrHQenrOMTwVAIhfKmXVTUQowH10C7Dsv9mTLLGGtqvIm9gl7XiA
 2Bg0VH3HJTn+RO8EsWP1J0NH7uiESsLmGDLEVcfWPMgw7tQWZSkKQVCaHOIUnMXM36/o
 lcOyAFFUKG4602tIciwoG7e5DhGZ684NDI/I45b/yjPIIfGCw+WSl3EC3TP6VwvxByJi
 dUqa5Gpq/pOa9nP6mFqZQnaNL+x1O7Y8ARqJ1fPHNAkc80mSakwC+Ze4Z4+xkhmG0uSQ
 EoAtzNMkLrHvyAc9gvGh/5UlcEpUGym7iq8Hw4eosGmeYMI1I2RtV+SX8PVBLyetCBKF
 vEWQ==
X-Gm-Message-State: AFqh2kqJZlwHf1i/msxoEs0ZRReAUyCdgINUo74jz5qqYGRKw/PpzMyn
 9xJUwSpzU5Ux+ESTM5LD7Bw=
X-Google-Smtp-Source: AMrXdXtntaj1LGLFGS/SZLgJpT+JjlNdtD4s8qJK+pVru6r9/SxEU6d2Z2/O8EDQONeG44BTBspwOA==
X-Received: by 2002:a17:902:c9d2:b0:192:ee98:664c with SMTP id
 q18-20020a170902c9d200b00192ee98664cmr2377515pld.54.1672857673805; 
 Wed, 04 Jan 2023 10:41:13 -0800 (PST)
Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com.
 [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id
 e1-20020a170902784100b00192c4055e72sm7502559pln.173.2023.01.04.10.41.12
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 04 Jan 2023 10:41:13 -0800 (PST)
Message-ID: <ccf6a867-ef76-b3f7-35bf-185f65ff976d@HIDDEN>
Date: Wed, 4 Jan 2023 10:41:14 -0800
MIME-Version: 1.0
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
Content-Language: en-US
To: Gregory Heytings <gregory@HIDDEN>,
 Daniel Mendler <mail@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN> <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
 <ae6be09dfed453117dfb@HIDDEN> <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
 <3a2a25bc-9b15-cdc9-ace2-b859f71b5e71@HIDDEN>
 <ae6be09dfe876033b91c@HIDDEN>
From: Jim Porter <jporterbugs@HIDDEN>
In-Reply-To: <ae6be09dfe876033b91c@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: Eli Zaretskii <eliz@HIDDEN>, 60464 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 1/4/2023 6:46 AM, Gregory Heytings wrote:
> 
>>
>> This seems like its opening the door for yet another bug.
>>
> 
> That's always possible, of course.  Jim tested it extensively.  Can you 
> do the same?

Well, let's not say "extensively". :) I tested the small set of things I 
could think of that would be likely to break here. However, since I know 
very little about Pcomplete, my testing was mostly just "try a few 
different Eshell constructs and make sure no errors get signaled".




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 16:08:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 11:08:41 2023
Received: from localhost ([127.0.0.1]:49406 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD6Jk-0008R0-Ou
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 11:08:41 -0500
Received: from heytings.org ([95.142.160.155]:58740)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1pD6Je-0008Qn-RT
 for 60464 <at> 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==
Date: Wed, 04 Jan 2023 16:08:32 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
In-Reply-To: <jwvr0wae1q5.fsf-monnier+emacs@HIDDEN>
Message-ID: <ae6be09dfe31079f51b0@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
 <ae6be09dfed453117dfb@HIDDEN> <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
 <3a2a25bc-9b15-cdc9-ace2-b859f71b5e71@HIDDEN>
 <ae6be09dfe876033b91c@HIDDEN>
 <c7d36cc9-0d71-2148-bd8f-09805ebe097e@HIDDEN>
 <ae6be09dfea753ef1af9@HIDDEN> <jwvr0wae1q5.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: Daniel Mendler <mail@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Jim Porter <jporterbugs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



>> 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.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 15:56:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 10:56:36 2023
Received: from localhost ([127.0.0.1]:49386 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD684-00084W-2Z
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 10:56:36 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19725)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1pD683-00084I-3o
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 10:56:35 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 9E3D8441108;
 Wed,  4 Jan 2023 10:56:29 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B9F9544109B;
 Wed,  4 Jan 2023 10:56:27 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1672847787;
 bh=Iv9rZb2eJBkM9+Og9+mDPsXhp9rVH9S8JE0UkuB9tCc=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=OiSWX9G3YJvBdwFzJuHhbqrtoYxItxPZgzaNKWYX6Y2Enavc5OqV/lS8NNF2coe4G
 WYVP3HqDY0Viv1nPoTtjjBoBywLXsIU1NVF1/NH4IZZZQzdXKNEjeBjITPY+zZHApp
 JSFOYbnEiWbqr8jrevZv/WtmyqCRRNlZmrwOu913S9Cx16uOcJgkv+Cbq7yghzsLLM
 xd0FReYq1j5ajlpkBhvwhtVgIxSOgQQp5xwjn97O4NHe19Q69cBXsFCIg5OxPcYgC9
 O74+GRAw5lbnK/7dAxp+9lhFnBSGVBMi6JWfx812I/RiDSnr4tvhroJZaQNg6HP5LZ
 zCNAAhSPep4Vg==
Received: from pastel (unknown [45.72.200.228])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 88FF01200FC;
 Wed,  4 Jan 2023 10:56:27 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
In-Reply-To: <ae6be09dfea753ef1af9@HIDDEN> (Gregory Heytings's message
 of "Wed, 04 Jan 2023 15:39:26 +0000")
Message-ID: <jwvr0wae1q5.fsf-monnier+emacs@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
 <ae6be09dfed453117dfb@HIDDEN>
 <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
 <3a2a25bc-9b15-cdc9-ace2-b859f71b5e71@HIDDEN>
 <ae6be09dfe876033b91c@HIDDEN>
 <c7d36cc9-0d71-2148-bd8f-09805ebe097e@HIDDEN>
 <ae6be09dfea753ef1af9@HIDDEN>
Date: Wed, 04 Jan 2023 10:56:26 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.296 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: Daniel Mendler <mail@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Jim Porter <jporterbugs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Gregory Heytings [2023-01-04 15:39:26] wrote:
>> Your implementation with the 'last condition doesn't make sense.
> Can you please try to make it fail?
>> It is not a good idea to treat 'last specially such that we return a
>> different type in this case.
> 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.

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`?


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 15:48:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 10:48:44 2023
Received: from localhost ([127.0.0.1]:49376 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD60R-0007rY-Mj
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 10:48:44 -0500
Received: from server.qxqx.de ([178.63.65.180]:57355 helo=mail.qxqx.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1pD60P-0007rI-JJ
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 10:48:41 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:
 References:Cc:To:Subject:MIME-Version:Date:Message-ID: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=707ouYVJaNQe8rHTsVRJQKWe0eLSgUrrJxSNFlen0qM=; b=x71xHyoi3YxKzZqVjdlZWOwnqB
 1KCgd2GZ/sVAKktJ4TjiI0bW1l7VrirLtLNlpRTmYf3n2ZrP9B/Sbf2kx3VhPw5Q63QT3u9PxwKzE
 O7FZkYlQhHatFJD+xSdIRtNAePV08bRBGbCZgoWV6EuzSgjnQgehuUvxKoqU/6dUnKl4=;
Message-ID: <61bb3dee-407c-1cda-e9ba-95eb8ab7bd3b@HIDDEN>
Date: Wed, 4 Jan 2023 16:48:32 +0100
MIME-Version: 1.0
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
To: Gregory Heytings <gregory@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN> <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
 <ae6be09dfed453117dfb@HIDDEN> <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
 <3a2a25bc-9b15-cdc9-ace2-b859f71b5e71@HIDDEN>
 <ae6be09dfe876033b91c@HIDDEN>
 <c7d36cc9-0d71-2148-bd8f-09805ebe097e@HIDDEN>
 <ae6be09dfea753ef1af9@HIDDEN>
Content-Language: en-US
From: Daniel Mendler <mail@HIDDEN>
In-Reply-To: <ae6be09dfea753ef1af9@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: Jim Porter <jporterbugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 1/4/23 16:39, Gregory Heytings wrote:
>> Your implementation with the 'last condition doesn't make sense.
> 
> Can you please try to make it fail?

That was not my point. The way the function behaves now is problematic
on theoretical grounds.

>> It is not a good idea to treat 'last specially such that we return a
>> different type in this case.
>>
> 
> 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:

I am not blaming you for it. If your analysis is right (and there are
not many or even only a single caller), what about deprecating support
for 'last and 'first then, if these lead to problems? Stefan said before
that Pcomplete needs some refactoring and fixing so one could do it in
small steps. We could then fix the few call sites which are there. But
such changes may be too late for Emacs 29.

Daniel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 15:39:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 10:39:31 2023
Received: from localhost ([127.0.0.1]:49363 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD5rW-0007Yy-Nt
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 10:39:31 -0500
Received: from heytings.org ([95.142.160.155]:58668)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1pD5rU-0007Yp-4r
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 10:39:28 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1672846766;
 bh=eUztm2tZQB9GSJDzdgf5e82pq1rC3vaZ74i70F+GvAw=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=hJdTXIi3Y3px3Qda8eRUx6evL/dNbLXyYk+ZXVJ8o+Zr93NYY6q0cENiyEgeD1/1l
 Wkm+cRzm/ypcU/VTEGNrHgHGz0cEIdMJPG12AhlOw8PAIC0ovePEX7E/WdDFiX2bDw
 B5U2ioNjaMi2Q3Sk4bW42SrIOFDIEaS66Hu5smF8vado0+lE8uNoPVayEpLAOU5PF7
 E99TavKqXU/lX1bxjsENGFBSvufT+qwrAxU7zWpiiaYN1ba7xJs/+F3w4CQTLIWAWE
 H9vxpJTIhAemYOc6svRZpYHluE+xbvQ28mpxxeCkJ3TCERdVHvOBsOUXC6I7kq+mOx
 35UYGb+tPCQjQ==
Date: Wed, 04 Jan 2023 15:39:26 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Daniel Mendler <mail@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
In-Reply-To: <c7d36cc9-0d71-2148-bd8f-09805ebe097e@HIDDEN>
Message-ID: <ae6be09dfea753ef1af9@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
 <ae6be09dfed453117dfb@HIDDEN> <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
 <3a2a25bc-9b15-cdc9-ace2-b859f71b5e71@HIDDEN>
 <ae6be09dfe876033b91c@HIDDEN>
 <c7d36cc9-0d71-2148-bd8f-09805ebe097e@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: Jim Porter <jporterbugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> Your implementation with the 'last condition doesn't make sense.
>

Can you please try to make it fail?

>
> It is not a good idea to treat 'last specially such that we return a
> different type in this case.
>

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.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 15:23:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 10:23:03 2023
Received: from localhost ([127.0.0.1]:49350 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD5ba-00079d-OP
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 10:23:03 -0500
Received: from server.qxqx.de ([178.63.65.180]:33827 helo=mail.qxqx.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1pD5bZ-00078y-Fu
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 10:23:01 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:
 References:Cc:To:Subject:MIME-Version:Date:Message-ID: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=2MXBqElVksAEIytj+E212q1WABomnuprWPOIQ69PYGo=; b=r5OY6tpvfGLxLteyfHsfavsYD6
 x2wV/t01F7vfQJD16EpYBT9OEquNiCVEUWtbZVlvSjLNVCfDx9plJZBmgHBp4rCqomZz4yvdSiiiC
 x1x47iJxc5J6eAZfR7SAV1W74FIYayh9rw2Iakmr1vl1e+9IAA/BZoobdpXXGylsFmI8=;
Message-ID: <ba66ede4-edaf-a9b9-f4a9-fbb695cd9326@HIDDEN>
Date: Wed, 4 Jan 2023 16:22:53 +0100
MIME-Version: 1.0
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
Content-Language: en-US
To: Eli Zaretskii <eliz@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN> <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
 <ae6be09dfed453117dfb@HIDDEN> <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
 <3a2a25bc-9b15-cdc9-ace2-b859f71b5e71@HIDDEN>
 <ae6be09dfe876033b91c@HIDDEN>
 <c7d36cc9-0d71-2148-bd8f-09805ebe097e@HIDDEN>
 <83bknez5u0.fsf@HIDDEN>
From: Daniel Mendler <mail@HIDDEN>
In-Reply-To: <83bknez5u0.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: jporterbugs@HIDDEN, gregory@HIDDEN, 60464 <at> debbugs.gnu.org,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)



On 1/4/23 16:18, Eli Zaretskii wrote:
>> Date: Wed, 4 Jan 2023 16:14:14 +0100
>> Cc: Stefan Monnier <monnier@HIDDEN>,
>>  Jim Porter <jporterbugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
>>  60464 <at> debbugs.gnu.org
>> From: Daniel Mendler <mail@HIDDEN>
>>
>> Your implementation with the 'last condition doesn't make sense.
> 
> "Doesn't make sense" is a harsh judgment of someone's code, and I have
> hard time believing Gregory's deserves that.  Please try to be kinder
> in how you express your disagreements with someone else's code.

I try to formulate it more fairly. In my opinion Gregory's patches so
far did not fix the issue in a way which is future-proof. The first
prematurely installed patch was obviously broken. The current proposal
introduces an unexpected special casing, where it would be better if the
function behaves uniformly for all arguments.

Daniel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 15:19:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 10:19:52 2023
Received: from localhost ([127.0.0.1]:49338 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD5YW-00073I-II
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 10:19:52 -0500
Received: from server.qxqx.de ([178.63.65.180]:45695 helo=mail.qxqx.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1pD5YV-000735-3V
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 10:19:51 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:
 References:Cc:To:Subject:MIME-Version:Date:Message-ID: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=Hewv+d5FmBCRCgISGelFCXap7RPuVU2mllF2zl51YdI=; b=bKpn2VSGudeXbeeb+N9CZn/TqG
 xecLe+fThFQ61pYatEL9Xjw0chIs64PYvUTE6DFaZpETvdt/y63R5qGcFf+oweIqSEK0E0tBkr3ZT
 LN27WrsQ8oSvuBIFDeJZIOL1u0qBnIVgGIkN4h/wl/XBThhtl1IoWjXW82LxSsZUBlWk=;
Message-ID: <c384ad5d-5ca2-50dd-4d9c-dde61432fd28@HIDDEN>
Date: Wed, 4 Jan 2023 16:19:42 +0100
MIME-Version: 1.0
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
To: Gregory Heytings <gregory@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN> <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
 <ae6be09dfed453117dfb@HIDDEN> <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
 <ae6be09dfe378bbaa1ad@HIDDEN>
Content-Language: en-US
From: Daniel Mendler <mail@HIDDEN>
In-Reply-To: <ae6be09dfe378bbaa1ad@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: Jim Porter <jporterbugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)



On 1/4/23 15:36, Gregory Heytings wrote:
> 
>>> IOW, instead of unconditionally returning arg, we now sometimes (when 
>>> arg is not already a string and when index is not last) return the 
>>> textual representation of that argument (what the user typed in) with 
>>> the value of arg attached to it.
>>
>> I don't understand the `last` condition.
>>
>> Could you explain it (e.g. with a concrete example that breaks if you 
>> don't include it)?
>>
> 
> Yes: when index is 'last' returning a non-string (more precisely: a list 
> of strings) is allowed (and in fact expected, at least by Eshell).  A 
> recipe, in the Emacs repository:
> 
> M-x eshell
> cd lisp
> ls *.el TAB
> 
> (Note that there is no SPC before TAB.)
> 
> Without the 'last' condition, you don't get what you're supposed to get at 
> that point (and what you got with Emacs 27 or 28), namely the list of .el 
> files in *Completions*.  Instead you see "Complete, but not unique", and 
> you have to press TAB a second time to see the completions.

Don't you think that this is by accident? Shouldn't Eshell fixed instead
to not expect a list in this case? I believe it would be better if
pcomplete-arg behaves uniformly for all arguments.

Daniel





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 15:18:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 10:18:13 2023
Received: from localhost ([127.0.0.1]:49334 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD5Wv-00070s-54
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 10:18:13 -0500
Received: from eggs.gnu.org ([209.51.188.92]:54430)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pD5Wt-00070e-9W
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 10:18:11 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pD5Wn-0007oE-5p; Wed, 04 Jan 2023 10:18:05 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=C2gUuW4txBbUQwCy3G12eBVbOnw8C7Xsm8FjbVCIScM=; b=M9gTOondrN/X
 Pq1mX5oghe078GojVguK2xSd6Naf7kC/u3S3rF1VdG7NGf/It82cjAKtbygiSweCXAGgR6ocW8TH/
 wU/706d4+Pn+biQq19rxgkfe4mNdR5d0R1UX2lzXksElvCLfKXKVsmZpXJqPJpXdyIcQMuv3KCCBZ
 oc2MD3KnDCwxweEU4xfuBhaPwTSAV9g3baySi4ctkWarBSsKAiWvzrmn2jjFjehXzocpVpnZvKn8O
 IgyqFkNX2nmg9QzDKfmGJGxpYVRCHBb9m+ja0NDE8LaRRiARTBQTuzegvjQ+f/5Zt0mSJZVK6vjOD
 TPwZ2FdqqnbA9f1dXiJo7A==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pD5Wl-0002jy-Sw; Wed, 04 Jan 2023 10:18:04 -0500
Date: Wed, 04 Jan 2023 17:18:15 +0200
Message-Id: <83bknez5u0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Daniel Mendler <mail@HIDDEN>
In-Reply-To: <c7d36cc9-0d71-2148-bd8f-09805ebe097e@HIDDEN> (message
 from Daniel Mendler on Wed, 4 Jan 2023 16:14:14 +0100)
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN> <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
 <ae6be09dfed453117dfb@HIDDEN> <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
 <3a2a25bc-9b15-cdc9-ace2-b859f71b5e71@HIDDEN>
 <ae6be09dfe876033b91c@HIDDEN>
 <c7d36cc9-0d71-2148-bd8f-09805ebe097e@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: jporterbugs@HIDDEN, gregory@HIDDEN, 60464 <at> debbugs.gnu.org,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Wed, 4 Jan 2023 16:14:14 +0100
> Cc: Stefan Monnier <monnier@HIDDEN>,
>  Jim Porter <jporterbugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
>  60464 <at> debbugs.gnu.org
> From: Daniel Mendler <mail@HIDDEN>
> 
> Your implementation with the 'last condition doesn't make sense.

"Doesn't make sense" is a harsh judgment of someone's code, and I have
hard time believing Gregory's deserves that.  Please try to be kinder
in how you express your disagreements with someone else's code.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 15:14:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 10:14:25 2023
Received: from localhost ([127.0.0.1]:49329 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD5TF-0006ue-J0
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 10:14:25 -0500
Received: from server.qxqx.de ([178.63.65.180]:57125 helo=mail.qxqx.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1pD5TD-0006uQ-Ds
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 10:14:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:
 References:Cc:To:Subject:MIME-Version:Date:Message-ID: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=z1AThc58RBzobYYgko03xqzT8rWIpBTVM2dzePdOlAw=; b=pSTBLG8vWMFTNSnB6TbBMefJO4
 fbvxEaYX5J14epzw/iwKOgsRVyknLlfaxoRcNjqIRT7NU34qr8PdB8cFHw51/R7jFePeyw+WlUHKc
 S8VJ8ZGfxjmM5cmQ6Z1J62IEI6sgsRsWQ1F96VAgFCNBxe1v/Agn58aK9aKcSTftijPc=;
Message-ID: <c7d36cc9-0d71-2148-bd8f-09805ebe097e@HIDDEN>
Date: Wed, 4 Jan 2023 16:14:14 +0100
MIME-Version: 1.0
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
To: Gregory Heytings <gregory@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN> <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
 <ae6be09dfed453117dfb@HIDDEN> <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
 <3a2a25bc-9b15-cdc9-ace2-b859f71b5e71@HIDDEN>
 <ae6be09dfe876033b91c@HIDDEN>
Content-Language: en-US
From: Daniel Mendler <mail@HIDDEN>
In-Reply-To: <ae6be09dfe876033b91c@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: Jim Porter <jporterbugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 1/4/23 15:46, Gregory Heytings wrote:
>> Gregory, could you please take a look at the version of pcomplete-arg 
>> that I've sent?
>
> I did.  It's not better (and in fact much more bug-prone) than reusing 
> pcomplete-actual-arg.

Maybe, but it works well for me. Your implementation with the 'last
condition doesn't make sense. It is not a good idea to treat 'last
specially such that we return a different type in this case. This is
more bug-prone for the caller.

Daniel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 14:50:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 09:50:37 2023
Received: from localhost ([127.0.0.1]:48073 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD56C-000625-Sv
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 09:50:37 -0500
Received: from eggs.gnu.org ([209.51.188.92]:43164)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pD56A-00061r-MK
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 09:50:35 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pD564-0005j9-PJ; Wed, 04 Jan 2023 09:50:28 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=5NCOoVgHSHV79YIz5PVwcaTDH9GmP3fqIqMzCiFK6GM=; b=k6yGF/JLS1+z
 2Aj6KKNdx5qlHUa4AXr7TViorxoJbJIecrqnKMuMJz0VfkZBMSUvw3GZWQ6lbBQqV1TxNq7jd7lrU
 BCe8hARj7jwfJY9QeoCoRAJEcUaQHU1nxY0o6jB2N//xqFlyAMOAer27J++Dr283qJPoP3TRiQar7
 mSRiGIdFuaQEAF+m5f0xFJxZoKtvrfFucgBcxT9ZEWXo6qcZFus3wEjODJYu6fKEg4COpS14opm7h
 8WYTGOF02hqGTr978VTZ8vMnnGzbchZASDO5AjENZ/8vSeBoCw9ZfE0a3a+gWuHWfSBQcbqt0fq5j
 vEye8HTV/lAfiFZ3qFoKiA==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pD564-0002Kp-9a; Wed, 04 Jan 2023 09:50:28 -0500
Date: Wed, 04 Jan 2023 16:50:41 +0200
Message-Id: <83edsaz73y.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
In-Reply-To: <ae6be09dfed453117dfb@HIDDEN> (message from Gregory
 Heytings on Wed, 04 Jan 2023 13:48:25 +0000)
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
 <ae6be09dfed453117dfb@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: jporterbugs@HIDDEN, 60464 <at> debbugs.gnu.org, monnier@HIDDEN,
 mail@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Wed, 04 Jan 2023 13:48:25 +0000
> From: Gregory Heytings <gregory@HIDDEN>
> cc: Daniel Mendler <mail@HIDDEN>, 
>     Stefan Monnier <monnier@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 
>     60464 <at> debbugs.gnu.org
> 
> > Thanks. I tried this out for a bit, and I haven't been able to break it 
> > yet (although I didn't notice the issue that spawned this bug# the last 
> > time either, so it's possible I'm missing some problem this time around, 
> > too).
> >
> 
> Thanks for your confirmation.
> 
> Stefan, do you agree with the attached patch?  Or would you like something 
> else?
> 
> Eli, are you okay with that patch?

Yes, provided that Stefan is okay with it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 14:46:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 09:46:52 2023
Received: from localhost ([127.0.0.1]:48042 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD52Z-0005re-V1
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 09:46:52 -0500
Received: from heytings.org ([95.142.160.155]:58588)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1pD52Y-0005rW-1S
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 09:46:50 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1672843609;
 bh=DXVU2u8YVtK+JkfRXfyQiQvCon9JI/Zh4cYbi1HX0fA=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=7s4XY8t3J5LYtS2LwSrT6QTGxOPpf0QPmb2d5JCtU3kgcaWc3FZs6RkuunV3YBWF0
 8MqgRmb27ISp3eq3haR5x9lVj1x4T2piBxnbC7VbUAU4oE09PrEylr13Cu0JXyPF2K
 Ag1uPYb/8Z6HtXBvYLhxVsimmMnkhgFh4SzOeuVT+B3nYwLkiEPpP5xmqmFHUEC9LX
 PagM5QxS71S4jkEVn6pjSzHKHFipcQjB9iOP2136xdcY/ih8G9uVJ1sYFaqX6/C3GK
 oLYpliditzgWhNbMVFptFkNiyxkH3Z9uF62wnneLcMOlw0Ny0KXJDpFaNVsTqU/dgA
 iBmUkPGCjQb0Q==
Date: Wed, 04 Jan 2023 14:46:49 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Daniel Mendler <mail@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
In-Reply-To: <3a2a25bc-9b15-cdc9-ace2-b859f71b5e71@HIDDEN>
Message-ID: <ae6be09dfe876033b91c@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
 <ae6be09dfed453117dfb@HIDDEN> <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
 <3a2a25bc-9b15-cdc9-ace2-b859f71b5e71@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: Jim Porter <jporterbugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> This seems like its opening the door for yet another bug.
>

That's always possible, of course.  Jim tested it extensively.  Can you do 
the same?

>
> Gregory, could you please take a look at the version of pcomplete-arg 
> that I've sent?
>

I did.  It's not better (and in fact much more bug-prone) than reusing 
pcomplete-actual-arg.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 14:36:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 09:36:57 2023
Received: from localhost ([127.0.0.1]:48014 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD4sz-0005bL-4T
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 09:36:57 -0500
Received: from heytings.org ([95.142.160.155]:58536)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1pD4sx-0005b8-9T
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 09:36:55 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1672843014;
 bh=tSvJzQwpwlPrfRs/pUB6rBYCnvWrGm9UW1Qp+MKC6+M=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=INKa3Dc3lCpXrFFDSlg7zq/khng/9FT3FYaelcJzriCnq+19gvkV24wk+Ycj/omfw
 j7Tq2nXgu7gIqAHQip4Oigzf6iOg/Q/bFSWlE127ZSect5mPJyiQNUf00v5BYBFeV6
 jTkhFKK/QGel7uCHBlkqg7T9cN7qKvyHL4CfL1exTaPndtVqVyZnPqxJX/pIHM+a48
 17XpbLSaiVsL+aTV7nCBdqyY60QrBhq3SczgyxD0z7de0xe9JHrnlhiV8V0FpM+LzF
 UKIjU6zuY3Xs/o+y+dq08Mh4Y9wWzcUXCIhn7tJx28HtPaWosmid0WbV5f36Fuxia4
 C4grrO/FSE3JA==
Date: Wed, 04 Jan 2023 14:36:53 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
In-Reply-To: <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
Message-ID: <ae6be09dfe378bbaa1ad@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
 <ae6be09dfed453117dfb@HIDDEN> <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: Jim Porter <jporterbugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Daniel Mendler <mail@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>> IOW, instead of unconditionally returning arg, we now sometimes (when 
>> arg is not already a string and when index is not last) return the 
>> textual representation of that argument (what the user typed in) with 
>> the value of arg attached to it.
>
> I don't understand the `last` condition.
>
> Could you explain it (e.g. with a concrete example that breaks if you 
> don't include it)?
>

Yes: when index is 'last' returning a non-string (more precisely: a list 
of strings) is allowed (and in fact expected, at least by Eshell).  A 
recipe, in the Emacs repository:

M-x eshell
cd lisp
ls *.el TAB

(Note that there is no SPC before TAB.)

Without the 'last' condition, you don't get what you're supposed to get at 
that point (and what you got with Emacs 27 or 28), namely the list of .el 
files in *Completions*.  Instead you see "Complete, but not unique", and 
you have to press TAB a second time to see the completions.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 14:35:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 09:35:52 2023
Received: from localhost ([127.0.0.1]:48005 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD4rw-0005Z1-CF
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 09:35:52 -0500
Received: from server.qxqx.de ([178.63.65.180]:43467 helo=mail.qxqx.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1pD4rv-0005Ym-1F
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 09:35:51 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:
 References:Cc:To:Subject:MIME-Version:Date:Message-ID: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=EGLz1c4RP9n9IdBAwiXnOZYcQJuVJB8PTSBXiotyIhQ=; b=Lgups9UMA1eyj9aFwRtQEkE3xg
 GFiafPNgDo/MC7d//sqnQTH+7Xb/R0VoxVNBPFDTyq15zdumcHKgXJaHtD41/Z0X6Re1fTIOgOH5n
 JAagNjTqkm5OhA8Db5lmIHKZZjDmNeUJEDQjpCHYkutF4ISaD4zEkkjLLJXAqI4ELAKM=;
Message-ID: <3a2a25bc-9b15-cdc9-ace2-b859f71b5e71@HIDDEN>
Date: Wed, 4 Jan 2023 15:35:42 +0100
MIME-Version: 1.0
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
To: Stefan Monnier <monnier@HIDDEN>,
 Gregory Heytings <gregory@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN> <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
 <ae6be09dfed453117dfb@HIDDEN> <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
Content-Language: en-US
From: Daniel Mendler <mail@HIDDEN>
In-Reply-To: <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: Jim Porter <jporterbugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 1/4/23 15:25, Stefan Monnier wrote:
>>  (defun pcomplete-arg (&optional index offset)
>>    (let ((arg
>>           (nth (+ (pcase index
>>  	           ('first 0)
>>  	           ('last  pcomplete-last)
>>  	           (_      (- pcomplete-index (or index 0))))
>>  	         (or offset 0))
>>                pcomplete-args)))
>> -    arg
>> +    (if (or (stringp arg)
>> +            (eq index 'last))
>> +        arg
>> +      (propertize
>> +       (car (split-string (pcomplete-actual-arg index offset)))
>> +       'pcomplete-arg-value arg))))
>>
>> IOW, instead of unconditionally returning arg, we now sometimes (when arg is
>> not already a string and when index is not last) return the textual
>> representation of that argument (what the user typed in) with the value of
>> arg attached to it.
> 
> I don't understand the `last` condition.
> Could you explain it (e.g. with a concrete example that breaks if you
> don't include it)?

This seems like its opening the door for yet another bug. Gregory, could
you please take a look at the version of pcomplete-arg that I've sent?

Daniel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 14:26:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 09:26:10 2023
Received: from localhost ([127.0.0.1]:47987 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD4iY-0005Jv-0A
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 09:26:10 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:24026)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1pD4iV-0005JY-Iq
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 09:26:08 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 460C64410B1;
 Wed,  4 Jan 2023 09:26:00 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id AFD7D440FD4;
 Wed,  4 Jan 2023 09:25:58 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1672842358;
 bh=rvHvyHBrzLGnrUP7ioWWitLXlZSYi09iBmztOU9mtwU=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=FY2G4hZCUgKWS/VzmPpmv3NheoFftnelixgeVxX9qDtejnjCnfQGa8jnU/8rn2+Ur
 WK7z4tNVEUiOHam4TlVwchLsCVxQblrs9tYjlpxOah5t4pUiCyRg+YI8CHSNyufAib
 XwKVi221USEpb3dWGKDt+BSZD/ratJfIFpcUmCE+Kd3J/9FEVtQlP9z2gURC20Tmdw
 b/YCQkPTuNKLt6y8KBKvNb08ROL7bQBrvV3H7S/BsWd4dGvCDI7KDxgvgcN6AsGPxd
 c2F6s5YZsdrStO2u3sXzcDoy/s82y5FK4nzRAch5Dr/xLgWQJS85bxSGYB7w9a65j1
 GwDfK9OV6ta4w==
Received: from pastel (unknown [45.72.200.228])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 544641201BE;
 Wed,  4 Jan 2023 09:25:58 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
In-Reply-To: <ae6be09dfed453117dfb@HIDDEN> (Gregory Heytings's message
 of "Wed, 04 Jan 2023 13:48:25 +0000")
Message-ID: <jwv8riifkcx.fsf-monnier+emacs@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
 <ae6be09dfed453117dfb@HIDDEN>
Date: Wed, 04 Jan 2023 09:25:48 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.301 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: Jim Porter <jporterbugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Daniel Mendler <mail@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>  (defun pcomplete-arg (&optional index offset)
>    (let ((arg
>           (nth (+ (pcase index
>  	           ('first 0)
>  	           ('last  pcomplete-last)
>  	           (_      (- pcomplete-index (or index 0))))
>  	         (or offset 0))
>                pcomplete-args)))
> -    arg
> +    (if (or (stringp arg)
> +            (eq index 'last))
> +        arg
> +      (propertize
> +       (car (split-string (pcomplete-actual-arg index offset)))
> +       'pcomplete-arg-value arg))))
>
> IOW, instead of unconditionally returning arg, we now sometimes (when arg is
> not already a string and when index is not last) return the textual
> representation of that argument (what the user typed in) with the value of
> arg attached to it.

I don't understand the `last` condition.
Could you explain it (e.g. with a concrete example that breaks if you
don't include it)?


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 13:48:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 08:48:30 2023
Received: from localhost ([127.0.0.1]:47957 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pD485-0004QW-Uv
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 08:48:30 -0500
Received: from heytings.org ([95.142.160.155]:58464)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1pD483-0004QN-8U
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 08:48:27 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1672840105;
 bh=RI2whM+gaIoMrqnCtLIfubZb5KRvvZVvnghuV7KuKtU=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=hbhT76Q2HU/4ruKFN8Q5EiwhhexHWuDuPD0AHx7fUBnR6Z1ARC0cMYBoMCErMPEPl
 YWeTnTDxeXy+i5EBJadJo+oocBDlvUJJnWE7EGgDJNkaZqmnlfpwlYaQ5n5ChVuNR8
 HHWXHqmFLU0zoWMAAO3a3e3TYfeAT8RQ+A+2cJ2wx8cdN2cLs92qo2nadW7mlPwRN8
 exFLsrdiDlvOdamJsQG3rcdxqviA7zyn8T+ba/MjUBaSLNyC1/wqK3dTx9yIzeK3Ir
 MQkFudiGigvTKQC+nuAVgylPsfPEA2VPJg5E2d6c7E4ct4PWX1kT8/M/0KPH/F3qzx
 pB53S+0Y8ywnQ==
Date: Wed, 04 Jan 2023 13:48:25 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Jim Porter <jporterbugs@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
In-Reply-To: <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
Message-ID: <ae6be09dfed453117dfb@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN>
 <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="1dBj90QEL1"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: Daniel Mendler <mail@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--1dBj90QEL1
Content-Type: text/plain; charset=us-ascii; format=flowed


>> Jim, can you also try the patch and report if you see regressions?
>
> Thanks. I tried this out for a bit, and I haven't been able to break it 
> yet (although I didn't notice the issue that spawned this bug# the last 
> time either, so it's possible I'm missing some problem this time around, 
> too).
>

Thanks for your confirmation.

Stefan, do you agree with the attached patch?  Or would you like something 
else?

Eli, are you okay with that patch?

The difference between the code before dafa6d6bad and the code with this 
patch applied can be summarized as follows:

  (defun pcomplete-arg (&optional index offset)
    (let ((arg
           (nth (+ (pcase index
  	           ('first 0)
  	           ('last  pcomplete-last)
  	           (_      (- pcomplete-index (or index 0))))
  	         (or offset 0))
                pcomplete-args)))
-    arg
+    (if (or (stringp arg)
+            (eq index 'last))
+        arg
+      (propertize
+       (car (split-string (pcomplete-actual-arg index offset)))
+       'pcomplete-arg-value arg))))

IOW, instead of unconditionally returning arg, we now sometimes (when arg 
is not already a string and when index is not last) return the textual 
representation of that argument (what the user typed in) with the value of 
arg attached to it.

--1dBj90QEL1
Content-Type: text/x-diff; name=Further-improvement-for-non-string-values-in-pcomple.patch
Content-Transfer-Encoding: base64
Content-ID: <ae6be09dfeb47c4a76d1@HIDDEN>
Content-Disposition: attachment; filename=Further-improvement-for-non-string-values-in-pcomple.patch

RnJvbSBlNWUxOTdhNjhhMjUzMTVlOTM1ODZkYjI5OTc1NzkxMTg2MmU3NGE4
IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0
aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBXZWQsIDQgSmFu
IDIwMjMgMTM6MzY6MDQgKzAwMDANClN1YmplY3Q6IFtQQVRDSF0gRnVydGhl
ciBpbXByb3ZlbWVudCBmb3Igbm9uLXN0cmluZyB2YWx1ZXMgaW4gcGNvbXBs
ZXRlDQoNCiogbGlzcC9wY29tcGxldGUuZWwgKHBjb21wbGV0ZS1hcmcpOiBV
c2UgdGhlIHN0cmluZyByZXByZXNlbnRhdGlvbg0Kb2YgdGhlIGFyZ3VtZW50
IHZhbHVlIGluc3RlYWQgb2YgdGhlIHRleHQgcmVwcmVzZW50YXRpb24gb2Yg
dGhlDQphcmd1bWVudC4gIFJldHVybiB0aGUgdmFsdWUsIGV2ZW4gd2hlbiBp
dCBpcyBub3QgYSBzdHJpbmcsIHdoZW4NCmluZGV4IGlzICdsYXN0Jy4gIEZp
eGVzIGJ1ZyM2MDQ2NC4NCihwY29tcGxldGUtYWN0dWFsLWFyZyk6IE1vdmUg
aXQgYmVmb3JlICdwY29tcGxldGUtYXJnJy4NCi0tLQ0KIGxpc3AvcGNvbXBs
ZXRlLmVsIHwgMjkgKysrKysrKysrKysrKysrLS0tLS0tLS0tLS0tLS0NCiAx
IGZpbGUgY2hhbmdlZCwgMTUgaW5zZXJ0aW9ucygrKSwgMTQgZGVsZXRpb25z
KC0pDQoNCmRpZmYgLS1naXQgYS9saXNwL3Bjb21wbGV0ZS5lbCBiL2xpc3Av
cGNvbXBsZXRlLmVsDQppbmRleCA1YmVlNTE1MjQ2Li43M2UxNGM1NjJiIDEw
MDY0NA0KLS0tIGEvbGlzcC9wY29tcGxldGUuZWwNCisrKyBiL2xpc3AvcGNv
bXBsZXRlLmVsDQpAQCAtNjMyLDYgKzYzMiwxMyBAQCBwY29tcGxldGUtbGlz
dA0KIDs7OyBJbnRlcm5hbCBGdW5jdGlvbnM6DQogDQogOzsgYXJndW1lbnQg
aGFuZGxpbmcNCisoZGVmc3Vic3QgcGNvbXBsZXRlLWFjdHVhbC1hcmcgKCZv
cHRpb25hbCBpbmRleCBvZmZzZXQpDQorICAiUmV0dXJuIHRoZSBhY3R1YWwg
dGV4dCByZXByZXNlbnRhdGlvbiBvZiB0aGUgbGFzdCBhcmd1bWVudC4NCitU
aGlzIGlzIGRpZmZlcmVudCBmcm9tIGBwY29tcGxldGUtYXJnJywgd2hpY2gg
cmV0dXJucyB0aGUgdGV4dHVhbCB2YWx1ZQ0KK3RoYXQgdGhlIGxhc3QgYXJn
dW1lbnQgZXZhbHVhdGVkIHRvLiAgVGhpcyBmdW5jdGlvbiByZXR1cm5zIHdo
YXQgdGhlDQordXNlciBhY3R1YWxseSB0eXBlZCBpbi4iDQorICAoYnVmZmVy
LXN1YnN0cmluZyAocGNvbXBsZXRlLWJlZ2luIGluZGV4IG9mZnNldCkgKHBv
aW50KSkpDQorDQogKGRlZnVuIHBjb21wbGV0ZS1hcmcgKCZvcHRpb25hbCBp
bmRleCBvZmZzZXQpDQogICAiUmV0dXJuIHRoZSB0ZXh0dWFsIGNvbnRlbnQg
b2YgdGhlIElOREVYdGggYXJndW1lbnQuDQogSU5ERVggaXMgYmFzZWQgZnJv
bSB0aGUgY3VycmVudCBwcm9jZXNzaW5nIHBvc2l0aW9uLiAgSWYgSU5ERVgg
aXMNCkBAIC02NDgsMTAgKzY1NSwxMSBAQCBwY29tcGxldGUtYXJnDQogYWNj
ZXNzaW5nIGFic29sdXRlIGFyZ3VtZW50IHBvc2l0aW9ucy4NCiANCiBXaGVu
IHRoZSBhcmd1bWVudCBoYXMgYmVlbiB0cmFuc2Zvcm1lZCBpbnRvIHNvbWV0
aGluZyB0aGF0IGlzIG5vdA0KLWEgc3RyaW5nIGJ5IGBwY29tcGxldGUtcGFy
c2UtYXJndW1lbnRzLWZ1bmN0aW9uJywgdGhlIHRleHQNCi1yZXByZXNlbnRh
dGlvbiBvZiB0aGUgYXJndW1lbnQsIG5hbWVseSB3aGF0IHRoZSB1c2VyIGFj
dHVhbGx5DQotdHlwZWQgaW4sIGlzIHJldHVybmVkLCBhbmQgdGhlIHZhbHVl
IG9mIHRoZSBhcmd1bWVudCBpcyBzdG9yZWQgaW4NCi10aGUgcGNvbXBsZXRl
LWFyZy12YWx1ZSB0ZXh0IHByb3BlcnR5IG9mIHRoYXQgc3RyaW5nLiINCith
IHN0cmluZyBieSBgcGNvbXBsZXRlLXBhcnNlLWFyZ3VtZW50cy1mdW5jdGlv
bicgYW5kIElOREVYIGlzIG5vdA0KK2BsYXN0JywgdGhlIHRleHQgcmVwcmVz
ZW50YXRpb24gb2YgdGhlIGFyZ3VtZW50LCBuYW1lbHkgd2hhdCB0aGUNCit1
c2VyIGFjdHVhbGx5IHR5cGVkIGluLCBpcyByZXR1cm5lZCwgYW5kIHRoZSB2
YWx1ZSBvZiB0aGUNCithcmd1bWVudCBpcyBzdG9yZWQgaW4gdGhlIHBjb21w
bGV0ZS1hcmctdmFsdWUgdGV4dCBwcm9wZXJ0eSBvZg0KK3RoYXQgc3RyaW5n
LiINCiAgIChsZXQgKChhcmcNCiAgICAgICAgICAobnRoICgrIChwY2FzZSBp
bmRleA0KIAkgICAgICAgICAgICgnZmlyc3QgMCkNCkBAIC02NTksMTEgKzY2
NywxMSBAQCBwY29tcGxldGUtYXJnDQogCSAgICAgICAgICAgKF8gICAgICAo
LSBwY29tcGxldGUtaW5kZXggKG9yIGluZGV4IDApKSkpDQogCSAgICAgICAg
IChvciBvZmZzZXQgMCkpDQogICAgICAgICAgICAgICBwY29tcGxldGUtYXJn
cykpKQ0KLSAgICAoaWYgKHN0cmluZ3AgYXJnKQ0KKyAgICAoaWYgKG9yIChz
dHJpbmdwIGFyZykNCisgICAgICAgICAgICAoZXEgaW5kZXggJ2xhc3QpKQ0K
ICAgICAgICAgYXJnDQogICAgICAgKHByb3BlcnRpemUNCi0gICAgICAgKGJ1
ZmZlci1zdWJzdHJpbmcgKHBjb21wbGV0ZS1iZWdpbiBpbmRleCBvZmZzZXQp
DQotICAgICAgICAgICAgICAgICAgICAgICAgIChwY29tcGxldGUtYmVnaW4g
KDEtIChvciBpbmRleCAwKSkgb2Zmc2V0KSkNCisgICAgICAgKGNhciAoc3Bs
aXQtc3RyaW5nIChwY29tcGxldGUtYWN0dWFsLWFyZyBpbmRleCBvZmZzZXQp
KSkNCiAgICAgICAgJ3Bjb21wbGV0ZS1hcmctdmFsdWUgYXJnKSkpKQ0KIA0K
IChkZWZ1biBwY29tcGxldGUtYmVnaW4gKCZvcHRpb25hbCBpbmRleCBvZmZz
ZXQpDQpAQCAtNjc5LDEzICs2ODcsNiBAQCBwY29tcGxldGUtYmVnaW4NCiAg
ICAgICAoc2V0cSBpbmRleCAoKyBpbmRleCBvZmZzZXQpKSkNCiAgIChudGgg
aW5kZXggcGNvbXBsZXRlLWJlZ2lucykpDQogDQotKGRlZnN1YnN0IHBjb21w
bGV0ZS1hY3R1YWwtYXJnICgmb3B0aW9uYWwgaW5kZXggb2Zmc2V0KQ0KLSAg
IlJldHVybiB0aGUgYWN0dWFsIHRleHQgcmVwcmVzZW50YXRpb24gb2YgdGhl
IGxhc3QgYXJndW1lbnQuDQotVGhpcyBpcyBkaWZmZXJlbnQgZnJvbSBgcGNv
bXBsZXRlLWFyZycsIHdoaWNoIHJldHVybnMgdGhlIHRleHR1YWwgdmFsdWUN
Ci10aGF0IHRoZSBsYXN0IGFyZ3VtZW50IGV2YWx1YXRlZCB0by4gIFRoaXMg
ZnVuY3Rpb24gcmV0dXJucyB3aGF0IHRoZQ0KLXVzZXIgYWN0dWFsbHkgdHlw
ZWQgaW4uIg0KLSAgKGJ1ZmZlci1zdWJzdHJpbmcgKHBjb21wbGV0ZS1iZWdp
biBpbmRleCBvZmZzZXQpIChwb2ludCkpKQ0KLQ0KIChkZWZzdWJzdCBwY29t
cGxldGUtbmV4dC1hcmcgKCkNCiAgICJNb3ZlIHRoZSB2YXJpb3VzIHBvaW50
ZXJzIHRvIHRoZSBuZXh0IGFyZ3VtZW50LiINCiAgIChzZXRxIHBjb21wbGV0
ZS1pbmRleCAoMSsgcGNvbXBsZXRlLWluZGV4KQ0KLS0gDQoyLjM5LjANCg0K

--1dBj90QEL1--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 4 Jan 2023 05:52:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 04 00:52:25 2023
Received: from localhost ([127.0.0.1]:47342 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pCwhN-0001Lx-EO
	for submit <at> debbugs.gnu.org; Wed, 04 Jan 2023 00:52:25 -0500
Received: from mail-pg1-f180.google.com ([209.85.215.180]:37863)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jporterbugs@HIDDEN>) id 1pCwhI-0001Lf-2O
 for 60464 <at> debbugs.gnu.org; Wed, 04 Jan 2023 00:52:24 -0500
Received: by mail-pg1-f180.google.com with SMTP id v3so21554921pgh.4
 for <60464 <at> debbugs.gnu.org>; Tue, 03 Jan 2023 21:52:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:mime-version:date:message-id:from:to:cc
 :subject:date:message-id:reply-to;
 bh=cpc6BkxUzfbTeAM8aO4VB1zJLAABdH90tAvEpe3TFsg=;
 b=BlMbIGqVQSheIx8YPzXdfsJHpn6Of0ao8vNO4TimOvUPi+fA58DxG9/DWStV5V8Gab
 KDh5iBH0nrRVwU3Vo6DCLc56w1uCxG+o3K/qQPvywc87O1okJidhIsXWjl55DnWrFSl2
 ljnIC+QKZQnp+/oKmMTZ2w3j5QIqm9em73yT19C16+UCubWB5KmSPWkH3jLRBf/QJZIo
 jgyXM+Gft843n6ldV3SFw71Vk3ItvNBxMhDUqrjIWNZX1pgT8uoy52cbaTFDk/aNVvDl
 ywCfkYqtusjhd32iKNo8hT/nUiyLSeNdcq5u1VugdrIlwc5gsRDB+89w5wPGOxTZgm5/
 zh4g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:mime-version:date:message-id
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=cpc6BkxUzfbTeAM8aO4VB1zJLAABdH90tAvEpe3TFsg=;
 b=l+LHCVLLgn+nmNSLtwMnxbYCKSu7V0PP9FgPx1RKSa999cVPeDm0jX+ECEZ36srD4Q
 Z3RmvJ+gOjyV7WVGAmYCaPsMYAFKGQD9x/Q8GIer8GmCzOEMp1yqR5uL3QY5PzvwejJ0
 FBnDK/4J9mmEM9eTr6Kx3kpOod4b4LoamDUi/x85INft9lBUsN01H7jAEhZgRTb3/3r0
 XY8F31Epqbz2qkGKDIpB+JdPfN8A3ACYK1dGOT+xtDD8MZQDXV+cwEDuPtDqlfbhR0j+
 C7rIThT4x78II3WRjGj1gGMeCTDfTEsf231t9YO05MoFmvW4YvjS8fGRCB1u1MRAjIld
 flEA==
X-Gm-Message-State: AFqh2koov+KEIIVRS7dwxv1Q3E2curWgfwCljum/tHxGoLC2DDUEjuLr
 RkOr9EPgYTrvFmD/ajz1sW4=
X-Google-Smtp-Source: AMrXdXvdTaqZxuddDzz0a0P4MoS6YqUc74rc3EsbjtdLlbvtGktHhaUIyQhR0gDjA5Zi5ZMVP+BVjQ==
X-Received: by 2002:a05:6a00:15d5:b0:581:88a4:9180 with SMTP id
 o21-20020a056a0015d500b0058188a49180mr39481291pfu.22.1672811533967; 
 Tue, 03 Jan 2023 21:52:13 -0800 (PST)
Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com.
 [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id
 q9-20020aa79609000000b00582836fb2acsm4591974pfg.150.2023.01.03.21.52.13
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 03 Jan 2023 21:52:13 -0800 (PST)
Message-ID: <1de8c8ce-4aa1-c6e4-1ede-0acafc620a50@HIDDEN>
Date: Tue, 3 Jan 2023 21:51:48 -0800
MIME-Version: 1.0
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
Content-Language: en-US
To: Gregory Heytings <gregory@HIDDEN>,
 Daniel Mendler <mail@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN> <226b32f79fe1e154cfb4@HIDDEN>
From: Jim Porter <jporterbugs@HIDDEN>
In-Reply-To: <226b32f79fe1e154cfb4@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: 60464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 1/1/2023 8:59 AM, Gregory Heytings wrote:
> Jim, can you also try the patch and report if you see regressions?

Thanks. I tried this out for a bit, and I haven't been able to break it 
yet (although I didn't notice the issue that spawned this bug# the last 
time either, so it's possible I'm missing some problem this time around, 
too).

I think it would be super-useful to collect some of these test cases for 
Pcomplete-in-Eshell and write ERT tests for them. Then we can be more 
confident that future changes to Pcomplete won't regress Eshell. I'll 
look into doing that in the next week or two.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 20:01:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 15:01:39 2023
Received: from localhost ([127.0.0.1]:41799 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC4WY-00083i-SC
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 15:01:39 -0500
Received: from eggs.gnu.org ([209.51.188.92]:44260)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pC4WW-00083U-P2
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 15:01:37 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pC4WQ-0004iZ-G2; Sun, 01 Jan 2023 15:01:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=mWU/N0iA5gczjvVMuVlqe+QLcUHPLCYXWAmirArm9Xc=; b=JJGU0FWLXu2j
 KKFjcR0AmD2yAgTwoeQcUUZEaNTRj2NCXOOYGew83mKoK+ARtUQw2usQ/cB0q1zAsN1410ZSP8POG
 i0BL4UlsQ4BQO5m+hFn02WPZgiItmf558eKs6WrQWevxDJZsJyYdTmQfMmfiFBJIhpl8YPNFycyXG
 2TFuDo8iLSlqfhWBEpFzozmCPgNiG/roavuVL5/gVOqb7VjMeetRPFBB8AM7dbcA5sj7tcJPVSFhw
 TT0tJXqToMw7VVOyXS3O0SxcUVzTf/l/Lgz145Pr1gq/CRvCY8xxumoT6F/NH2lmVDLXmRgpXcNYh
 JaJ81z5H0GUoVReC/828wQ==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pC4WP-0001d3-TG; Sun, 01 Jan 2023 15:01:30 -0500
Date: Sun, 01 Jan 2023 22:01:34 +0200
Message-Id: <83mt722fdt.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
In-Reply-To: <226b32f79fe873544368@HIDDEN> (message from Gregory
 Heytings on Sun, 01 Jan 2023 18:29:53 +0000)
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN> <83r0we2ll9.fsf@HIDDEN>
 <226b32f79fe873544368@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: mail@HIDDEN, 60464 <at> debbugs.gnu.org, monnier@HIDDEN,
 jporterbugs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 01 Jan 2023 18:29:53 +0000
> From: Gregory Heytings <gregory@HIDDEN>
> cc: mail@HIDDEN, jporterbugs@HIDDEN, monnier@HIDDEN, 
>     60464 <at> debbugs.gnu.org
> 
> 
> >> Stefan and Eli, does that patch look right to you?
> >
> > I don't consider myself an expert on pcomplete, sorry.  I will defer to 
> > Jim and Stefan.  (Although I must say that I'm not sure I see a bug 
> > here.)
> >
> > However, I do have two questions:
> >
> > . is this suggested for master or for the emacs-29 branch?
> > . if the latter, then which past version of Emacs handled this correctly?
> >
> 
> It's a sequel of dafa6d6bad, so it should probably go to emacs-29.  I 
> can't really answer your second question with 100% accuracy, but I believe 
> Emacs 28 behaved correctly in the cases discussed in this bug and the 
> earlier ones (bug#59956 and bug#60021).

Thanks.  In that case, I'll withhold my opinion until I see the final
variant of the proposed patch.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 19:13:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 14:13:21 2023
Received: from localhost ([127.0.0.1]:41776 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC3lo-0006nG-Mo
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 14:13:20 -0500
Received: from heytings.org ([95.142.160.155]:54824)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1pC3ln-0006n8-6M
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 14:13:19 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1672600398;
 bh=2bg9mQRArR/u8AFMlUX0X+vwxJTytCXr6UhtDgj2/Wk=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=T6HdaqL+CqisGN9wYelHKYNGR2usiee1dpRU7JHk9grKZQb3PIFlrmdODskLX59uy
 wkXBMoKYP6hIC6R74sKT7zkXno9xOMTApw+iOdzAaXhMrbXt0/HSoRkUt7Tt1M5hEJ
 7JAtCz/PO6LUABBS0/tetio1Gw+JLzRvfQrd/W2vVRAx8x2b7iJWK/1LN/nhNf3519
 kWip3IZUh3j4QVjN2BhMSvsP4cFT3SXwhiLuGcn5gUPmFmzg6mqdf5Bpsqe6ZGyId+
 qWvLCl6VDYG1j6vi6lsFAXxGFe7oS5rJmHz+cLgq7pmNSOn3+9a8M0ecponoJsvAEa
 0Lh2yElmJFxXg==
Date: Sun, 01 Jan 2023 19:13:18 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
In-Reply-To: <jwv358um7ei.fsf-monnier+emacs@HIDDEN>
Message-ID: <226b32f79f028016490a@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN> <jwvk026m94t.fsf-monnier+emacs@HIDDEN>
 <226b32f79f056489e881@HIDDEN> <jwv358um7ei.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: Daniel Mendler <mail@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Jim Porter <jporterbugs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>>                    (_      (- pcomplete-index (or index 0))))
>>                  (or offset 0))
>>                pcomplete-args)))
>> -    (if (stringp arg)
>> +    (if (or (stringp arg)
>> +            (eq index 'last))
>>          arg
>>        (propertize
>> -       (buffer-substring (pcomplete-begin index offset)
>> -                         (pcomplete-begin (1- (or index 0)) offset))
>> +       (car (split-string (pcomplete-actual-arg index offset)))
>>         'pcomplete-arg-value arg))))
>
> I'm not sure what specific problem this is trying to solve (is it the 
> choice of the "index" or is it the precise buffer positions of the 
> bounds)?
>

I admit I don't understand your question.  It tries to use 
pcomplete-actual-arg, which uses buffer-substring, to get the text 
representation of the argument.  It's not guaranteed to work in all cases, 
though, because it simply assumes that arguments are separated by spaces. 
But it should be "good enough".

The (eq index 'last) means that when index is 'last we return the 
argument, even when it is not a string (or more precisely: when it is a 
list of strings, and the code assumes that a non-string arg is a list of 
string), because that's in fact what the caller expects (or at least 
that's what Eshell expects) in that case: that list is displayed in 
*Completions*.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 18:43:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 13:43:00 2023
Received: from localhost ([127.0.0.1]:41760 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC3IS-00061A-3a
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 13:43:00 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:28029)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1pC3IQ-00060x-DN
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 13:42:58 -0500
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0CCE5805D5;
 Sun,  1 Jan 2023 13:42:53 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 79219800AE;
 Sun,  1 Jan 2023 13:42:51 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1672598571;
 bh=gbsFK3VuN83aQetqIefbHtHKQMyD22I3GRtGYs558R4=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=daP+lSDR+N2BF5nv5eCeDaPlmFRzo1cbjlFv/JDJT+Tfh+rwAcUDLRhniJFBxu/rm
 CkGMP96YzyFzYzM9pm8vg0KlMmmb45t/tuLkfgvkGjEIG/1/knsFOdSQPINPEujF/J
 P1/E7hGiwREhONil0O3jqRessu+2Hf+XCqC8iRn8UZ66wKVubmUXok/oKhjyJjpAto
 TIblJ5VGa2beKWrEpJNdJfjqt8OXJ4OHGx/00tpDefy35Ogzw444+CCtXlfV65xUwY
 D8cc3woBZJWfp3b23cF76/MNDHT0SU6voYfnFlFZNchHf1qQKzRgp38j+XTYQVSl9T
 yrWHcDJ1EKqIg==
Received: from pastel (unknown [45.72.200.228])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 28A7712017F;
 Sun,  1 Jan 2023 13:42:51 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
In-Reply-To: <jwv358um7ei.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Sun, 01 Jan 2023 13:38:28 -0500")
Message-ID: <jwvwn66kski.fsf-monnier+emacs@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN>
 <jwvk026m94t.fsf-monnier+emacs@HIDDEN>
 <226b32f79f056489e881@HIDDEN>
 <jwv358um7ei.fsf-monnier+emacs@HIDDEN>
Date: Sun, 01 Jan 2023 13:42:50 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.336 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: Daniel Mendler <mail@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Jim Porter <jporterbugs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> For the first, would the patch below help?

Well, obviously not because I didn't bother to look at the rest of
the code.

Maybe this one would be closer, tho it probably needs some handling for
the boundary case where `index` is the last.


        Stefan


diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index 2d3730e294a..36968d3b73c 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -1,6 +1,6 @@
 ;;; pcomplete.el --- programmable completion -*- lexical-binding: t -*-
 
-;; Copyright (C) 1999-2022 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2023 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@HIDDEN>
 ;; Keywords: processes abbrev
@@ -652,18 +652,17 @@ pcomplete-arg
 representation of the argument, namely what the user actually
 typed in, is returned, and the value of the argument is stored in
 the pcomplete-arg-value text property of that string."
-  (let ((arg
-         (nth (+ (pcase index
+  (let* ((index (+ (pcase index
 	           ('first 0)
 	           ('last  pcomplete-last)
 	           (_      (- pcomplete-index (or index 0))))
-	         (or offset 0))
-              pcomplete-args)))
+	         (or offset 0)))
+         (arg (nth index pcomplete-args)))
     (if (stringp arg)
         arg
       (propertize
-       (buffer-substring (pcomplete-begin index offset)
-                         (pcomplete-begin (1- (or index 0)) offset))
+       (buffer-substring (nth index pcomplete-begins)
+                         (nth (1+ index) pcomplete-begins))
        'pcomplete-arg-value arg))))
 
 (defun pcomplete-begin (&optional index offset)





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 18:38:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 13:38:40 2023
Received: from localhost ([127.0.0.1]:41750 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC3EG-0005ub-1w
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 13:38:40 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:61414)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1pC3ED-0005uN-QZ
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 13:38:38 -0500
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 142B31002DE;
 Sun,  1 Jan 2023 13:38:31 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2ED88100178;
 Sun,  1 Jan 2023 13:38:29 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1672598309;
 bh=8pBWNqiOKlnFJ03l54NPS67Kq0v8mzyDc+XHrTKeFoM=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=jcWwSrZ3e0MeFwhTTVo4TObpIRBq/sRt2X9fUGDR34ZIdEbwpQRh7PB42L3bXrq0I
 Sg/xdUs1IM53SyVNzu3sY525xBujaf/bgzQmJHVNtqk5FpzjkSzW1tckbiFwvDMr5C
 jkPEd+6wR+S97g2F358ekSDvfkZhTEd4MmZyS/SJnIkp7GovZliY2jWXOeJLrOGnyI
 FzlU85tb3HmIRsY9V/C4xAahJqM+AKAAUqf+UnU0y17Pnjf3SKRhuX9pAw1RT6LnT4
 mKEsdTL2L0SkcPvdpkgS5Kft76sZchzeetGeFpcbQHgC5SnDlLSLERf1bihfKe13o+
 CtlmtibpWOe9A==
Received: from pastel (unknown [45.72.200.228])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EE92A120317;
 Sun,  1 Jan 2023 13:38:28 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
In-Reply-To: <226b32f79f056489e881@HIDDEN> (Gregory Heytings's message
 of "Sun, 01 Jan 2023 18:19:20 +0000")
Message-ID: <jwv358um7ei.fsf-monnier+emacs@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN>
 <jwvk026m94t.fsf-monnier+emacs@HIDDEN>
 <226b32f79f056489e881@HIDDEN>
Date: Sun, 01 Jan 2023 13:38:28 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.409 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: Daniel Mendler <mail@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Jim Porter <jporterbugs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>    (let ((arg
>           (nth (+ (pcase index
>                    ('first 0)
> @@ -659,11 +660,11 @@ pcomplete-arg
>                    (_      (- pcomplete-index (or index 0))))
>                  (or offset 0))
>                pcomplete-args)))
> -    (if (stringp arg)
> +    (if (or (stringp arg)
> +            (eq index 'last))
>          arg
>        (propertize
> -       (buffer-substring (pcomplete-begin index offset)
> -                         (pcomplete-begin (1- (or index 0)) offset))
> +       (car (split-string (pcomplete-actual-arg index offset)))
>         'pcomplete-arg-value arg))))

I'm not sure what specific problem this is trying to solve (is it the
choice of the "index" or is it the precise buffer positions of the
bounds)?

For the first, would the patch below help?
[ For the second, I suspect we can't provide 100% reliably correct
  information anyway, so I think we'll need to find concrete usecases
  where it matters before we can judge how much effort is warranted.  ]


        Stefan


diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index 2d3730e294a..815ad252fbd 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -1,6 +1,6 @@
 ;;; pcomplete.el --- programmable completion -*- lexical-binding: t -*-
 
-;; Copyright (C) 1999-2022 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2023 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@HIDDEN>
 ;; Keywords: processes abbrev
@@ -652,13 +652,12 @@ pcomplete-arg
 representation of the argument, namely what the user actually
 typed in, is returned, and the value of the argument is stored in
 the pcomplete-arg-value text property of that string."
-  (let ((arg
-         (nth (+ (pcase index
+  (let* ((index (+ (pcase index
 	           ('first 0)
 	           ('last  pcomplete-last)
 	           (_      (- pcomplete-index (or index 0))))
-	         (or offset 0))
-              pcomplete-args)))
+	         (or offset 0)))
+         (arg (nth index pcomplete-args)))
     (if (stringp arg)
         arg
       (propertize





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 18:29:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 13:29:56 2023
Received: from localhost ([127.0.0.1]:41739 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC35o-0005fm-NP
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 13:29:56 -0500
Received: from heytings.org ([95.142.160.155]:54754)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1pC35m-0005fd-HK
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 13:29:54 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1672597793;
 bh=ekI2wY8QIWf5CZmGy3a6UPAMZQt2tvzoAQquOt8H70U=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=5Copd2tD5l69ryTZP3tvHL2nt2GKdwmjHMXfKS542WyKthcvl9RlaIOiZcQLFT+Gn
 eyxZPDzgoOTWW960ZfikE9pWlE6fIHezWSaPE6Nw4RSf8LIyP8jxJ4Px3Yy6A/7zsk
 HmPKf9l8sQ4J9Ndww1LwW7sv2PU79+cjwYa4ZtZocYsVUKY1xMdyk3+G89oQy/WzBh
 d/MqGfJxwt2IBk4zTcz/COFQI62nJXcHcG1oPM/Ztm8EUr3OhsTpcJV8inPM3P6DfH
 Dpx7+1tIZIBAZkTv/25WajO+NiiKEYEoIFj7lPI0tFQLyJyeqzIG1P4MS0+BoMrMdH
 8Brp7By4N716g==
Date: Sun, 01 Jan 2023 18:29:53 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
In-Reply-To: <83r0we2ll9.fsf@HIDDEN>
Message-ID: <226b32f79fe873544368@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN> <83r0we2ll9.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: mail@HIDDEN, 60464 <at> debbugs.gnu.org, monnier@HIDDEN,
 jporterbugs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>> Stefan and Eli, does that patch look right to you?
>
> I don't consider myself an expert on pcomplete, sorry.  I will defer to 
> Jim and Stefan.  (Although I must say that I'm not sure I see a bug 
> here.)
>
> However, I do have two questions:
>
> . is this suggested for master or for the emacs-29 branch?
> . if the latter, then which past version of Emacs handled this correctly?
>

It's a sequel of dafa6d6bad, so it should probably go to emacs-29.  I 
can't really answer your second question with 100% accuracy, but I believe 
Emacs 28 behaved correctly in the cases discussed in this bug and the 
earlier ones (bug#59956 and bug#60021).





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 18:26:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 13:26:16 2023
Received: from localhost ([127.0.0.1]:41734 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC32G-0005ad-22
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 13:26:16 -0500
Received: from server.qxqx.de ([178.63.65.180]:49555 helo=mail.qxqx.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1pC32E-0005aN-Id
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 13:26:14 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:
 References:Cc:To:Subject:MIME-Version:Date:Message-ID: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=3BzhNwHCB0EhnOuO82ZAiewQc1HUfCJYQCcN897PzP4=; b=YshIhprxRQDqCaAwJzXMmAvKdj
 b8JVrxCZ87oB3R6LZyJvr+ydNDKi7dKR1Ghwf7OuVjISeuT6v5Vn/8i3C+JuHU35oWd1sABQb2NAe
 DCnR+tyejV5n8rY4099vNMT1NcwcN11nAHcAbJleZP9esSxjpwfJpRlvPP8Zcc2gWEdU=;
Message-ID: <e4c5121d-d6ba-4949-64d4-9ec9624a7569@HIDDEN>
Date: Sun, 1 Jan 2023 19:26:05 +0100
MIME-Version: 1.0
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
To: Gregory Heytings <gregory@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN> <226b32f79fe1e154cfb4@HIDDEN>
 <98f323a8-5e92-b81f-3cd0-a31447d6eb65@HIDDEN>
 <226b32f79f9a9894478c@HIDDEN>
 <eaab48c3-1b1e-fd26-9bbf-ac34f8162bbc@HIDDEN>
 <226b32f79f9b7d0df4b3@HIDDEN>
Content-Language: en-US
From: Daniel Mendler <mail@HIDDEN>
In-Reply-To: <226b32f79f9b7d0df4b3@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: Jim Porter <jporterbugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi Gregory!

On 1/1/23 18:45, Gregory Heytings wrote:
> 
>>> Feel free to suggest something else.
>>
>> Yes, I did. The command line string should be returned.
>>
> 
> I mean, to propose some other code.
> 
>>
>> I believe you that doing this correctly is non trivial. But this doesn't 
>> justify going with your hack.
>>
> 
> It's extracting the correct part of the command line string that is hacky, 
> too hacky to my taste.

I only gave this a quick try and I don't make use of pcomplete-* helper
functions which may exist. This is just a best effort solution, which
assumes that we can split at spaces. If that's not the case we will get
wrong results, also in the presence of quotation.

But I believe that this is better than nothing and it should give a
sufficiently good result in most cases. We should acknowledge that
completion is not always perfect. It is okay to return a heuristical
result sometimes. If we observe bugs due to invalid return values we
could improve afterwards. I still consider this better than returning an
"arbitrary" string value as in your most recent proposal.

(defun pcomplete-arg (&optional index offset)
  (let* ((idx (+ (pcase index
                   ('first 0)
                   ('last  pcomplete-last)
                   (_      (- pcomplete-index (or index 0))))
                 (or offset 0)))
         (arg (nth idx pcomplete-args)))
    (if (stringp arg)
        arg
      (propertize
       (buffer-substring-no-properties
        (nth idx pcomplete-begins)
        (save-excursion
          (if (< idx pcomplete-last)
              (goto-char (nth (1+ idx) pcomplete-begins))
            (end-of-line))
          (if (re-search-backward "\\S-" nil t)
              (1+ (point))
            (pos-eol))))
       'pcomplete-arg-value arg))))

Daniel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 18:19:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 13:19:24 2023
Received: from localhost ([127.0.0.1]:41715 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC2vc-0005PM-Gs
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 13:19:24 -0500
Received: from heytings.org ([95.142.160.155]:54726)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1pC2va-0005PC-J7
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 13:19:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1672597161;
 bh=VdyEUgsM/zMoDnWifaZ0IIGhDrdlsr34GnQcHCqyL5s=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=lC6PnYC+7i6//nfoh28qHzuqVMETfvUgl6DHz32WxB4MIz3gyIVLNzAwZbbxAsuq6
 dF6kcajf9/JuGKRO6XdGqbmsTRMVa1Po1gIuq5osxO3uIgcziCOhd7IFYFJKKwl+gQ
 T8RJyRrKto5IeY6KbmZhK/rWACmT9dmV69THP9B2AD2gXL1RB/3MpcZfqj7L8Vk/VJ
 pQk9rSlbLJiVnPnx5ODDb1huyylStvA/3Lv/ax8h1+0H362erYHczGttdqTezaLM38
 /MbpqCt2gTAcUG0MTyb+oI8mrYnaHxslVgytcNMMc5o6+gg09bQB1eXm7rDhpaHIdi
 balyfLBZK/WPg==
Date: Sun, 01 Jan 2023 18:19:20 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
In-Reply-To: <jwvk026m94t.fsf-monnier+emacs@HIDDEN>
Message-ID: <226b32f79f056489e881@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN> <jwvk026m94t.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: Daniel Mendler <mail@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Jim Porter <jporterbugs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>> After working a bit more on this bug, I concluded that what Stefan 
>> initially suggested, to use the string representation of the value, is 
>> safer than trying to extract the string corresponding to the argument 
>> that the user typed in from the command line.
>
> Could you expand on when/where it's "unsafe" or what it breaks?
>

I simply spent too much time trying to get the "extract the correct part 
of the command line from the buffer" right, and wasn't able to convince 
myself that the result was correct in all circumstances.  Given that 
returning (format "%S" arg) is what you initially suggested, and that it 
cannot be wrong, I concluded that it was the best/safest thing to do.

The semantics of the "index" argument of the pcomplete-arg function are 
tricky: it can be 0, "the current argument being examined", < 0, "closer 
to the last argument", and > 0, "closer to the first argument".  And then 
you also have the special values 'first and 'last.  And it can also be 
nil, which is equivalent to 0.

There is a pcomplete-actual-arg function, which returns "the actual text 
representation of the last argument" (in fact, "the actual text 
representation of the INDEXth argument and the following ones"), but no 
function which returns the actual text representation of a given argument.

Perhaps we could just use it and assume that all arguments are separated 
by spaces, though, in which case the patch would become:

diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index 5bee515246..c829b6c3b7 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -648,10 +648,11 @@ pcomplete-arg
  accessing absolute argument positions.

  When the argument has been transformed into something that is not
-a string by `pcomplete-parse-arguments-function', the text
-representation of the argument, namely what the user actually
-typed in, is returned, and the value of the argument is stored in
-the pcomplete-arg-value text property of that string."
+a string by `pcomplete-parse-arguments-function' and INDEX is not
+`last', the text representation of the argument, namely what the
+user actually typed in, is returned, and the value of the
+argument is stored in the pcomplete-arg-value text property of
+that string."
    (let ((arg
           (nth (+ (pcase index
                    ('first 0)
@@ -659,11 +660,11 @@ pcomplete-arg
                    (_      (- pcomplete-index (or index 0))))
                  (or offset 0))
                pcomplete-args)))
-    (if (stringp arg)
+    (if (or (stringp arg)
+            (eq index 'last))
          arg
        (propertize
-       (buffer-substring (pcomplete-begin index offset)
-                         (pcomplete-begin (1- (or index 0)) offset))
+       (car (split-string (pcomplete-actual-arg index offset)))
         'pcomplete-arg-value arg))))

  (defun pcomplete-begin (&optional index offset)





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 18:02:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 13:02:46 2023
Received: from localhost ([127.0.0.1]:41685 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC2fW-0004zA-Ai
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 13:02:46 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:20745)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1pC2fV-0004yx-Bq
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 13:02:45 -0500
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 04291100191;
 Sun,  1 Jan 2023 13:02:40 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 689CC10016C;
 Sun,  1 Jan 2023 13:02:38 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1672596158;
 bh=ika3p33JTh8r+FHAAIQsWbB78rATljxNxeP2rcYUqaE=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=mUjsJksmVMJ32lPOsTkaansFJDa9V1DhFrw3fAbT+owFmUJrgoBISxiCVrNCO0Ml0
 2Jhxap1nhExFm4LHExHlqPN0xTLlS31yvqsKWX7MQEW+mAwypgQjNWqQLMtsRd0+42
 TNnixOvvirl5fT6zQV144m9htN9dYCoDJRJQrDXC0bPFvvQWIxSWckXGCjSbRYIKAK
 dQ8blVWc84TOKDhsfloM68P+dQNwt6AYw2EJyrUtUzU7GyOb1ewVaaW0y5WpNec0Rs
 4Ww/iAXqw5s21FPPBH1TIuIIZ05sRQh3xEAkoS2pEBZ6iTp3hzlUCXwnycfqaxouy6
 yIWkPkzLP9EAQ==
Received: from pastel (unknown [45.72.200.228])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 341FD1201D0;
 Sun,  1 Jan 2023 13:02:38 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
In-Reply-To: <226b32f79f9b7d0df4b3@HIDDEN> (Gregory Heytings's message
 of "Sun, 01 Jan 2023 17:45:02 +0000")
Message-ID: <jwvedsem916.fsf-monnier+emacs@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN>
 <98f323a8-5e92-b81f-3cd0-a31447d6eb65@HIDDEN>
 <226b32f79f9a9894478c@HIDDEN>
 <eaab48c3-1b1e-fd26-9bbf-ac34f8162bbc@HIDDEN>
 <226b32f79f9b7d0df4b3@HIDDEN>
Date: Sun, 01 Jan 2023 13:02:37 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.414 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: Daniel Mendler <mail@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Jim Porter <jporterbugs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> I believe you that doing this correctly is non trivial. But this doesn't
>> justify going with your hack.
> It's extracting the correct part of the command line string that is hacky,
> too hacky to my taste.

I wouldn't be surprised if it's difficult/impossible, indeed.
But the question is: when/where does it matter whether we really return
the "correct" part?

In my experience, there are some fundamental mismatches in the Pcomplete
API which we can't fix without a serious redesign, so until we do that
we have to live with "best effort" :-(


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 17:57:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 12:57:19 2023
Received: from localhost ([127.0.0.1]:41680 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC2aF-0004pc-Jj
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 12:57:19 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:16926)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1pC2aE-0004pQ-Df
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 12:57:19 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 231C5441347;
 Sun,  1 Jan 2023 12:57:13 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D4A8044133F;
 Sun,  1 Jan 2023 12:57:11 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1672595831;
 bh=lIAs7avsQbsSi5sraCMrtrwbPt/kvk/iJkHudcrqVhk=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=QYRNxwHZ8OuXA0Y1tVThs7yvKr6pKUBNkb/9p+adQHhLW9D0oJdOQQcqpZw++9WMG
 sCtq9IGSJGOBXz1DblZOsHxj0+JVxJmUV8wzT9e22IuIK1/jzMAYSKFOYytoq31VXa
 2wesfBzi6TCqZh/LgBzXIaYJLwUJWFZfbqiC8zJ8eFo6Zy5FQVuqS6lh2+oXDdnDyi
 7p4A3MT7zmuzNSa8T3HISYOtW8Z3NGuiveGDuh0kP3jyBwMEs4BUUWvjuzma8wVca8
 OoJ27JElw8HtQPnrDIL24kKO8XrRNELX6yQaIRnvbw6o219uo3YmWzvoQqH0fr2qv6
 /0ZVEcf3n93Xw==
Received: from pastel (unknown [45.72.200.228])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A6838120839;
 Sun,  1 Jan 2023 12:57:11 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
In-Reply-To: <226b32f79fe1e154cfb4@HIDDEN> (Gregory Heytings's message
 of "Sun, 01 Jan 2023 16:59:37 +0000")
Message-ID: <jwvk026m94t.fsf-monnier+emacs@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN>
Date: Sun, 01 Jan 2023 12:57:10 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.329 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: Daniel Mendler <mail@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Jim Porter <jporterbugs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> After working a bit more on this bug, I concluded that what Stefan initially
> suggested, to use the string representation of the value, is safer than
> trying to extract the string corresponding to the argument that the user
> typed in from the command line.

Could you expand on when/where it's "unsafe" or what it breaks?


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 17:47:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 12:47:40 2023
Received: from localhost ([127.0.0.1]:41659 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC2Qu-0004Wq-Ah
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 12:47:40 -0500
Received: from eggs.gnu.org ([209.51.188.92]:49464)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pC2Qs-0004WE-Kd
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 12:47:39 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pC2Ql-0005RN-2x; Sun, 01 Jan 2023 12:47:32 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=ENLljRwDZClcv3QoitsHc2q6fP2N+7WfABl6Bfc28RU=; b=o+HGhfZcOa8D
 42N8M/uQGZGYxS5dfzU7VRMMbTqOpeNvzRvgTWLgHk/Q6aTSXOsxmxgT0N1x4pfeS9G/gjnEBYGzD
 ijaei2DsxsN65q6l7loeBKJyDRfmN7am5qRAGkTP298q1++Leazre6nQrrXtF1kC9IM0MmjctPR4P
 HZNYyIZWhKPqSAq+Viu1qeoWoWz3Qhn0mqCkuz9yTZhKS5SuUr5aRex431cBp2fT3k5VYscAPUFS/
 5yN3hwE/ihKD6rJZtUIVOXh6YGByjvoh+rjfpyyr+3CWYEJpJC5KRwsl1fn3dnRIwwKfhKiOUv/jh
 xDs/21WFZCOUlD1qjmuAvQ==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pC2Qj-0000Ox-PN; Sun, 01 Jan 2023 12:47:30 -0500
Date: Sun, 01 Jan 2023 19:47:30 +0200
Message-Id: <83r0we2ll9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
In-Reply-To: <226b32f79fe1e154cfb4@HIDDEN> (message from Gregory
 Heytings on Sun, 01 Jan 2023 16:59:37 +0000)
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN> <226b32f79fe1e154cfb4@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: mail@HIDDEN, 60464 <at> debbugs.gnu.org, monnier@HIDDEN,
 jporterbugs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 01 Jan 2023 16:59:37 +0000
> From: Gregory Heytings <gregory@HIDDEN>
> cc: 60464 <at> debbugs.gnu.org
> 
> Stefan and Eli, does that patch look right to you?

I don't consider myself an expert on pcomplete, sorry.  I will defer
to Jim and Stefan.  (Although I must say that I'm not sure I see a bug
here.)

However, I do have two questions:

 . is this suggested for master or for the emacs-29 branch?
 . if the latter, then which past version of Emacs handled this correctly?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 17:45:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 12:45:06 2023
Received: from localhost ([127.0.0.1]:41654 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC2OP-0004S6-Rf
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 12:45:06 -0500
Received: from heytings.org ([95.142.160.155]:54648)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1pC2ON-0004Rv-8Q
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 12:45:04 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1672595102;
 bh=MK/eCJW9xx/jkSxFyqgVhqPzZD+xb13ROfSVgNYBzto=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=dTeo+BDFJzbrq9nyYZ3jPW8TxD1nvFBJxdOB79E+h5tIRfAcLNdvLUJsb2dt0mljA
 qBvs4jrKNbglGEbnKfhZudg3evnDBm3FF6p/nc6awv1wo/38ufHp9zjJV7vJHNa6KC
 cdfox0LKDVmrimscSIOo4JadGLQsv3Vrk6f3MsR1Uuw7bHd+aMfhgT7FSNXvrKG1Pa
 0Iy3Ti9REMQy6qXJROrRO5KCWA8G90UgbZ+MaYuSgwZO+C4V4rIOPHPakPJEh/B2rQ
 Sn4PawHoQ73ZsYMhFex3xl2PeViA2vJ4Dpwe9VYbL7zCI975dD66nTSgMBxGPXkWoL
 4nfJ9iKAGCz7g==
Date: Sun, 01 Jan 2023 17:45:02 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Daniel Mendler <mail@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
In-Reply-To: <eaab48c3-1b1e-fd26-9bbf-ac34f8162bbc@HIDDEN>
Message-ID: <226b32f79f9b7d0df4b3@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN>
 <98f323a8-5e92-b81f-3cd0-a31447d6eb65@HIDDEN>
 <226b32f79f9a9894478c@HIDDEN>
 <eaab48c3-1b1e-fd26-9bbf-ac34f8162bbc@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: Jim Porter <jporterbugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>> Feel free to suggest something else.
>
> Yes, I did. The command line string should be returned.
>

I mean, to propose some other code.

>
> I believe you that doing this correctly is non trivial. But this doesn't 
> justify going with your hack.
>

It's extracting the correct part of the command line string that is hacky, 
too hacky to my taste.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 17:35:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 12:35:03 2023
Received: from localhost ([127.0.0.1]:41643 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC2Eh-0004Au-Da
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 12:35:03 -0500
Received: from server.qxqx.de ([178.63.65.180]:58025 helo=mail.qxqx.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1pC2Eg-0004AL-5X
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 12:35:02 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:
 References:Cc:To:Subject:MIME-Version:Date:Message-ID: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=aRqacbPUrU7A6GsgTVuGAVWBO1Xy86dvwkJWRYGY4Is=; b=hKYPEdscT1P6Li+gY4XBzSoMZh
 6j/4COJNpzJydTsVqzYM0OIiNrozYcgKwhOMt4sv8gJ870Vap3yaXEfQaGhJ9lFZn3Zh3TRrfpq2Y
 iX+lhQ696RV4KESgsVJzJfPhzFAfsRE+BXgrvf7SqO/PYmhsvmpp7ZrFH0xl6VZXLT4w=;
Message-ID: <eaab48c3-1b1e-fd26-9bbf-ac34f8162bbc@HIDDEN>
Date: Sun, 1 Jan 2023 18:34:53 +0100
MIME-Version: 1.0
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
To: Gregory Heytings <gregory@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN> <226b32f79fe1e154cfb4@HIDDEN>
 <98f323a8-5e92-b81f-3cd0-a31447d6eb65@HIDDEN>
 <226b32f79f9a9894478c@HIDDEN>
Content-Language: en-US
From: Daniel Mendler <mail@HIDDEN>
In-Reply-To: <226b32f79f9a9894478c@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: Jim Porter <jporterbugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 1/1/23 18:28, Gregory Heytings wrote:
> 
>>> After working a bit more on this bug, I concluded that what Stefan 
>>> initially suggested, to use the string representation of the value, is 
>>> safer than trying to extract the string corresponding to the argument 
>>> that the user typed in from the command line.
>>
>> This approach seems totally wrong to me.
>>
> Feel free to suggest something else.

Yes, I did. The command line string should be returned.

>> Also the approach is pointless. Why would the caller of the function 
>> want to get the string representation, given that the original value is 
>> available as text property?
>>
> Because the pcomplete functions, in particular pcomplete-here-using-help, 
> expect strings.

Of course. The only reason is to return a value of the correct type. But
you then as well return "foo".

>> I suggest you go back to the way you implemented this before and return 
>> the actual command line string with the value attached as text property. 
>> I don't see why that should be less safe. It is just a matter of 
>> determining the correct buffer boundaries.
> 
> Perhaps I should have explained what I mean by "less safe": it is 
> unexpectedly complex to compute the correct buffer boundaries in all 
> cases.  If you don't believe me, try it yourself.

I believe you that doing this correctly is non trivial. But this doesn't
justify going with your hack.

Daniel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 17:28:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 12:28:15 2023
Received: from localhost ([127.0.0.1]:41634 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC287-0003y0-5J
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 12:28:15 -0500
Received: from heytings.org ([95.142.160.155]:54620)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1pC284-0003xr-Je
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 12:28:13 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1672594091;
 bh=g7hkrqoLW/xfJMhehMksvTmUxbMhEocriHNtQbWtVMw=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=m490rMqVFT1pwX0eBsyYrbkwj0sWuHui7OqZ71EfbTPdnERIcMWRtRXl2QSOvGCIl
 sOLmkBlgkHiKO9qRIbmrOtK0YQKweO5HG8fFdba3S3cOf/GWlVgQu8aH6c3BxuJhk/
 Y9WB7RIqFRcXpoAcMftTvtfnJNTAixhxJKN92H26rHxexeBpBGs5psuybqhGn+7ipp
 3uoLwXqQ83hMpSSy4lDS2FnWDD+jA6ZxZbvT7hAAOXEBVvaj/kKkjbBnBqpZTr7L+R
 2BMCm6Vp17P60q8HWAu8MhXOTOhyc7qkJqYSJonfFS3RE3t//LWvlH+uxNiiNjd9Jk
 l6QEPFlMD7U9g==
Date: Sun, 01 Jan 2023 17:28:10 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Daniel Mendler <mail@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
In-Reply-To: <98f323a8-5e92-b81f-3cd0-a31447d6eb65@HIDDEN>
Message-ID: <226b32f79f9a9894478c@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
 <226b32f79fe1e154cfb4@HIDDEN>
 <98f323a8-5e92-b81f-3cd0-a31447d6eb65@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: Jim Porter <jporterbugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 60464 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>> After working a bit more on this bug, I concluded that what Stefan 
>> initially suggested, to use the string representation of the value, is 
>> safer than trying to extract the string corresponding to the argument 
>> that the user typed in from the command line.
>
> This approach seems totally wrong to me.
>

Feel free to suggest something else.

>
> You now introduced a third representation.
>

No, there are two representations: pcomplete-arg returns a string 
representation of the value, with that value attached to the string, when 
its caller does not expect a non-string value.

>
> Also the approach is pointless. Why would the caller of the function 
> want to get the string representation, given that the original value is 
> available as text property?
>

Because the pcomplete functions, in particular pcomplete-here-using-help, 
expect strings.

>
> I suggest you go back to the way you implemented this before and return 
> the actual command line string with the value attached as text property. 
> I don't see why that should be less safe. It is just a matter of 
> determining the correct buffer boundaries.
>

Perhaps I should have explained what I mean by "less safe": it is 
unexpectedly complex to compute the correct buffer boundaries in all 
cases.  If you don't believe me, try it yourself.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 17:18:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 12:18:18 2023
Received: from localhost ([127.0.0.1]:41624 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC1yU-0003gH-4r
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 12:18:18 -0500
Received: from server.qxqx.de ([178.63.65.180]:42143 helo=mail.qxqx.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1pC1yS-0003fz-37
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 12:18:16 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:
 References:Cc:To:Subject:MIME-Version:Date:Message-ID: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=yPmMPpzwM20bicFJhFcCdqEJnItjq+GqpxWXhYYK++w=; b=GXPY/yveMeXFxY5zGhJopexdcT
 EpjZwJIzjsRpV/keifTSK0rWiXnZAPy1mhQQORPnjjw97MzN5Wh0hWZGFdb0XHdGios9SK4QQCGQ9
 5se1fab+RnLrMbpgokvPuAei4/Zrf3AqZf4d7rxjG/PRoJgLtEE3DQpDVr1viRUE34eE=;
Message-ID: <98f323a8-5e92-b81f-3cd0-a31447d6eb65@HIDDEN>
Date: Sun, 1 Jan 2023 18:18:07 +0100
MIME-Version: 1.0
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
To: Gregory Heytings <gregory@HIDDEN>,
 Jim Porter <jporterbugs@HIDDEN>, Stefan Monnier
 <monnier@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN> <226b32f79fe1e154cfb4@HIDDEN>
Content-Language: en-US
From: Daniel Mendler <mail@HIDDEN>
In-Reply-To: <226b32f79fe1e154cfb4@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: 60464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 1/1/23 17:59, Gregory Heytings wrote:
> After working a bit more on this bug, I concluded that what Stefan 
> initially suggested, to use the string representation of the value, is 
> safer than trying to extract the string corresponding to the argument that 
> the user typed in from the command line.

This approach seems totally wrong to me. You now introduced a third
representation. pcomplete-arg returns the string representation (1) with
the value attached as second representation (2). For other scenarios it
returns the string argument itself from the command line (3).

Also the approach is pointless. Why would the caller of the function
want to get the string representation, given that the original value is
available as text property?

I suggest you go back to the way you implemented this before and return
the actual command line string with the value attached as text property.
I don't see why that should be less safe. It is just a matter of
determining the correct buffer boundaries.

Daniel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 16:59:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 11:59:41 2023
Received: from localhost ([127.0.0.1]:41600 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pC1gT-00039U-C0
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 11:59:41 -0500
Received: from heytings.org ([95.142.160.155]:54562)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1pC1gR-00039L-QM
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 11:59:40 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1672592378;
 bh=XpFjFx9hO3D+hldRaDMlaK70EGyET8zQojpylB3sXh0=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=1R4REtF+q6jPB/sKZBJoPZ1YZvxMEggqKRvEM3GMGzJzeKKtPwNXpztVvJko/JVUH
 Vu+oxcBTLawBwKs0lG4lTM5wG43I1Zj957Ef7MD2Zfr4nTG/2hpQSCaKo8zBRjAOSR
 5DSMEzL0FaJfBTfB/q0yTBPpnIL6f64cNQJCVMf/4QqDD8nehHVudPnDyKladOFEC7
 J53Iq6Rb9zVXQP55DoCsxbfhUNVMEgwReHR227r/lUGXZiOcs2DVX8bmSVr0/Yvrkw
 A+smktMaJEuinG/PkwRq+qmiYpCj6yZ3qMSosZnJC7oQTC0ASV3JB28TslrDjSwYU0
 QU/u2gqVCQnOg==
Date: Sun, 01 Jan 2023 16:59:37 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Daniel Mendler <mail@HIDDEN>, 
 Jim Porter <jporterbugs@HIDDEN>, 
 Stefan Monnier <monnier@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
In-Reply-To: <226b32f79f325daf9c7a@HIDDEN>
Message-ID: <226b32f79fe1e154cfb4@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
 <226b32f79f325daf9c7a@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="Gv7UoeGtTO"
Content-ID: <226b32f79f7b63c72c63@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: 60464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--Gv7UoeGtTO
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-ID: <226b32f79f711c08a996@HIDDEN>


After working a bit more on this bug, I concluded that what Stefan 
initially suggested, to use the string representation of the value, is 
safer than trying to extract the string corresponding to the argument that 
the user typed in from the command line.

But that's not the end of the story.  The problem is that, IIUC, in 
Eshell, in a directory with .el files and without .EL files:

(1) ls *.el TAB should display all these files in *Completions*

(2) ls *.EL TAB should say "No match"

(3) ls *.el SPC TAB should display all files (not just the .el ones) in *Completions*

(4) ls *.EL SPC TAB should display all files (not just the .el ones) in *Completions*

IOW, sometimes pcomplete-arg should in fact return a list and not a single 
string value, because that's what Eshell expects (case (1) above), and 
sometimes it shouldn't.  According to my tests, a non-string value can be 
returned if and only if index is 'last'.  Hopefully, this is also what 
other users of pcomplete expect.

Can you please test the attached patch as extensively as possible, and 
report if you see regressions?

Jim, can you also try the patch and report if you see regressions?

Stefan and Eli, does that patch look right to you?

Thanks.

--Gv7UoeGtTO
Content-Type: text/x-diff; name=Further-improvement-for-non-string-values-in-pcomple.patch; charset=us-ascii
Content-Transfer-Encoding: base64
Content-ID: <226b32f79f103462b3e6@HIDDEN>
Content-Disposition: attachment; filename=Further-improvement-for-non-string-values-in-pcomple.patch

RnJvbSBlZTI4NzcwMThiMWNkYjkzZjExZmZmYzg5YjlkZDRlZDQ2MWZjYzk2
IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0
aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBTdW4sIDEgSmFu
IDIwMjMgMTY6NDc6MzYgKzAwMDANClN1YmplY3Q6IFtQQVRDSF0gRnVydGhl
ciBpbXByb3ZlbWVudCBmb3Igbm9uLXN0cmluZyB2YWx1ZXMgaW4gcGNvbXBs
ZXRlDQoNCiogbGlzcC9wY29tcGxldGUuZWwgKHBjb21wbGV0ZS1hcmcpOiBV
c2UgdGhlIHN0cmluZyByZXByZXNlbnRhdGlvbg0Kb2YgdGhlIGFyZ3VtZW50
IHZhbHVlIGluc3RlYWQgb2YgdGhlIHRleHQgcmVwcmVzZW50YXRpb24gb2Yg
dGhlDQphcmd1bWVudC4gIFJldHVybiB0aGUgdmFsdWUsIGV2ZW4gd2hlbiBp
dCBpcyBub3QgYSBzdHJpbmcsIHdoZW4NCmluZGV4IGlzICdsYXN0Jy4gIEZp
eGVzIGJ1ZyM2MDQ2NC4NCi0tLQ0KIGxpc3AvcGNvbXBsZXRlLmVsIHwgMTYg
KysrKysrKy0tLS0tLS0tLQ0KIDEgZmlsZSBjaGFuZ2VkLCA3IGluc2VydGlv
bnMoKyksIDkgZGVsZXRpb25zKC0pDQoNCmRpZmYgLS1naXQgYS9saXNwL3Bj
b21wbGV0ZS5lbCBiL2xpc3AvcGNvbXBsZXRlLmVsDQppbmRleCA1YmVlNTE1
MjQ2Li5iY2U5YWE1YjRkIDEwMDY0NA0KLS0tIGEvbGlzcC9wY29tcGxldGUu
ZWwNCisrKyBiL2xpc3AvcGNvbXBsZXRlLmVsDQpAQCAtNjQ4LDEwICs2NDgs
MTAgQEAgcGNvbXBsZXRlLWFyZw0KIGFjY2Vzc2luZyBhYnNvbHV0ZSBhcmd1
bWVudCBwb3NpdGlvbnMuDQogDQogV2hlbiB0aGUgYXJndW1lbnQgaGFzIGJl
ZW4gdHJhbnNmb3JtZWQgaW50byBzb21ldGhpbmcgdGhhdCBpcyBub3QNCi1h
IHN0cmluZyBieSBgcGNvbXBsZXRlLXBhcnNlLWFyZ3VtZW50cy1mdW5jdGlv
bicsIHRoZSB0ZXh0DQotcmVwcmVzZW50YXRpb24gb2YgdGhlIGFyZ3VtZW50
LCBuYW1lbHkgd2hhdCB0aGUgdXNlciBhY3R1YWxseQ0KLXR5cGVkIGluLCBp
cyByZXR1cm5lZCwgYW5kIHRoZSB2YWx1ZSBvZiB0aGUgYXJndW1lbnQgaXMg
c3RvcmVkIGluDQotdGhlIHBjb21wbGV0ZS1hcmctdmFsdWUgdGV4dCBwcm9w
ZXJ0eSBvZiB0aGF0IHN0cmluZy4iDQorYSBzdHJpbmcgYnkgYHBjb21wbGV0
ZS1wYXJzZS1hcmd1bWVudHMtZnVuY3Rpb24nIGFuZCBJTkRFWCBpcyBub3QN
CitgbGFzdCcsIHRoZSBzdHJpbmcgcmVwcmVzZW50YXRpb24gb2YgdGhhdCB2
YWx1ZSBpcyByZXR1cm5lZCwgYW5kDQordGhlIHZhbHVlIGlzIHN0b3JlZCBp
biB0aGUgcGNvbXBsZXRlLWFyZy12YWx1ZSB0ZXh0IHByb3BlcnR5IG9mDQor
dGhhdCBzdHJpbmcuIg0KICAgKGxldCAoKGFyZw0KICAgICAgICAgIChudGgg
KCsgKHBjYXNlIGluZGV4DQogCSAgICAgICAgICAgKCdmaXJzdCAwKQ0KQEAg
LTY1OSwxMiArNjU5LDEwIEBAIHBjb21wbGV0ZS1hcmcNCiAJICAgICAgICAg
ICAoXyAgICAgICgtIHBjb21wbGV0ZS1pbmRleCAob3IgaW5kZXggMCkpKSkN
CiAJICAgICAgICAgKG9yIG9mZnNldCAwKSkNCiAgICAgICAgICAgICAgIHBj
b21wbGV0ZS1hcmdzKSkpDQotICAgIChpZiAoc3RyaW5ncCBhcmcpDQorICAg
IChpZiAob3IgKHN0cmluZ3AgYXJnKQ0KKyAgICAgICAgICAgIChlcSBpbmRl
eCAnbGFzdCkpDQogICAgICAgICBhcmcNCi0gICAgICAocHJvcGVydGl6ZQ0K
LSAgICAgICAoYnVmZmVyLXN1YnN0cmluZyAocGNvbXBsZXRlLWJlZ2luIGlu
ZGV4IG9mZnNldCkNCi0gICAgICAgICAgICAgICAgICAgICAgICAgKHBjb21w
bGV0ZS1iZWdpbiAoMS0gKG9yIGluZGV4IDApKSBvZmZzZXQpKQ0KLSAgICAg
ICAncGNvbXBsZXRlLWFyZy12YWx1ZSBhcmcpKSkpDQorICAgICAgKHByb3Bl
cnRpemUgKGZvcm1hdCAiJVMiIGFyZykgJ3Bjb21wbGV0ZS1hcmctdmFsdWUg
YXJnKSkpKQ0KIA0KIChkZWZ1biBwY29tcGxldGUtYmVnaW4gKCZvcHRpb25h
bCBpbmRleCBvZmZzZXQpDQogICAiUmV0dXJuIHRoZSBiZWdpbm5pbmcgcG9z
aXRpb24gb2YgdGhlIElOREVYdGggYXJndW1lbnQuDQotLSANCjIuMzkuMA0K
DQo=

--Gv7UoeGtTO--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 12:04:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 07:04:44 2023
Received: from localhost ([127.0.0.1]:40393 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pBx52-0000iz-03
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 07:04:44 -0500
Received: from heytings.org ([95.142.160.155]:54304)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1pBx50-0000iq-1Z
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 07:04:42 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1672574680;
 bh=htj0a20uJ8N+JiiLP0c8maw5H9J+SRVFw1jYgQt+ZSE=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=5wkJn5KVadgmm4hoJrY/HEBWvHBKS7tbpa5NdVMlH8AsvrBHiuvJ7TlZmVv4ayO8J
 PaEFiRuEwid+qyy4LoWPs9BwzMBVfISzjQDYoNHkh5zIW3/P/8HYj+v3ojmssnWZLx
 CeoGmTaNOIWCBO/6GlqDtUL0zpsk8wvSI97MtiYLX6FxNUyaD4lkONPalyitEEtj1O
 0IVhJHYRkUpFKLI5cu0f6ECS87K1jIlzxuF8mDl+mGAhMT/y6qkJJEoIyKklv0f8fI
 k9uhihOhru3IphnemquGGStnnyMjkUjbxwmItBdoyL7j/W9Ffkdx4XcMllp0g8rfuy
 bfsb9MWG0+jeQ==
Date: Sun, 01 Jan 2023 12:04:40 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Daniel Mendler <mail@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
In-Reply-To: <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
Message-ID: <226b32f79f325daf9c7a@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
 <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: 60464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> If you don't use Eshell, maybe you use Shell? Pcomplete issues should 
> also occur there.
>

They don't, or at least the specific issue of this bug doesn't, AFAICS. 
The pcomplete-parse-arguments-function in Shell is 
shell--parse-pcomplete-arguments, which only splits the command line into 
its whitespace-separated elements.  IOW, that function only returns 
strings.  The problem with Eshell, in which the 
pcomplete-parse-arguments-function is eshell-complete-parse-arguments, is 
that it returns non-strings.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 11:53:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 06:53:27 2023
Received: from localhost ([127.0.0.1]:40389 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pBwu6-0000RN-Kp
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 06:53:27 -0500
Received: from server.qxqx.de ([178.63.65.180]:47683 helo=mail.qxqx.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1pBwu4-0000R6-MV
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 06:53:25 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:
 References:Cc:To:Subject:MIME-Version:Date:Message-ID: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=Gbp5rUNlwqzSTxFm3syUXdsT2my3lAHADR7LUeNreNk=; b=I8nH0vUqRFwNC91v/I9MdUWjJM
 haDnEPFKuotkvxi790IuD3yFYjakOpwVlwyVB+sb7LPRsWrpFeolaUp7A1m60yPp89Ex5/MbIp45O
 6RKL4+DDdvHJYftL0Pa41ySe2VFgQTIjImP+qIe5ypumOYWJgMAol4lqbJhuJAqAJpXg=;
Message-ID: <82cf05e4-3c3f-9804-4801-eb31988f6d7d@HIDDEN>
Date: Sun, 1 Jan 2023 12:53:16 +0100
MIME-Version: 1.0
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
To: Gregory Heytings <gregory@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
 <226b32f79f728e6bfed4@HIDDEN>
Content-Language: en-US
From: Daniel Mendler <mail@HIDDEN>
In-Reply-To: <226b32f79f728e6bfed4@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: 60464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 1/1/23 12:35, Gregory Heytings wrote:
>> Okay, I wasn't sure if my other mail got lost. Anyway I wanted to attach 
>> the additional stack trace. The problem occurs only if 'last is passed, 
>> therefore the issue probably doesn't occur for `ls *.el SPC TAB`.
>>
> 
> It also occurs if 'first is passed, in fact.  Try '$exec-path SPC TAB'.

Of course.

>> You may want to try my Corfu completion UI for testing, even if you 
>> don't like popups for completion or auto completion. It is helpful for 
>> debugging since the UI asks the completion table for completions very 
>> often, in particular if one configures overly aggressive settings (not 
>> recommended for real usage):
>>
> 
> As I said in bug#59956 and bug#60021, I don't use Eshell, so I don't think 
> using another completion UI would have helped.  That's why I asked for 
> feedback, Jim and you both tried the patch and did not report problems.

Actually I tried the patch only for a short time and then forgot about
it when recompiling Emacs the next time. I looked into the issue again
when you closed the bug report.

If you don't use Eshell, maybe you use Shell? Pcomplete issues should
also occur there. But even if you try Eshell/Shell for only a short
time, using Corfu would definitely help in its aggressive settings.
There is no doubt about that since I only found these issues thanks to
Corfu. With default completion you simply don't press TAB after each
other key.

Daniel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 11:35:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 06:35:30 2023
Received: from localhost ([127.0.0.1]:40383 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pBwcj-0008Nw-U0
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 06:35:30 -0500
Received: from heytings.org ([95.142.160.155]:54264)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1pBwci-0008No-CF
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 06:35:28 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1672572927;
 bh=Pjlh1T1en6jmvzEAEqUM61uIUDORSZHeijJ3juq4EKg=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=JMbnnmBUFJ26CUNSq57vSA8urd/0sKIeiNkTu30YK8r0/KvUDfO4kZwcDOdqnC9zb
 vsXeP1Wd7Kirr0Fd4fCUW2b+7v2TmyfDxxnRzo14PTBU20ZK88sBWV6vCRZLQWwJNC
 YpQue595C/tyunfPvxk5bcoAtQolqbdCX+4Y2SiaFdse3XihMbVyptEB3U2+XOHX1I
 v7ngLh/SuoeXfpR/xOeMxjP2UvJPJw7KaFW3dz3ThJl58Kx1BfyUtboXtARkW8zo56
 kGpWQwL0OV7xz7YEewYEuWgsoFTX1AKCIL9USF6SRUe2KtISwsRb4ZEgV+faNeVeNQ
 IOY9Wjgzd9SCQ==
Date: Sun, 01 Jan 2023 11:35:27 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Daniel Mendler <mail@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
In-Reply-To: <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
Message-ID: <226b32f79f728e6bfed4@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
 <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: 60464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> Okay, I wasn't sure if my other mail got lost. Anyway I wanted to attach 
> the additional stack trace. The problem occurs only if 'last is passed, 
> therefore the issue probably doesn't occur for `ls *.el SPC TAB`.
>

It also occurs if 'first is passed, in fact.  Try '$exec-path SPC TAB'.

>
> You may want to try my Corfu completion UI for testing, even if you 
> don't like popups for completion or auto completion. It is helpful for 
> debugging since the UI asks the completion table for completions very 
> often, in particular if one configures overly aggressive settings (not 
> recommended for real usage):
>

As I said in bug#59956 and bug#60021, I don't use Eshell, so I don't think 
using another completion UI would have helped.  That's why I asked for 
feedback, Jim and you both tried the patch and did not report problems.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 11:21:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 06:21:43 2023
Received: from localhost ([127.0.0.1]:40355 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pBwPO-0007pn-P5
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 06:21:43 -0500
Received: from server.qxqx.de ([178.63.65.180]:58939 helo=mail.qxqx.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1pBwPM-0007pU-AE
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 06:21:41 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:
 References:Cc:To:Subject:MIME-Version:Date:Message-ID: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=OBojKiBa3VGik8Is/JQdPCoxqbuyJJe6uc9H5PFxzfI=; b=GLfYL/CBxU8vQHtPKeLxif1sYQ
 nPV9aqyKKJD0/c9dILdMKQH2gM5hbTI3U6sN4iagNSOTmW4YZVpmAu7hzKhZYqmwBQUT00h8EPq16
 kWeG8GRXCiu9cY/gD1w4DwsaBdpPixm0Yak4d/eslPApVr1Gdq1qwIP/mkDuDMEU0C9Q=;
Message-ID: <009141ba-c21a-a5cb-a81b-c72a12a26207@HIDDEN>
Date: Sun, 1 Jan 2023 12:21:32 +0100
MIME-Version: 1.0
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with
 argument 'last
To: Gregory Heytings <gregory@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
 <226b32f79f2d431d75b6@HIDDEN>
Content-Language: en-US
From: Daniel Mendler <mail@HIDDEN>
In-Reply-To: <226b32f79f2d431d75b6@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 60464
Cc: 60464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 1/1/23 12:16, Gregory Heytings wrote:
> 
>>
>> Follow up on bug#60021
>>
>> 1. M-x eshell
>> 2. Enter `ls *.el` in a directory with Elisp files
>> 3. Press TAB
>>
> 
> Thanks for your bug report.  It was not necessary to open another bug 
> report, I've seen your post in bug#60021 and am working on it.  Note that 
> with 'ls *.el SPC TAB', which is something that is more likely to be used, 
> there is no error.

Okay, I wasn't sure if my other mail got lost. Anyway I wanted to attach
the additional stack trace. The problem occurs only if 'last is passed,
therefore the issue probably doesn't occur for `ls *.el SPC TAB`.

You may want to try my Corfu completion UI for testing, even if you
don't like popups for completion or auto completion. It is helpful for
debugging since the UI asks the completion table for completions very
often, in particular if one configures overly aggressive settings (not
recommended for real usage):

(setq corfu-auto-delay 0)
(setq corfu-auto-prefix 1)
(global-corfu-mode)

Daniel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at 60464 <at> debbugs.gnu.org:


Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 11:16:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 06:16:20 2023
Received: from localhost ([127.0.0.1]:40351 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pBwKC-0007gL-28
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 06:16:20 -0500
Received: from heytings.org ([95.142.160.155]:54238)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1pBwK9-0007gB-FI
 for 60464 <at> debbugs.gnu.org; Sun, 01 Jan 2023 06:16:18 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1672571776;
 bh=vqkpzv5dDEmbYvKUmGj2My7AlnQMSi88V4LeRv77TuE=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=NgxvveWeaYx6lyu6XK6TqR6oGphg7knNWy0XxM+gyFBCsdk6LNdwrU2lac7BgVJ18
 2WLZZe7MayGpVIrlroIsvWPmvxX4JUt9mn7klYc6xdEQL5+zryCTKU8nsGeqBtMU6f
 TWI512o9Wl5lObgkZmwqsf1GvVrnyiL3rV6nuKcgQ1sHGy2Cmj/RHLb/Tv3zvFzv5G
 bGTcHY/jtfcKIJkqnZGzVTO/XQ++y4MgzpixZoN5hQDEsgOrSlwjot7Twz7iIuFFjV
 qFaWEIm9QvHaYfuKSGv2AidqtIE2GUZSayA4dXbkkAsKJnwnCgdLw3G50RFFK175Uz
 0ICe03kpqLIJg==
Date: Sun, 01 Jan 2023 11:16:15 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Daniel Mendler <mail@HIDDEN>
Subject: Re: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument
 'last
In-Reply-To: <87358u5y6l.fsf@HIDDEN>
Message-ID: <226b32f79f2d431d75b6@HIDDEN>
References: <87358u5y6l.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 60464
Cc: 60464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> Follow up on bug#60021
>
> 1. M-x eshell
> 2. Enter `ls *.el` in a directory with Elisp files
> 3. Press TAB
>

Thanks for your bug report.  It was not necessary to open another bug 
report, I've seen your post in bug#60021 and am working on it.  Note that 
with 'ls *.el SPC TAB', which is something that is more likely to be used, 
there is no error.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 Jan 2023 10:47:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 05:47:40 2023
Received: from localhost ([127.0.0.1]:40330 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pBvsS-0004Ve-AV
	for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 05:47:40 -0500
Received: from lists.gnu.org ([209.51.188.17]:38354)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1pBvsQ-0004VQ-Um
 for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 05:47:39 -0500
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 <mail@HIDDEN>)
 id 1pBvsQ-00008o-EX
 for bug-gnu-emacs@HIDDEN; Sun, 01 Jan 2023 05:47:38 -0500
Received: from server.qxqx.de ([2a01:4f8:121:346::180] helo=mail.qxqx.de)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>)
 id 1pBvsO-0004XW-6N
 for bug-gnu-emacs@HIDDEN; Sun, 01 Jan 2023 05:47:38 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From
 :Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description:
 Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
 In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=843cOIz6UCMOjliLxlLTDiamOdezdDtcLk3ea24d4xc=; b=G3oeiahIuY6DOpdwdV65YHHWu2
 pubw3LQh4K4IB9G12pkHaZiS7acjo2jHGAO3nay5IA3/XlNq+XIj+SuRhTSz3KXWPx3w45grbIxuT
 +ZDMTtlsjYaNWlum2cdRwZ2bpIp6+EEpvXiy2BjYP/E0UfUx/26H/GuP81hF8jmHwThw=;
From: Daniel Mendler <mail@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.0.60; Regression - pcomplete-arg fails with argument 'last
Date: Sun, 01 Jan 2023 11:47:14 +0100
Message-ID: <87358u5y6l.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a01:4f8:121:346::180;
 envelope-from=mail@HIDDEN; helo=mail.qxqx.de
X-Spam_score_int: -41
X-Spam_score: -4.2
X-Spam_bar: ----
X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

Follow up on bug#60021

1. M-x eshell
2. Enter `ls *.el` in a directory with Elisp files
3. Press TAB

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p last)
  (pcomplete-arg last)
  (pcomplete-parse-arguments nil)
  (pcomplete-completions)
  (pcomplete-completions-at-point)
  (#<subr completion--capf-wrapper> pcomplete-completions-at-point all)
  (corfu--capf-wrapper-advice #<subr completion--capf-wrapper> pcomplete-completions-at-point all)
  (apply corfu--capf-wrapper-advice #<subr completion--capf-wrapper> (pcomplete-completions-at-point all))
  (completion--capf-wrapper pcomplete-completions-at-point all)
  (completion-at-point)
  (funcall-interactively completion-at-point)
  (command-execute completion-at-point)

In GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.16.0, Xaw scroll bars) of 2022-12-30 built on projects
Repository revision: d086cd6cf877c6ca7af6712f9b79b52dd0caa934
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)




Acknowledgement sent to Daniel Mendler <mail@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#60464; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 4 Jan 2023 18:45:02 UTC

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