From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.bugs Subject: bug#60464: 29.0.60; Regression - pcomplete-arg fails with argument 'last Date: Sun, 1 Jan 2023 18:18:07 +0100 Message-ID: <98f323a8-5e92-b81f-3cd0-a31447d6eb65@daniel-mendler.de> References: <87358u5y6l.fsf@daniel-mendler.de> <226b32f79f2d431d75b6@heytings.org> <009141ba-c21a-a5cb-a81b-c72a12a26207@daniel-mendler.de> <226b32f79f728e6bfed4@heytings.org> <82cf05e4-3c3f-9804-4801-eb31988f6d7d@daniel-mendler.de> <226b32f79f325daf9c7a@heytings.org> <226b32f79fe1e154cfb4@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15899"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60464@debbugs.gnu.org To: Gregory Heytings , Jim Porter , Stefan Monnier , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 01 18:19:18 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pC1zR-0003le-PO for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Jan 2023 18:19:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pC1zF-0003XB-HY; Sun, 01 Jan 2023 12:19:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pC1zC-0003X0-Tk for bug-gnu-emacs@gnu.org; Sun, 01 Jan 2023 12:19:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pC1zC-0006rV-KW for bug-gnu-emacs@gnu.org; Sun, 01 Jan 2023 12:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pC1zC-0003hT-03 for bug-gnu-emacs@gnu.org; Sun, 01 Jan 2023 12:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Jan 2023 17:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60464 X-GNU-PR-Package: emacs Original-Received: via spool by 60464-submit@debbugs.gnu.org id=B60464.167259349814157 (code B ref 60464); Sun, 01 Jan 2023 17:19:01 +0000 Original-Received: (at 60464) by debbugs.gnu.org; 1 Jan 2023 17:18:18 +0000 Original-Received: from localhost ([127.0.0.1]:41624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC1yU-0003gH-4r for submit@debbugs.gnu.org; Sun, 01 Jan 2023 12:18:18 -0500 Original-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 ) id 1pC1yS-0003fz-37 for 60464@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=; Content-Language: en-US In-Reply-To: <226b32f79fe1e154cfb4@heytings.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:252256 Archived-At: 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