GNU logs - #61532, boring messages


Message sent to joaotavora@HIDDEN, bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#61532: 30.0.50; [PATCH]: Make completions without sortText fall to back of the list
Resent-From: Theodor Thornhill <theo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: joaotavora@HIDDEN, bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 15 Feb 2023 14:53:02 +0000
Resent-Message-ID: <handler.61532.B.167647273221260 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 61532
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: 61532 <at> debbugs.gnu.org
Cc: joaotavora@HIDDEN
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
X-Debbugs-Original-Xcc: joaotavora@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.167647273221260
          (code B ref -1); Wed, 15 Feb 2023 14:53:02 +0000
Received: (at submit) by debbugs.gnu.org; 15 Feb 2023 14:52:12 +0000
Received: from localhost ([127.0.0.1]:58445 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pSJ8m-0005Wm-5Y
	for submit <at> debbugs.gnu.org; Wed, 15 Feb 2023 09:52:12 -0500
Received: from lists.gnu.org ([209.51.188.17]:46096)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <theo@HIDDEN>) id 1pSJ8h-0005Wa-HG
 for submit <at> debbugs.gnu.org; Wed, 15 Feb 2023 09:52:10 -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 <theo@HIDDEN>) id 1pSJ8h-0003Ou-9Z
 for bug-gnu-emacs@HIDDEN; Wed, 15 Feb 2023 09:52:07 -0500
Received: from out-3.mta1.migadu.com ([2001:41d0:203:375::3])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <theo@HIDDEN>) id 1pSJ8e-0002XO-I1
 for bug-gnu-emacs@HIDDEN; Wed, 15 Feb 2023 09:52:06 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no;
 s=key1; t=1676472722;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=Zu5D/ymzzY/jOutb6aLZ3KbxmgVomkIv1t+drXHjXMs=;
 b=Rb8s9nb8q2StcFet7I9xa1qAacZbRQuqHxbrn2+bU5CG3xaGJ1QXndpX5DtvM+hF2LIhco
 ukNHbLWra35yRbTywmOK7zXYeCL87d1v5nL9u8qoKFJodbRLVHZ57MqDdxQYjtnbuWOYK5
 a/+JOUGZa0r2ghxU0BP/kbwR89TzdllJEXpaGAAJlwJPJGhN19+KErYjaWs6WB5w9XRQat
 1YBjOOsGiNzBrIPYKuKp77gPDkfu1mlZWFL+K/+Zces1Z83fYT3l1DgXMtcRtumDsVyflF
 tfGyVzvavWP1mZ+klKfofTVgPWXQlVfOvHylGRBKx83uZUflvUBGQwRcGn2EHA==
From: Theodor Thornhill <theo@HIDDEN>
Date: Wed, 15 Feb 2023 15:52:00 +0100
Message-ID: <87ttzn6kxb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Migadu-Flow: FLOW_OUT
Received-SPF: pass client-ip=2001:41d0:203:375::3;
 envelope-from=theo@HIDDEN; helo=out-3.mta1.migadu.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
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 (--)

--=-=-=
Content-Type: text/plain


Hi Joao and others!

As I mentioned in a different Eglot bug I believed there was a problem
with sorting of candidates.  It seems there kinda is, but it's a little
convoluted.  To test this you need to have a server that supplies
snippets, or at least that sends some items with and without :sortText.
However, the code is simple enough, so it should be enough to read it.

So, what happens with completion in Eglot that I find confusing is that
sometimes, candidates in the completion frameworks (company, corfu etc)
display candidates in a seemingly random order compared to what the
server sends.  In particular, the Jdtls server sends snippets without
sorttext, which will be converted to the empty string in the sorter
function.  That in turn will make all the snippets fall to the front of
the list as (string-lessp "" "anything else") evaluates to t.  That
means we ignore the sorts supplied by the server.  Because (string-lessp
nil "anything else") evaluates to nil it will put them at the end of the
list, which IMO makes more sense.

In addition, the completion-category-defaults set by eglot uses flex, as
you know, so the display-sort-function will sort them very hungrily,
making them seem out of order.

For example, if the candidates are (delete, deleteAll, deleteById) when
buffer content is (| is point):

```
something.del|
```

completion will display them in this order: (deleteAll, deleteById,
delete), which yet again "doesn't respect sort order".  The latter issue
is fixed by setting

(setq completion-category-overrides
      '((eglot (styles basic partial-completion initials))))

or something else, which works, but is very convoluted and really not
documented anywhere, or did I miss it?

The former issue is fixed in the supplied patch.  Do you agree with what
I propose?  We could also default to something like :label or
:insertText, but that would in some cases also likely conflict with what
the server is expected to send.

Theo


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Make-completions-without-sortText-fall-to-back-of-th.patch

From 6b5c37f00f73abf07a72d2bc2fe6edb99f8ee0a4 Mon Sep 17 00:00:00 2001
From: Theodor Thornhill <theo@HIDDEN>
Date: Wed, 15 Feb 2023 15:16:15 +0100
Subject: [PATCH] Make completions without :sortText fall to back of the list

* lisp/progmodes/eglot.el: String-lessp is safe with (string-lessp nil
"foo") and (string-lessp "foo" nil), but defaulting to the empty
string puts candidates to the top of the list.  Nil will make the
candidates fall to the end of the list.
---
 lisp/progmodes/eglot.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 5e761d3064f..c8620f4199f 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -2782,10 +2782,9 @@ eglot-completion-at-point
               (cl-sort completions
                        #'string-lessp
                        :key (lambda (c)
-                              (or (plist-get
-                                   (get-text-property 0 'eglot--lsp-item c)
-                                   :sortText)
-                                  "")))))
+                              (plist-get
+                               (get-text-property 0 'eglot--lsp-item c)
+                               :sortText)))))
            (metadata `(metadata (category . eglot)
                                 (display-sort-function . ,sort-completions)))
            resp items (cached-proxies :none)
-- 
2.34.1


--=-=-=--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Theodor Thornhill <theo@HIDDEN>
Subject: bug#61532: Acknowledgement (30.0.50; [PATCH]: Make completions
 without sortText fall to back of the list)
Message-ID: <handler.61532.B.167647273221260.ack <at> debbugs.gnu.org>
References: <87ttzn6kxb.fsf@HIDDEN>
X-Gnu-PR-Message: ack 61532
X-Gnu-PR-Package: emacs
X-Gnu-PR-Keywords: patch
Reply-To: 61532 <at> debbugs.gnu.org
Date: Wed, 15 Feb 2023 14:53:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

As you requested using X-Debbugs-CC, your message was also forwarded to
  joaotavora@HIDDEN
(after having been given a bug report number, if it did not have one).

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 61532 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
61532: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D61532
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#61532: 30.0.50; [PATCH]: Make completions without sortText fall to back of the list
Resent-From: Theodor Thornhill <theo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 18 Feb 2023 22:19:02 +0000
Resent-Message-ID: <handler.61532.B61532.167675870516521 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 61532
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: 61532 <at> debbugs.gnu.org
Cc: joaotavora@HIDDEN
Received: via spool by 61532-submit <at> debbugs.gnu.org id=B61532.167675870516521
          (code B ref 61532); Sat, 18 Feb 2023 22:19:02 +0000
Received: (at 61532) by debbugs.gnu.org; 18 Feb 2023 22:18:25 +0000
Received: from localhost ([127.0.0.1]:45120 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pTVXE-0004IP-UR
	for submit <at> debbugs.gnu.org; Sat, 18 Feb 2023 17:18:25 -0500
Received: from out2.migadu.com ([188.165.223.204]:35264)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <theo@HIDDEN>) id 1pTVXC-0004IC-6A
 for 61532 <at> debbugs.gnu.org; Sat, 18 Feb 2023 17:18:23 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no;
 s=key1; t=1676758700;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=Do+UDE6VEj/pH77M0B9oUTlK0F6ZDBW6hEU7ccv6I14=;
 b=SvpKZA49Qa48vGiQlt7O+gRQqj4/oCHFnYUQrt/pNbfp+Qyn8gBC7zZB98Q+l8/Topn098
 3SAJUJ9IUKspHnDvYc0MhDue2oCoUus6BMdmThv1VeiaooszTPdUkEduP7cl85pKwlgvrT
 C9gKJvlzr2NR4S0192yeJXI6WlghUA/0rWcMOBvpjVqy9SUJLF2TV9LcUPrhzDjX1A4ilu
 EaPUo/iBaMo3MrNR5KFp6bv5P5e6KDya2+V3LEyVP1vdUdB2KAm2d8m1iGSRiQmbSzMW85
 NAqLqByiE9p/55tXHYJEnKlyARlJbLPuqsT2henYG4F3h3maiaEk+C671fPuBA==
From: Theodor Thornhill <theo@HIDDEN>
In-Reply-To: <87ttzn6kxb.fsf@HIDDEN> (Theodor Thornhill's message of
 "Wed, 15 Feb 2023 15:52:00 +0100")
References: <87ttzn6kxb.fsf@HIDDEN>
Date: Sat, 18 Feb 2023 23:18:18 +0100
Message-ID: <875yby62j9.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.0 (/)
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 (-)


Ping :-)

Theodor Thornhill <theo@HIDDEN> writes:

> Hi Joao and others!
>
> As I mentioned in a different Eglot bug I believed there was a problem
> with sorting of candidates.  It seems there kinda is, but it's a little
> convoluted.  To test this you need to have a server that supplies
> snippets, or at least that sends some items with and without :sortText.
> However, the code is simple enough, so it should be enough to read it.
>
> So, what happens with completion in Eglot that I find confusing is that
> sometimes, candidates in the completion frameworks (company, corfu etc)
> display candidates in a seemingly random order compared to what the
> server sends.  In particular, the Jdtls server sends snippets without
> sorttext, which will be converted to the empty string in the sorter
> function.  That in turn will make all the snippets fall to the front of
> the list as (string-lessp "" "anything else") evaluates to t.  That
> means we ignore the sorts supplied by the server.  Because (string-lessp
> nil "anything else") evaluates to nil it will put them at the end of the
> list, which IMO makes more sense.
>
> In addition, the completion-category-defaults set by eglot uses flex, as
> you know, so the display-sort-function will sort them very hungrily,
> making them seem out of order.
>
> For example, if the candidates are (delete, deleteAll, deleteById) when
> buffer content is (| is point):
>
> ```
> something.del|
> ```
>
> completion will display them in this order: (deleteAll, deleteById,
> delete), which yet again "doesn't respect sort order".  The latter issue
> is fixed by setting
>
> (setq completion-category-overrides
>       '((eglot (styles basic partial-completion initials))))
>
> or something else, which works, but is very convoluted and really not
> documented anywhere, or did I miss it?
>
> The former issue is fixed in the supplied patch.  Do you agree with what
> I propose?  We could also default to something like :label or
> :insertText, but that would in some cases also likely conflict with what
> the server is expected to send.
>
> Theo




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#61532: 30.0.50; [PATCH]: Make completions without sortText fall to back of the list
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 19 Feb 2023 11:13:02 +0000
Resent-Message-ID: <handler.61532.B61532.1676805135838 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 61532
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Theodor Thornhill <theo@HIDDEN>
Cc: 61532 <at> debbugs.gnu.org
Received: via spool by 61532-submit <at> debbugs.gnu.org id=B61532.1676805135838
          (code B ref 61532); Sun, 19 Feb 2023 11:13:02 +0000
Received: (at 61532) by debbugs.gnu.org; 19 Feb 2023 11:12:15 +0000
Received: from localhost ([127.0.0.1]:45808 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pThc6-0000DS-V8
	for submit <at> debbugs.gnu.org; Sun, 19 Feb 2023 06:12:15 -0500
Received: from mail-ot1-f50.google.com ([209.85.210.50]:38649)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1pThc3-0000D8-Kr
 for 61532 <at> debbugs.gnu.org; Sun, 19 Feb 2023 06:12:13 -0500
Received: by mail-ot1-f50.google.com with SMTP id
 cy18-20020a056830699200b0068db1940216so69858otb.5
 for <61532 <at> debbugs.gnu.org>; Sun, 19 Feb 2023 03:12:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=1GqpXcUOmbktUv274c54JwcrCzOxvxs0M/1fFSKJ0yA=;
 b=VP1+t2Fn2wIM1/o93vBO1O7cUgJFxT/cl2kxLK0+OTxUTPEvSKBvNKU0IzYcD8CyER
 VOigeRYy++/lTT/WFq7cQzcoI2a3LKnagtyktWstLrsgeeZjcdo4NCxacWLYWzcCX6xs
 engqMim8KAJRIxzU3B6C/DSwRu3yFL3yyWOgwxpUhXQCDUabxbZxGGEwwjH/4DSLf0q+
 vCwQnB/qDzt/hdE9Lue8jzxobAsN8C4fQilzfuoMdTeFHebYee+jxYEg3LSV0OL3LODQ
 Pnu3VlQdCQOBvku3Y736gloIu3wQbK0DsJYQCJOSCz+3gAhfjSIDJCTefckgC1HRjyFs
 cHMw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=1GqpXcUOmbktUv274c54JwcrCzOxvxs0M/1fFSKJ0yA=;
 b=g2UM4bkvuwF6UHse7mHzDXPxty0b2iebnLUfYzA28niq6BIaHKCS6p2zczwS6vYoY/
 CxD+tIIzrsHC7DAdsFD6Ia5qVFYK0iANUFJyEyjd9HVFgGtdKH7naCD9kJicFnQ5jVMd
 DLLZnwbFksBxcgFm0dx0nfpCHiAhpJCFsbFTuRLimXJUCByi9O2TKaATrXp996FJjeez
 iiC0/5szCusLDfu3xdowJJcYipdKvTinmsaIRr54lRfoT7E5lKRCL5ucp8Rx+JyzxZ6X
 gvPtWp6UEBaZ4sBmK0AJM4oiuoON+/NSiWtnb1QGit53X7cSockpDQclzB0E8YFqgDBr
 TNHg==
X-Gm-Message-State: AO0yUKW1HkxFyffTW6q0CD2N0dJomsq6tbzpYUu90Jd2YDHDyU0h7iAF
 y0HNyE/RcO796DdJBaH1WYGm+jW6iZ5aSmdKZOxmcXGe
X-Google-Smtp-Source: AK7set+LMXcB+qvXhy2zkNMxhgHjlxNpZhpvtOSTB/zV/F+R6pfAn9rNbU4QQfiXxXzCQWpIpwZO/n9dJaXCxRoJdcg=
X-Received: by 2002:a05:6830:3091:b0:68b:e0dc:abc7 with SMTP id
 g17-20020a056830309100b0068be0dcabc7mr386610ots.4.1676805126008; Sun, 19 Feb
 2023 03:12:06 -0800 (PST)
MIME-Version: 1.0
References: <87ttzn6kxb.fsf@HIDDEN> <875yby62j9.fsf@HIDDEN>
In-Reply-To: <875yby62j9.fsf@HIDDEN>
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Date: Sun, 19 Feb 2023 11:13:46 +0000
Message-ID: <CALDnm51U+b25Q=zjhq-M0PS_y=GvzceVXBO8CiVQEPvVNcwy9Q@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000e4b42605f50b9d00"
X-Spam-Score: 0.0 (/)
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 (-)

--000000000000e4b42605f50b9d00
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, Feb 18, 2023 at 10:18 PM Theodor Thornhill <theo@HIDDEN>
wrote:

>
> Ping :-)


[Thanks for the ping. Without it, i would probably not be aware of the
message
which was primarily intented for me, since I'm not (at the present)
following the
bug tracker list.  Next time, you can add me to the special X-Debbugs-CC:
header]

To your patch, I think it is quite acceptable.  I've pushed it to emacs-29.

I'll keep the bug open, since there is also the second problem which I
still don't
quite understand, but it looks like a bug, too.  But I think I have enough
information
to investigate on my own for now.

Jo=C3=A3o

--000000000000e4b42605f50b9d00
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail=
_attr">On Sat, Feb 18, 2023 at 10:18 PM Theodor Thornhill &lt;<a href=3D"ma=
ilto:theo@HIDDEN">theo@HIDDEN</a>&gt; wrote:<br></div><blockquo=
te class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px =
solid rgb(204,204,204);padding-left:1ex"><br>
Ping :-)</blockquote></div><div><br></div><div>[Thanks for the ping. Withou=
t it, i would probably not be aware of the message <br></div><div>which was=
 primarily intented for me, since I&#39;m not (at the present) following th=
e <br></div><div>bug tracker list.=C2=A0 Next time, you can add me to the s=
pecial X-Debbugs-CC: header]</div><div><br></div><div>To your patch, I thin=
k it is quite acceptable.=C2=A0 I&#39;ve pushed it to emacs-29.</div><div><=
br></div><div>I&#39;ll keep the bug open, since there is also the second pr=
oblem which I still don&#39;t <br></div><div>quite understand, but it looks=
 like a bug, too.=C2=A0 But I think I have enough information</div><div>to =
investigate on my own for now.</div><div><br></div><div>Jo=C3=A3o<br></div>=
</div>

--000000000000e4b42605f50b9d00--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#61532: 30.0.50; [PATCH]: Make completions without sortText fall to back of the list
Resent-From: Theodor Thornhill <theo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 19 Feb 2023 16:09:02 +0000
Resent-Message-ID: <handler.61532.B61532.167682290914740 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 61532
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: 61532 <at> debbugs.gnu.org
Received: via spool by 61532-submit <at> debbugs.gnu.org id=B61532.167682290914740
          (code B ref 61532); Sun, 19 Feb 2023 16:09:02 +0000
Received: (at 61532) by debbugs.gnu.org; 19 Feb 2023 16:08:29 +0000
Received: from localhost ([127.0.0.1]:49539 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pTmEn-0003pf-8l
	for submit <at> debbugs.gnu.org; Sun, 19 Feb 2023 11:08:29 -0500
Received: from out2.migadu.com ([188.165.223.204]:33095)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <theo@HIDDEN>) id 1pTmEl-0003pX-UZ
 for 61532 <at> debbugs.gnu.org; Sun, 19 Feb 2023 11:08:28 -0500
Date: Sun, 19 Feb 2023 17:08:19 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no;
 s=key1; t=1676822906;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=IuNLa4du9oJTiHSOha7ftm4+vI26hYMJZ/93xszPs9s=;
 b=J+hZuMqojh3PGpFR3Ju9Kg7B9FwJhUcZYLQmWBnuH9QZtgcLy+ah7VBcYet2gz6qXfclK6
 FLc96EDLx/J/0yeXiiUF6IHkfmJU139s5HyPVZj/++RPVDJaSRbxgHK6QStmDXi68diVPx
 tlONTdo4RZqh1E9AD0zdUgpPKV3YobQfi+UP2S9qf95vm7qahImvHZXs+x3TBFelh6VUfz
 Cis7VFKb0LNnQgTI/g6K5I+51goIm7QD5ruTK/n9A2Lpf+kjV/F9cVT6EULisiBVU9f1HM
 8qFw2+hOzx3GPYyoWyvPmFUQMFOZGG/hWZ2FaYTTU6BbYhuBe18u+JU5fPYxJw==
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
From: Theodor Thornhill <theo@HIDDEN>
In-Reply-To: <CALDnm51U+b25Q=zjhq-M0PS_y=GvzceVXBO8CiVQEPvVNcwy9Q@HIDDEN>
References: <87ttzn6kxb.fsf@HIDDEN> <875yby62j9.fsf@HIDDEN>
 <CALDnm51U+b25Q=zjhq-M0PS_y=GvzceVXBO8CiVQEPvVNcwy9Q@HIDDEN>
Message-ID: <348D7924-284D-4D14-882E-02C8CAD7A925@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.0 (/)
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 19 February 2023 12:13:46 CET, "Jo=C3=A3o T=C3=A1vora" <joaotavora@gmai=
l=2Ecom> wrote:
>On Sat, Feb 18, 2023 at 10:18 PM Theodor Thornhill <theo@thornhill=2Eno>
>wrote:
>
>>
>> Ping :-)
>
>
>[Thanks for the ping=2E Without it, i would probably not be aware of the
>message
>which was primarily intented for me, since I'm not (at the present)
>following the
>bug tracker list=2E  Next time, you can add me to the special X-Debbugs-C=
C:
>header]

Pretty sure I did that, but it doesn't matter :)


>
>To your patch, I think it is quite acceptable=2E  I've pushed it to emacs=
-29=2E
>

Great news!

>I'll keep the bug open, since there is also the second problem which I
>still don't
>quite understand, but it looks like a bug, too=2E  But I think I have eno=
ugh
>information
>to investigate on my own for now=2E
>
>Jo=C3=A3o

I don't think it's a bug, really=2E Isn't it just the flex style greedines=
s? It feels like it tries to match the longest string possible alphabetical=
ly? It's just unintuitive because the json results doesn't match the output=
, and debugstepping over was very unhelpful=2E We could maybe just add some=
 docs explaining that eglot default, which for many really is an eglot hard=
-coding=2E

But not sure, and the workaround in the report works anyways :)

Theo




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#61532: 30.0.50; [PATCH]: Make completions without sortText fall to back of the list
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 19 Feb 2023 18:20:02 +0000
Resent-Message-ID: <handler.61532.B61532.167683076028714 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 61532
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Theodor Thornhill <theo@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,  Augusto Stoffel <arstoffel@HIDDEN>
Cc: 61532 <at> debbugs.gnu.org
Received: via spool by 61532-submit <at> debbugs.gnu.org id=B61532.167683076028714
          (code B ref 61532); Sun, 19 Feb 2023 18:20:02 +0000
Received: (at 61532) by debbugs.gnu.org; 19 Feb 2023 18:19:20 +0000
Received: from localhost ([127.0.0.1]:49629 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pToHQ-0007T4-4K
	for submit <at> debbugs.gnu.org; Sun, 19 Feb 2023 13:19:20 -0500
Received: from mail-oi1-f181.google.com ([209.85.167.181]:45986)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1pToHP-0007Sq-2C
 for 61532 <at> debbugs.gnu.org; Sun, 19 Feb 2023 13:19:19 -0500
Received: by mail-oi1-f181.google.com with SMTP id o4so1069546oik.12
 for <61532 <at> debbugs.gnu.org>; Sun, 19 Feb 2023 10:19:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=yuWAN8InVmnlyOLXGgFsx/KoDqP8HGiP2MuO7MBh0p4=;
 b=MLk1yZ2ELwlqAydg4WWTu78/aC0IOneAXzcoykLOfKaXtPDuJz8+N7yHv05jcu0JCI
 BrFhjwiDubDMTvwpBfI71MSPIDohu1fEw4oOMSv0ABGhZnN/7f5efTVJnBpNKxYwVazh
 gyu6H+904YQ+8uvKEze3W3fHks2r+VrknNBSNfxM8IozzhQKNYPvlcAIVeXuPwoGxla8
 eF96K0/zEtxujlCiuWFHqciONDOnuvA5Ux0qbUeUH0w1NPpJ+0VmKzr7p/PU/8koOsv1
 aEg1/vIZ9lUL8/0ESQTNmVn+HyozltNPeOgdDQcpEkUXmwJ5XCJTvt/Qle1F6P3Kk11v
 cJvw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=yuWAN8InVmnlyOLXGgFsx/KoDqP8HGiP2MuO7MBh0p4=;
 b=xq/VyvMNS0WPvZ7se+6U1okFPWCJeoK2hqJyJSSzizfoaWIJ9aSaKDO8y/AQfOvqzJ
 TzXASuGuas0yKxgfhVuIpkDdWV4MFP0s7awC+itKo+2pEKSEBCR9WqDERB0Ic8EAgzNc
 QtD/V1GWShU5H+Y2cRJqLQZ2+JO8E5ksnp6PO0lhcBzLMr14Bo1rVZbi6CNYE0EOzrzJ
 MpfWPTFrimhrbhxmgDkU5AMTWK7eYegw+fvp3U1gdmAe89Yrwfy1Xalv1aKWQBl8di9K
 WPoPZwtu8mTTVgpv6LD+hxRwHbhzQxBD8ENlB0mSkZnYCv7vhKTA97lDIc7/IC2L/yRh
 D2JQ==
X-Gm-Message-State: AO0yUKWkdi40CrOBBhNpuKdI9ax6/VLCkKV5r0DCtbdWvNxh1rbTdOVF
 iSKakYKCCwkoh9Epy8+QXLjKkJCakdTynCR9gUo=
X-Google-Smtp-Source: AK7set8pLyHJ8w060wsRuFCP+qUf0gIiiOifRWqmIWOsZ2pGrigZSdrEkf/MxtFt70W7o5uRluw1hbG6K+w+YJMUvtY=
X-Received: by 2002:a05:6808:128b:b0:37b:9a3:136f with SMTP id
 a11-20020a056808128b00b0037b09a3136fmr230891oiw.6.1676830753235; Sun, 19 Feb
 2023 10:19:13 -0800 (PST)
MIME-Version: 1.0
References: <87ttzn6kxb.fsf@HIDDEN> <875yby62j9.fsf@HIDDEN>
 <CALDnm51U+b25Q=zjhq-M0PS_y=GvzceVXBO8CiVQEPvVNcwy9Q@HIDDEN>
 <348D7924-284D-4D14-882E-02C8CAD7A925@HIDDEN>
In-Reply-To: <348D7924-284D-4D14-882E-02C8CAD7A925@HIDDEN>
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Date: Sun, 19 Feb 2023 18:19:02 +0000
Message-ID: <CALDnm50iKj5rtrfjE1yMyEuHJqt0xpZt-v_dirMZ3Fnqd=y=Ag@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000652ada05f511953d"
X-Spam-Score: 0.0 (/)
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 (-)

--000000000000652ada05f511953d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sun, Feb 19, 2023 at 4:08 PM Theodor Thornhill <theo@HIDDEN> wrote=
:
>
>
> >bug tracker list.  Next time, you can add me to the special X-Debbugs-CC=
:
> >header]
> Pretty sure I did that, but it doesn't matter :)

[ I didn't get the message. I went to look in the mbox file off Debbugs and
I did
find a 'X-Debbugs-Cc' header, but maybe it has to be 'X-Debbugs-CC'?]

> I don't think it's a bug, really. Isn't it just the flex style greediness=
?

The 'flex' completion style isn't really doing (or at shouldn't be doing)
what it does normally. Its purpose in Eglot is only to allow for flex-style
fontification of the pattern to happen. Nothing more, and that includes
no sorting.

That's because, contrary to the normal uses of flex, here it's the
server which does all the selection and the filtering for whatever
it thinks is a pattern.  It turns out that a very common style of filtering
among servers is akin to 'flex', so using flex on our side to "paint"
the pattern in the completion candidate is usually, though not always,
a good bet.  If the server happens to use 'prefix' ,then 'flex' will also
paint it correctly, in principle. This is of course presuming we guess
the filter pattern that the server used, which we're not guaranteed
to, but more or less always do by looking for a 'symbol' thing-at-point.

Anyway, flex shouldn't be doing any kind of completion sorting for
eglot-completion-at-point. So if it is doing that, it's IMO a bug (though
perhaps not a serious one, as it wouldn't be a very absurd sorting
anyway).

> It feels like it tries to match the longest string possible
alphabetically? It's
> just unintuitive because the json results doesn't match the output, and
> debug stepping over was very unhelpful. We could maybe just add
> some docs explaining that eglot default, which for many really is an
eglot
> hard-coding.

I hope I explained why it's there.  This is what I recall of it, though
I may be misremembering.  You could help improve the documentation
by confirming my recollection hypothesis and adding comments to the
code.

Anyway, this boils down to a limitation of LSP, that it doesn't report on
what
kind of matching style it uses for textDocument/completion.  At least it
used to be a limitation of LSP, maybe someone else has fixed it in the
meantime, or added something that we can use.

Jo=C3=A3o

PS: Added Stefan and Augusto to the discussion since I think they are
already familiar with this LSP/Emacs discrepancy regarding completion
systems and completion philosophy.

--000000000000652ada05f511953d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Sun, Feb 19, 2023 at 4:08 PM Theodor Thornhill &lt;<a h=
ref=3D"mailto:theo@HIDDEN">theo@HIDDEN</a>&gt; wrote:<br>&gt;<b=
r>&gt;<br>&gt; &gt;bug tracker list.=C2=A0 Next time, you can add me to the=
 special X-Debbugs-CC:<br>&gt; &gt;header]<br>&gt; Pretty sure I did that, =
but it doesn&#39;t matter :)<br><br>[ I didn&#39;t get the message. I went =
to look in the mbox file off Debbugs and I did<br>find a &#39;X-Debbugs-Cc&=
#39; header, but maybe it has to be &#39;X-Debbugs-CC&#39;?]<br><br>&gt; I =
don&#39;t think it&#39;s a bug, really. Isn&#39;t it just the flex style gr=
eediness?<br><br>The &#39;flex&#39; completion style isn&#39;t really doing=
 (or at shouldn&#39;t be doing)<br>what it does normally. Its purpose in Eg=
lot is only to allow for flex-style<br>fontification of the pattern to happ=
en. Nothing more, and that includes<div>no sorting.=C2=A0=C2=A0<div><br>Tha=
t&#39;s because, contrary to the normal uses of flex, here it&#39;s the<br>=
server which does all the selection and the filtering for whatever<br>it th=
inks is a pattern.=C2=A0 It turns out that a very common style of filtering=
<br>among servers is akin to &#39;flex&#39;, so using flex on our side to &=
quot;paint&quot;<br>the pattern in the completion candidate is usually, tho=
ugh not always,<br>a good bet.=C2=A0 If the server happens to use &#39;pref=
ix&#39; ,then &#39;flex&#39; will also</div><div>paint it correctly, in pri=
nciple. This is of course presuming we guess</div><div>the filter pattern t=
hat the server used, which we&#39;re not guaranteed</div><div>to, but more =
or less always do by looking for a &#39;symbol&#39; thing-at-point.</div><d=
iv><br>Anyway, flex shouldn&#39;t be doing any kind of completion sorting f=
or</div><div>eglot-completion-at-point. So if it is doing that, it&#39;s IM=
O a bug (though</div><div>perhaps not a serious one, as it wouldn&#39;t be =
a very absurd sorting=C2=A0</div><div>anyway).</div><div><br>&gt; It feels =
like it tries to match the longest string possible alphabetically? It&#39;s=
<div>&gt; just unintuitive because the json results doesn&#39;t match the o=
utput, and</div><div>&gt; debug stepping over was very unhelpful. We could =
maybe just add=C2=A0</div><div>&gt; some docs explaining that eglot default=
, which for=C2=A0many really is an eglot=C2=A0</div><div>&gt; hard-coding.<=
br><br>I hope I explained why it&#39;s there.=C2=A0 This is what I recall o=
f it, though</div><div>I may be misremembering.=C2=A0 You could help improv=
e the documentation</div><div>by confirming my recollection hypothesis and =
adding comments to the</div><div>code.</div><div><br></div><div>Anyway, thi=
s boils down to a limitation of LSP, that it doesn&#39;t report on what=C2=
=A0</div><div>kind of matching style it uses for textDocument/completion.=
=C2=A0 At least it<br>used to be a limitation of LSP, maybe someone else ha=
s fixed it in the=C2=A0</div><div>meantime, or added something that we can =
use.<br><br>Jo=C3=A3o</div><div><br></div><div>PS: Added Stefan and Augusto=
 to the discussion since I think they are=C2=A0</div><div>already familiar =
with this LSP/Emacs discrepancy regarding completion=C2=A0</div><div>system=
s and completion philosophy.</div></div></div></div>

--000000000000652ada05f511953d--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#61532: 30.0.50; [PATCH]: Make completions without sortText fall to back of the list
Resent-From: "Basil L. Contovounesios" <contovob@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 19 Feb 2023 18:44:01 +0000
Resent-Message-ID: <handler.61532.B61532.167683222031051 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 61532
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: 61532 <at> debbugs.gnu.org, Augusto Stoffel <arstoffel@HIDDEN>, Theodor Thornhill <theo@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 61532-submit <at> debbugs.gnu.org id=B61532.167683222031051
          (code B ref 61532); Sun, 19 Feb 2023 18:44:01 +0000
Received: (at 61532) by debbugs.gnu.org; 19 Feb 2023 18:43:40 +0000
Received: from localhost ([127.0.0.1]:49648 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pToey-00084l-7y
	for submit <at> debbugs.gnu.org; Sun, 19 Feb 2023 13:43:40 -0500
Received: from mail-wr1-f48.google.com ([209.85.221.48]:44921)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <contovob@HIDDEN>) id 1pToet-00084U-1t
 for 61532 <at> debbugs.gnu.org; Sun, 19 Feb 2023 13:43:39 -0500
Received: by mail-wr1-f48.google.com with SMTP id b10so716434wrx.11
 for <61532 <at> debbugs.gnu.org>; Sun, 19 Feb 2023 10:43:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=M7GL44w3Hy1/bFTbBi14nYB0YD+TasSGXIwXlsT4Pb4=;
 b=cifdEsTJzprycIDUU0rCurvmfj4HvsMndusLUs12i3yXodShLc9yqGAnXYehaRSt7P
 hz8wc0p4YIJHnl0Z23+QLHIuNec4eC70aMvhru1aIXn1C2XKL3FTTcyIV/Jtoto8Jnpg
 JCvrRPA9DljqW3ufCmj4jBXASGId6iSSAPyEvvY3nMCPasVsDcYFKFE9CV6vUSdmiouZ
 E+0mrwPSpG9yUJCvTg6muxlzsYIBOmkPiWYtQxA7pGYv8U8M5k2aKV3SEvYYdUXZbDUW
 XEKvzxYq5J/Hdxn24USXieC285kTmEnk+aq5yrkv1oj9E2JJczGEECDRCW4iYemkZfhO
 PEbw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=M7GL44w3Hy1/bFTbBi14nYB0YD+TasSGXIwXlsT4Pb4=;
 b=NxRBSZ4Qi+yUOrQq02dEYF2azJLFPL/JX0VtfmvDkbgFvxYkpcd8N+Exd6i4Q0jhKL
 V3vXgAG5Fojv0nkltQdAbRU+YjpWO+7cAOcwPy4WfwiuAqylJdcFNmRj2E2Dc/rofnYF
 azu+tOn4URWQOPoj+NxJZlsbQe4zpA1VZs2EBDiJpH6NAqjig+zqIot+SMhQzCKnTy8e
 P8IrttBO4DGJYUnrw2MhirhPY8QPAmOh6GXa/62QJlZaFtdrrr0oz6msCDkflE/CDtYo
 uR3evtiME3qMl8Yj1Jv7Y6c48erPZbxF6KxgTNxPegECtlg2oMljCayrgKYYVbyCL8ec
 RfDw==
X-Gm-Message-State: AO0yUKWOMsyeh8IsaFpjb+sCzQhB1vhyolL48KvxPhaH9hbAZfxa0Z3Q
 xv20R7vS6UBWOQC3p6WlN+JorA==
X-Google-Smtp-Source: AK7set9Tpl9IlBiiCqJnCblCuE4xjocrk7mRQtdBOIEXINpYJwcL0Ou1/DGgbQ5wC1l63zCQ5pKySA==
X-Received: by 2002:a05:6000:144e:b0:2c5:4ce5:2995 with SMTP id
 v14-20020a056000144e00b002c54ce52995mr1191787wrx.1.1676832208730; 
 Sun, 19 Feb 2023 10:43:28 -0800 (PST)
Received: from localhost ([109.78.154.153]) by smtp.gmail.com with ESMTPSA id
 f2-20020adffcc2000000b002c5691f13eesm10330620wrs.50.2023.02.19.10.43.27
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 19 Feb 2023 10:43:28 -0800 (PST)
From: "Basil L. Contovounesios" <contovob@HIDDEN>
In-Reply-To: <CALDnm50iKj5rtrfjE1yMyEuHJqt0xpZt-v_dirMZ3Fnqd=y=Ag@HIDDEN>
 ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Sun, 19 Feb 2023
 18:19:02 +0000")
References: <87ttzn6kxb.fsf@HIDDEN> <875yby62j9.fsf@HIDDEN>
 <CALDnm51U+b25Q=zjhq-M0PS_y=GvzceVXBO8CiVQEPvVNcwy9Q@HIDDEN>
 <348D7924-284D-4D14-882E-02C8CAD7A925@HIDDEN>
 <CALDnm50iKj5rtrfjE1yMyEuHJqt0xpZt-v_dirMZ3Fnqd=y=Ag@HIDDEN>
Date: Sun, 19 Feb 2023 18:43:26 +0000
Message-ID: <874jrhxzqp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
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 (-)

Jo=C3=A3o T=C3=A1vora [2023-02-19 18:19 +0000] wrote:

> On Sun, Feb 19, 2023 at 4:08 PM Theodor Thornhill <theo@HIDDEN> wro=
te:
>>
>> >bug tracker list.  Next time, you can add me to the special X-Debbugs-C=
C:
>> >header]
>> Pretty sure I did that, but it doesn't matter :)
> [ I didn't get the message. I went to look in the mbox file off Debbugs a=
nd I did
> find a 'X-Debbugs-Cc' header, but maybe it has to be 'X-Debbugs-CC'?]

I routinely use the former (I copy it out of admin/notes/bugtracker each
time, and ironically just opened this message of yours to copy your
email address for another report I'm about to send in ;).

--=20
Basil




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#61532: 30.0.50; [PATCH]: Make completions without sortText fall to back of the list
Resent-From: Theodor Thornhill <theo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 19 Feb 2023 18:49:01 +0000
Resent-Message-ID: <handler.61532.B61532.167683253831879 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 61532
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: "Basil L. Contovounesios" <contovob@HIDDEN>, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: 61532 <at> debbugs.gnu.org, Augusto Stoffel <arstoffel@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 61532-submit <at> debbugs.gnu.org id=B61532.167683253831879
          (code B ref 61532); Sun, 19 Feb 2023 18:49:01 +0000
Received: (at 61532) by debbugs.gnu.org; 19 Feb 2023 18:48:58 +0000
Received: from localhost ([127.0.0.1]:49660 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pTok5-0008I7-M7
	for submit <at> debbugs.gnu.org; Sun, 19 Feb 2023 13:48:57 -0500
Received: from out2.migadu.com ([188.165.223.204]:14026)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <theo@HIDDEN>) id 1pTok3-0008Hx-Kx
 for 61532 <at> debbugs.gnu.org; Sun, 19 Feb 2023 13:48:56 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no;
 s=key1; t=1676832531;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=t5RdrV4IYayRFT0jHlaQlv2/iDGfZXkhERgpBpB8uKc=;
 b=BCf7IQ3tXwILqwD83JMrIZWYokr4yQ/wFPRFKnPsMWTK/RbOIMqXS+3tJmHsyArXYLZa1+
 2XpYDBOBPkpRJ+V645bGqGbTyp2pogqhiTDCeeWBulOw1GSjIMjGEvb8pX+21dzjwJ+S2C
 l568iCE3BQtc2JUbmqUmueSG8ryVPkkCxfIO02gJ2qCl7weSRKboiMw2RcYhtuU5T1CBw1
 OfNmbBd6gFGQz3MS9UVDtKv9uSiVigIAVNnCVbH0PrqtqEJwG355Zv2LLZXUI0I6iNBNL2
 TmbM5MwHdVgxbJLcjddfkKbd8z8F2FtA1QI2L6Lr5ZvVqx2uXeKrHalQm0Neyw==
From: Theodor Thornhill <theo@HIDDEN>
In-Reply-To: <874jrhxzqp.fsf@HIDDEN>
References: <87ttzn6kxb.fsf@HIDDEN> <875yby62j9.fsf@HIDDEN>
 <CALDnm51U+b25Q=zjhq-M0PS_y=GvzceVXBO8CiVQEPvVNcwy9Q@HIDDEN>
 <348D7924-284D-4D14-882E-02C8CAD7A925@HIDDEN>
 <CALDnm50iKj5rtrfjE1yMyEuHJqt0xpZt-v_dirMZ3Fnqd=y=Ag@HIDDEN>
 <874jrhxzqp.fsf@HIDDEN>
Date: Sun, 19 Feb 2023 19:48:49 +0100
Message-ID: <87sff1ij8u.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.0 (/)
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 (-)

"Basil L. Contovounesios" <contovob@HIDDEN> writes:

> Jo=C3=A3o T=C3=A1vora [2023-02-19 18:19 +0000] wrote:
>
>> On Sun, Feb 19, 2023 at 4:08 PM Theodor Thornhill <theo@HIDDEN> wr=
ote:
>>>
>>> >bug tracker list.  Next time, you can add me to the special X-Debbugs-=
CC:
>>> >header]
>>> Pretty sure I did that, but it doesn't matter :)
>> [ I didn't get the message. I went to look in the mbox file off Debbugs =
and I did
>> find a 'X-Debbugs-Cc' header, but maybe it has to be 'X-Debbugs-CC'?]
>
> I routinely use the former (I copy it out of admin/notes/bugtracker each
> time, and ironically just opened this message of yours to copy your
> email address for another report I'm about to send in ;).
>
> --=20
> Basil

Yeah, that's strange.  I got this from the ack:


As you requested using X-Debbugs-CC, your message was also forwarded to
  joaotavora@HIDDEN
(after having been given a bug report number, if it did not have one).

When submitting the bug...

Wellwell.

Theo




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#61532: 30.0.50; [PATCH]: Make completions without sortText fall to back of the list
Resent-From: Theodor Thornhill <theo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 19 Feb 2023 18:53:01 +0000
Resent-Message-ID: <handler.61532.B61532.167683276732235 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 61532
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>, Stefan Monnier <monnier@HIDDEN>, Augusto Stoffel <arstoffel@HIDDEN>
Cc: 61532 <at> debbugs.gnu.org
Received: via spool by 61532-submit <at> debbugs.gnu.org id=B61532.167683276732235
          (code B ref 61532); Sun, 19 Feb 2023 18:53:01 +0000
Received: (at 61532) by debbugs.gnu.org; 19 Feb 2023 18:52:47 +0000
Received: from localhost ([127.0.0.1]:49665 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pTonn-0008No-An
	for submit <at> debbugs.gnu.org; Sun, 19 Feb 2023 13:52:47 -0500
Received: from out2.migadu.com ([188.165.223.204]:16360)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <theo@HIDDEN>) id 1pTonl-0008Ng-6Z
 for 61532 <at> debbugs.gnu.org; Sun, 19 Feb 2023 13:52:45 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no;
 s=key1; t=1676832764;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=dhsq5JBUafd5ieMHDABQgaQTocNMWCCQXDz2nzKSY2Y=;
 b=Mol0k4qtfi1G/e6RvYu4joOAhABn6fVUBiNFouCIVqj3JdH3CYTU3UZLYEmoVZ50AnpQGR
 dyZi6GIUC7mNGE8GOU1GOzY+GtW60q86Dv3MBIvfmydleyqOH7R1nb0C5i6l0zEd6nqRAN
 6TDr/aPcTQkDZeJrZ3LIVqdpHfe5uWavh1R3BN+9rIu+3Xi3/mavAjWuM5e56PoFyW9kKe
 V6AXsaugpneWlRFP9WIbMNPo+kENWMwAcENHz6v7ivwNfFE8caLZLK6a7/VeB7JyFxSbhx
 xNTc2niEa7JGoSKjohztjFSTWaADQppK770rQc8ndwUgcm2xDJjq45WCjeuqug==
From: Theodor Thornhill <theo@HIDDEN>
In-Reply-To: <CALDnm50iKj5rtrfjE1yMyEuHJqt0xpZt-v_dirMZ3Fnqd=y=Ag@HIDDEN>
References: <87ttzn6kxb.fsf@HIDDEN> <875yby62j9.fsf@HIDDEN>
 <CALDnm51U+b25Q=zjhq-M0PS_y=GvzceVXBO8CiVQEPvVNcwy9Q@HIDDEN>
 <348D7924-284D-4D14-882E-02C8CAD7A925@HIDDEN>
 <CALDnm50iKj5rtrfjE1yMyEuHJqt0xpZt-v_dirMZ3Fnqd=y=Ag@HIDDEN>
Date: Sun, 19 Feb 2023 19:52:43 +0100
Message-ID: <87pma5ij2c.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.0 (/)
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 (-)

Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes:

> On Sun, Feb 19, 2023 at 4:08 PM Theodor Thornhill <theo@HIDDEN> wro=
te:
>>
>>
>> >bug tracker list.  Next time, you can add me to the special X-Debbugs-C=
C:
>> >header]
>> Pretty sure I did that, but it doesn't matter :)
>
> [ I didn't get the message. I went to look in the mbox file off Debbugs a=
nd
> I did
> find a 'X-Debbugs-Cc' header, but maybe it has to be 'X-Debbugs-CC'?]
>
>> I don't think it's a bug, really. Isn't it just the flex style greedines=
s?
>
> The 'flex' completion style isn't really doing (or at shouldn't be doing)
> what it does normally. Its purpose in Eglot is only to allow for flex-sty=
le
> fontification of the pattern to happen. Nothing more, and that includes
> no sorting.
>
> That's because, contrary to the normal uses of flex, here it's the
> server which does all the selection and the filtering for whatever
> it thinks is a pattern.  It turns out that a very common style of filteri=
ng
> among servers is akin to 'flex', so using flex on our side to "paint"
> the pattern in the completion candidate is usually, though not always,
> a good bet.  If the server happens to use 'prefix' ,then 'flex' will also
> paint it correctly, in principle. This is of course presuming we guess
> the filter pattern that the server used, which we're not guaranteed
> to, but more or less always do by looking for a 'symbol' thing-at-point.
>
> Anyway, flex shouldn't be doing any kind of completion sorting for
> eglot-completion-at-point. So if it is doing that, it's IMO a bug (though
> perhaps not a serious one, as it wouldn't be a very absurd sorting
> anyway).
>

I spent some time trying to understand what was happening inside this
function, which seems to sort, and is triggered upon completion.  Maybe
that's a clue?  I have no idea, honestly, but I remember getting
different results when changing > to < in the middle of it:

```

(defun completion--flex-adjust-metadata (metadata)
  "If `flex' is actually doing filtering, adjust sorting."
  (let ((flex-is-filtering-p
         ;; JT@2019-12-23: FIXME: this is kinda wrong.  What we need
         ;; to test here is "some input that actually leads/led to
         ;; flex filtering", not "something after the minibuffer
         ;; prompt".  E.g. The latter is always true for file
         ;; searches, meaning we'll be doing extra work when we
         ;; needn't.
         (or (not (window-minibuffer-p))
             (> (point-max) (minibuffer-prompt-end))))
        (existing-dsf
         (completion-metadata-get metadata 'display-sort-function))
        (existing-csf
         (completion-metadata-get metadata 'cycle-sort-function)))
    (cl-flet
        ((compose-flex-sort-fn
          (existing-sort-fn) ; wish `cl-flet' had proper indentation...
          (lambda (completions)
            (sort
             (funcall existing-sort-fn completions)
             (lambda (c1 c2)
               (let ((s1 (get-text-property 0 'completion-score c1))
                     (s2 (get-text-property 0 'completion-score c2)))
                 (> (or s1 0) (or s2 0)))))))) ;; This line here
      `(metadata
        ,@(and flex-is-filtering-p
               `((display-sort-function
                  . ,(compose-flex-sort-fn (or existing-dsf #'identity)))))
        ,@(and flex-is-filtering-p
               `((cycle-sort-function
                  . ,(compose-flex-sort-fn (or existing-csf #'identity)))))
        ,@(cdr metadata)))))
```

>> It feels like it tries to match the longest string possible
> alphabetically? It's
>> just unintuitive because the json results doesn't match the output, and
>> debug stepping over was very unhelpful. We could maybe just add
>> some docs explaining that eglot default, which for many really is an
> eglot
>> hard-coding.
>
> I hope I explained why it's there.  This is what I recall of it, though
> I may be misremembering.  You could help improve the documentation
> by confirming my recollection hypothesis and adding comments to the
> code.
>
> Anyway, this boils down to a limitation of LSP, that it doesn't report on
> what
> kind of matching style it uses for textDocument/completion.  At least it
> used to be a limitation of LSP, maybe someone else has fixed it in the
> meantime, or added something that we can use.
>
> Jo=C3=A3o

Yeah, that makes sense.

>
> PS: Added Stefan and Augusto to the discussion since I think they are
> already familiar with this LSP/Emacs discrepancy regarding completion
> systems and completion philosophy.

:thumbsup:

Theo




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#61532: 30.0.50; [PATCH]: Make completions without sortText fall to back of the list
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 19 Feb 2023 22:48:02 +0000
Resent-Message-ID: <handler.61532.B61532.167684687728726 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 61532
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Theodor Thornhill <theo@HIDDEN>
Cc: "Basil L. Contovounesios" <contovob@HIDDEN>, 61532 <at> debbugs.gnu.org, Augusto Stoffel <arstoffel@HIDDEN>, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Received: via spool by 61532-submit <at> debbugs.gnu.org id=B61532.167684687728726
          (code B ref 61532); Sun, 19 Feb 2023 22:48:02 +0000
Received: (at 61532) by debbugs.gnu.org; 19 Feb 2023 22:47:57 +0000
Received: from localhost ([127.0.0.1]:49883 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pTsTM-0007TE-S5
	for submit <at> debbugs.gnu.org; Sun, 19 Feb 2023 17:47:57 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:60043)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1pTsTL-0007SG-KP
 for 61532 <at> debbugs.gnu.org; Sun, 19 Feb 2023 17:47:56 -0500
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A5F3D100099;
 Sun, 19 Feb 2023 17:47:49 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4E49D100048;
 Sun, 19 Feb 2023 17:47:48 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1676846868;
 bh=bMWN9OYpELvCYNo3Fazv2yXSVQbk08PX2JXbOSjQ6os=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=YFiArats/Y5y6tLLyOpw4dBTAisFDgEWlFii0QsWWaEFx93DIWwqcqjMBM0pcIer9
 QtSSFASZwwvHDTSTe159bYmHVj6KMsHvrURNeIbNmM8CL5f6QTbQ5SuYKHNITRe0Ay
 xpqEiXsDv+hARQjYT0zco1QimDKLNKkAm/W/Vgp4aTuCj37MW/QFspCvL3QbpVqIYU
 mYWOEeZO9u2HDx4HVW8EljGK0dRk+wIEZBXF/xvjY2upWncy/D6IpQ6Ppjj0lu+YfV
 sx/y+Wl00UYASsMAQ9235oex9AWdcUrwHgcCRsIxeZ6fqdBHJAwkMNkVW9HcHa44Ol
 Y+dYR2/LDg4og==
Received: from pastel (unknown [216.154.34.24])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1D3A7123200;
 Sun, 19 Feb 2023 17:47:48 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <87sff1ij8u.fsf@HIDDEN> (Theodor Thornhill's message of
 "Sun, 19 Feb 2023 19:48:49 +0100")
Message-ID: <jwv8rgtqnn1.fsf-monnier+emacs@HIDDEN>
References: <87ttzn6kxb.fsf@HIDDEN> <875yby62j9.fsf@HIDDEN>
 <CALDnm51U+b25Q=zjhq-M0PS_y=GvzceVXBO8CiVQEPvVNcwy9Q@HIDDEN>
 <348D7924-284D-4D14-882E-02C8CAD7A925@HIDDEN>
 <CALDnm50iKj5rtrfjE1yMyEuHJqt0xpZt-v_dirMZ3Fnqd=y=Ag@HIDDEN>
 <874jrhxzqp.fsf@HIDDEN> <87sff1ij8u.fsf@HIDDEN>
Date: Sun, 19 Feb 2023 17:47:47 -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.092 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-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 (---)

> Yeah, that's strange.  I got this from the ack:
>
> As you requested using X-Debbugs-CC, your message was also forwarded to
>   joaotavora@HIDDEN
> (after having been given a bug report number, if it did not have one).
>
> When submitting the bug...
>
> Wellwell.

It may simply be Gmail being Gmail (i.e. rejecting email that's not
"direct from a Gmail-like service provider").


        Stefan





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#61532: 30.0.50; [PATCH]: Make completions without sortText fall to back of the list
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 19 Feb 2023 22:57:01 +0000
Resent-Message-ID: <handler.61532.B61532.167684737629737 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 61532
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: 61532 <at> debbugs.gnu.org, Augusto Stoffel <arstoffel@HIDDEN>, Theodor Thornhill <theo@HIDDEN>
Received: via spool by 61532-submit <at> debbugs.gnu.org id=B61532.167684737629737
          (code B ref 61532); Sun, 19 Feb 2023 22:57:01 +0000
Received: (at 61532) by debbugs.gnu.org; 19 Feb 2023 22:56:16 +0000
Received: from localhost ([127.0.0.1]:49905 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pTsbP-0007jZ-Ug
	for submit <at> debbugs.gnu.org; Sun, 19 Feb 2023 17:56:16 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47367)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1pTsbO-0007jK-DZ
 for 61532 <at> debbugs.gnu.org; Sun, 19 Feb 2023 17:56:14 -0500
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E5BFA80800;
 Sun, 19 Feb 2023 17:56:08 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 95253805B7;
 Sun, 19 Feb 2023 17:56:07 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1676847367;
 bh=3xVolDwkUrXVUD3/uB9Yk/i1/ZbAo2INkkRnbi1vdbM=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=CliLhXvNEk1g07W0cU42ftkLgmXiBReZ+e6eeOX2YsBow4hu5kNkuiNgcdbjQ7HBG
 Sh+e1OgWPMgaJswzu0AQC1G3zkj+th90goYvAn2pUUfMevptjEhXjH3VzlMGbkf2Zy
 dHZZKLh6d/iZObbICf6Mnt1gTAaJvYOYa+SJyJEOvvTno1d45vi4A1Xn32qnae6PKD
 F+DUK0/4M9sa8qVmtE6u8pp+SAIfE/H7moAK01ojK7rF2pre2H10FS8HBJkAehi/iY
 wSSz+w+k+w/n5n0A+Waebei39vDts35y5fvTRrAdiMcIH5AXDgxCPewdllMOUGpVa8
 +ecdB/tdIYBZg==
Received: from pastel (unknown [216.154.34.24])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5C32B12321C;
 Sun, 19 Feb 2023 17:56:07 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <CALDnm50iKj5rtrfjE1yMyEuHJqt0xpZt-v_dirMZ3Fnqd=y=Ag@HIDDEN>
 ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Sun, 19 Feb 2023
 18:19:02 +0000")
Message-ID: <jwv3571qni7.fsf-monnier+emacs@HIDDEN>
References: <87ttzn6kxb.fsf@HIDDEN> <875yby62j9.fsf@HIDDEN>
 <CALDnm51U+b25Q=zjhq-M0PS_y=GvzceVXBO8CiVQEPvVNcwy9Q@HIDDEN>
 <348D7924-284D-4D14-882E-02C8CAD7A925@HIDDEN>
 <CALDnm50iKj5rtrfjE1yMyEuHJqt0xpZt-v_dirMZ3Fnqd=y=Ag@HIDDEN>
Date: Sun, 19 Feb 2023 17:56:06 -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.138 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-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 (---)

> Anyway, this boils down to a limitation of LSP, that it doesn't report on
> what kind of matching style it uses for textDocument/completion.

It's not just "matching style".  It's that it's designed under the
premise that all the control is on the LSP server side, and the client
(editor) side just provides a "dumb UI".

A better API is probably harder to design (e.g. you need to define what
is a "matching style", for one), admittedly.

> At least it used to be a limitation of LSP, maybe someone else has
> fixed it in the meantime, or added something that we can use.

Not that I know.  But I think if we want that to happen, we need to move
out of our comfort zone and start participating in discussions over in
VScode land where the decisions are made :-(


        Stefan






Last modified: Sun, 19 Feb 2023 23:00:02 UTC

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