From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter 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 22:45:42 -0700 Message-ID: References: <2eb987c6-0aec-55df-db4e-ef95557ab809@daniel-mendler.de> <83zg64zhyx.fsf@gnu.org> <31f17ffe-8070-4259-03d2-2c63e5cc5ee9@daniel-mendler.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10648"; mail-complaints-to="usenet@ciao.gmane.io" Cc: liuhui1610@gmail.com, monnier@iro.umontreal.ca, 61283@debbugs.gnu.org To: Daniel Mendler , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 17 07:46:24 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 1pz9zU-0002eb-2f for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 May 2023 07:46:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pz9zA-0004pB-QO; Wed, 17 May 2023 01:46: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 1pz9z8-0004od-8c for bug-gnu-emacs@gnu.org; Wed, 17 May 2023 01:46:02 -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 1pz9z7-0000Ze-V7 for bug-gnu-emacs@gnu.org; Wed, 17 May 2023 01:46:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pz9z7-0006yh-RK for bug-gnu-emacs@gnu.org; Wed, 17 May 2023 01:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 May 2023 05:46:01 +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.168430235326808 (code B ref 61283); Wed, 17 May 2023 05:46:01 +0000 Original-Received: (at 61283) by debbugs.gnu.org; 17 May 2023 05:45:53 +0000 Original-Received: from localhost ([127.0.0.1]:48567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pz9yy-0006yJ-Vf for submit@debbugs.gnu.org; Wed, 17 May 2023 01:45:53 -0400 Original-Received: from mail-pl1-f173.google.com ([209.85.214.173]:51553) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pz9yv-0006y1-H3 for 61283@debbugs.gnu.org; Wed, 17 May 2023 01:45:51 -0400 Original-Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1aad5245632so3220175ad.3 for <61283@debbugs.gnu.org>; Tue, 16 May 2023 22:45:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684302343; x=1686894343; 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=Jf3DfUUNn5tQkMGW9K1icU9oIpF4zLDC5xo/Q4lKy6E=; b=m3H3zXOmxF44Tpb8Wijc0bPOiDlyhlj2HCeCltiwRj9vaBzs5HgbzTm5k4Ck6A+C0U u1en3nmZjnP/CzL4jNxwsUsrPu//mpUYwkUoib/hGM0iT3dAEuWTbACzx6tk4nXsr8ga OuaGTs3CH9FnHCmn0oEaGSKRDU/Tq35OkUp77Y9oMgu8ipgGBAMQCZv4QX9sMpjYHzAq FDjR3qsUEDlezElowadPszzGfEr88vJ5viPi+AQ41hTrdH7qExzrLAdqlRWtgox95Cxd tkbzECkstjVor9rQ+Hrp2l5nLw/HQFyEf9rRbZiCNgdhtGDvHttRr08ex/pagPfyRI/X w/PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684302343; x=1686894343; 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=Jf3DfUUNn5tQkMGW9K1icU9oIpF4zLDC5xo/Q4lKy6E=; b=goH0t52xUUs2x4GkUpapoWn1KjAEq8QTjR9+D72isN8XKWwfeml2a9U0qmPKnVYqaL z3sbBd9TzvE91EEl+2r6P06iFKMUktT+nXD/vjYr3Z57Dj433bsruU9eQTmOOtlfg4kj 14FMmnSIyp3m1Cgjh3yn6WlNlg3BcpPJkoYuOdnuxL+9iWkF82YmiJy4VDxwueng5Xx6 ukqlIo8EcI2M8MTKqCVlTG23RN15GfvkdXkAWrPsWgEMRNDbb6ZSD2L6O/XnzEKCP94R 1Xg6xD/ebDsM0T827hcplQrTYzDWs0MBL7EqV+ytzpilMnWZFvZ8pDpPWaqK6KhZ9chN cSGg== X-Gm-Message-State: AC+VfDzA+IPaJItg2+7tfo1B2uBncvvds34CWg20ZMSTNiWgjBZBlNog i78LvNHg8JSlZjOf+L9zTv0= X-Google-Smtp-Source: ACHHUZ6jNm9cj05LacMchMhPdlKf0aVHgnwMj+aTKXth9JwJ/EyUqtpVp7uJaXz+6YHL4Pld42HYcQ== X-Received: by 2002:a17:902:9a04:b0:1ad:bccc:af78 with SMTP id v4-20020a1709029a0400b001adbcccaf78mr24918403plp.58.1684302343251; Tue, 16 May 2023 22:45:43 -0700 (PDT) Original-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 d8-20020a170902654800b001ae48d441desm1357995pln.148.2023.05.16.22.45.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 May 2023 22:45:42 -0700 (PDT) Content-Language: en-US In-Reply-To: <31f17ffe-8070-4259-03d2-2c63e5cc5ee9@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:261822 Archived-At: On 5/16/2023 3:44 AM, Daniel Mendler wrote: > I just tried again and it seems the annotations work only in Shell but > not in Eshell. This is probably the reason why the issue was missed. In > Eshell the functionality never worked as intended after it got > installed. I didn't mean to exaggerate. > > - M-x shell -> Type ls - TAB -> Annotations are displayed > - M-x eshell -> Type ls - TAB -> No annotations I don't see annotations in either shell or eshell. Am I doing something wrong? From "emacs -Q -f shell", I type "ls -" and press TAB. I do have a mostly-complete patch for this though, but it's *certainly* too complex for Emacs 29. The general strategy I'm using is to rely on the fact that the completion list for 'try-completion', etc can be an alist where the "keys" (i.e the CAR of each element of the main list) are the strings to be completed. So then you can do something like: '(("foo" (pcomplete-annotation . "=bar")) ;; ... ) Then, in 'pcomplete-completions-at-point', I can get the annotations[1] in the :annotation-function on the completion table that we return. This is obviously a pretty invasive change and would require changing a number of internal assumptions in Pcomplete (though I don't think it would break the public API). If this sounds even remotely like a reasonable way to go forward, I'll try to clean up my patch a bit more and post it for feedback; it's currently a bit of a mess, I'm afraid... [1] Ditto for 'pcomplete-help' and the :company-docsig function.