From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#61283: 29.0.60; pcomplete-completions-at-point loses text properties, breaking pcomplete-from-help annotations Date: Tue, 16 May 2023 07:50:17 +0000 Message-ID: <6ca1bd5ed01d0f0225a7@heytings.org> References: <87cz6px8mw.fsf@daniel-mendler.de> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31780"; mail-complaints-to="usenet@ciao.gmane.io" Cc: arstoffel@gmail.com, monnier@iro.umontreal.ca, 61283@debbugs.gnu.org To: Daniel Mendler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 16 09:51:28 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 1pypSu-0007u8-V4 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 May 2023 09:51:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pypSa-0006VF-RS; Tue, 16 May 2023 03:51:04 -0400 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 1pypSY-0006V5-IH for bug-gnu-emacs@gnu.org; Tue, 16 May 2023 03:51:03 -0400 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 1pypSY-0004wI-8m for bug-gnu-emacs@gnu.org; Tue, 16 May 2023 03:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pypSY-0000LG-4n for bug-gnu-emacs@gnu.org; Tue, 16 May 2023 03:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 May 2023 07:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61283 X-GNU-PR-Package: emacs Original-Received: via spool by 61283-submit@debbugs.gnu.org id=B61283.16842234261203 (code B ref 61283); Tue, 16 May 2023 07:51:02 +0000 Original-Received: (at 61283) by debbugs.gnu.org; 16 May 2023 07:50:26 +0000 Original-Received: from localhost ([127.0.0.1]:45077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pypRw-0000JK-Uw for submit@debbugs.gnu.org; Tue, 16 May 2023 03:50:26 -0400 Original-Received: from heytings.org ([95.142.160.155]:35052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pypRr-0000J4-Fv for 61283@debbugs.gnu.org; Tue, 16 May 2023 03:50:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1684223418; bh=T7SdAst8ObHntBh7knMGHsOcPNO06vE2wXugAiIBbQw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=GJ1KDgZJp9F/IQbje1AEqGxS6Lza1H9XTKZCXC4MeMn2NB008B3rhxVVX91ZNvMxs LTN/l+2vMVs3LegXXOEnMNQbwLby7JUZGjdVJQNY6gHTXoDpYC1BQ8XQ3LfLqFsZoo DPPFDELDRl0k7jjonCRp932SwH22tCLd+6Kk0YfR4XLlhh3nhdHg/FxOdG8/5+1FWq fhZ/kA5qLaiUot6wRYYnUUi1ICW8cxVc1r7cYworY7cx+BKJYCM7MF5YEwmWcanSvn yId3IuicJKdklhJsR6HUdqE2/FWqOIhpRHlKO54Dq7CkR74TQm50idOaycWGVkWs39 l6YoEhXg2LqKg== In-Reply-To: <87cz6px8mw.fsf@daniel-mendler.de> 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:261775 Archived-At: > > 1. Start emacs -Q > 2. Evaluate the following two test commands in the scratch buffer: > > (defun good () > (interactive) > (pp (all-completions "" (nth 2 (pcomplete-completions-at-point))))) > > (defun bad () > (interactive) > (pp (all-completions "-" (nth 2 (pcomplete-completions-at-point))))) > > 3. Run shell or eshell > 4. Enter `xargs --' in order to complete command line options via > `pcomplete-from-help'. > 5. M-x good -> Printed completion strings will have pcomplete-annotation > and pcomplete-help text properties. These are used by the > :annotation-function and the :company-docsig function. > 6. M-x bad -> Returned completion strings are stripped of their text > properties. > 7. When triggering completion manually by pressing TAB, there are > no annotations displayed in the *Completions* buffer. > > If I recall correctly, this functionality worked at some point and the > text properties were not removed, such that annotations worked. The > culprit, which destroys the properties, seems to be > `completion-table-with-quoting' in `pcomplete-completions-at-point', but > I wasn't able to figure out which commit caused this (I did not do any > bisecting). > Sorry, I missed your earlier post. There is no need to bisect in this case: 'pcomplete-from-help' was added in a994126968 (which means that it's new in Emacs 29), and the recipe above already gave the exact same result at that point. I took a sample of four revisions between emacs-29/c18f9f155f and a994126968 (f102145d38, 07127e9c29, 4f114c0d95, 809afde01d), and the result is always the same.