From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#54473: 28.0.91; [PATCH] Eldoc: Handle invisible text when truncating strings Date: Sun, 20 Mar 2022 14:03:16 +0000 Message-ID: References: <87o8203k0v.fsf@gmail.com> <838rt4g28v.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007fbdaf05daa6d455" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33455"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Augusto Stoffel , 54473@debbugs.gnu.org, Andrii Kolomoiets To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 20 15:03:16 2022 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 1nVw9L-0008WG-3Y for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Mar 2022 15:03:15 +0100 Original-Received: from localhost ([::1]:32980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVw9J-0006dx-RF for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Mar 2022 10:03:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVw98-0006dp-Qq for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2022 10:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40988) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVw98-0008GV-I4 for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2022 10:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nVw98-0000fZ-FB for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2022 10:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Mar 2022 14:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54473 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 54473-submit@debbugs.gnu.org id=B54473.16477849562542 (code B ref 54473); Sun, 20 Mar 2022 14:03:02 +0000 Original-Received: (at 54473) by debbugs.gnu.org; 20 Mar 2022 14:02:36 +0000 Original-Received: from localhost ([127.0.0.1]:34885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVw8h-0000ev-Og for submit@debbugs.gnu.org; Sun, 20 Mar 2022 10:02:36 -0400 Original-Received: from mail-ot1-f45.google.com ([209.85.210.45]:37738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVw8f-0000ej-QK for 54473@debbugs.gnu.org; Sun, 20 Mar 2022 10:02:34 -0400 Original-Received: by mail-ot1-f45.google.com with SMTP id k25-20020a056830151900b005b25d8588dbso8932486otp.4 for <54473@debbugs.gnu.org>; Sun, 20 Mar 2022 07:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RH1SMjG6f0VS9BdcnUlS1F6Gj6CEerq6EHdOT/ky58Y=; b=E4Oi/oNAQS90EAQ4gK6t0gnyV2fkSLu9bk7LDVYTNeIZ4STYGzL59d9w6A6AHgBrwQ 844SJFtMyoWOd/D5kz3k2njQBpc0pNW0gExGk0rovxAxusJ3ylHgouLt/Qesx57lx+Hb O+7dRjzdBm89RHvOMjPeu9pyBiufTuAfgYk3ePDPTDHac67egrqbqWnX6R0FalBi5NnA jeMNsdBmL23Om1n1oer1YlDLrggnvRFUtJ3ZPxCvYzkls8Ti5zuXq6GkByaiWDKXL1t5 /irEGg8dwoHEt3ghIvRNdjBjnywmlTJnZ0H5xfGehQo/a1K3GMtMap0OLAcCgZoRBAeO NjDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RH1SMjG6f0VS9BdcnUlS1F6Gj6CEerq6EHdOT/ky58Y=; b=uUj0uh9Vdq/yZBdVtXYJ4m1k8lHxw+DORQqMT9+hD6NqZS9Bn0S4A+QLZbZ5IneuVA X5UjMavVACUjOqi45RtLz/FEVSm0wGVakB9scfZfZKzi7h89iI9TP3syC7kKT3rY8UZ5 EO2Itenh+mXe5A8eFehzJI5OxZ7s8BTzAohCPwT+69F6+4akbBgcJQDMvIIJD6czrhon ExKXAU5Y2cKLK+LUyQGF8oeA4iDQRr8Z6bG8BOIqM+9ViZoiHiTflqT0QDKrZXHCQhbg OmOd+aS953Pveg8+KcgOSdbjZi0ty25zlgVzTGdKFmpuYIFsyRHPiz9OqtnCfUC58CPE ayFA== X-Gm-Message-State: AOAM530iJAodCOwmLzGINci293BgO7vsq6IyOe/ana1F5lNTjEIzcprW xqotEjjj9SjKFTpqGyjZTsXh6SxHFOqqnnGzTkU= X-Google-Smtp-Source: ABdhPJwK0fI0Lk+adb+KQoWbeQ9JChMhQwhcQQwjK5udaTTJjqztGI/fZP8WBCyK2JnZAWHv6O7Sn2NMWYsG2ewL1Dw= X-Received: by 2002:a05:6830:2714:b0:5c9:7a58:4325 with SMTP id j20-20020a056830271400b005c97a584325mr6099809otu.317.1647784948119; Sun, 20 Mar 2022 07:02:28 -0700 (PDT) In-Reply-To: <838rt4g28v.fsf@gnu.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" Xref: news.gmane.io gmane.emacs.bugs:228623 Archived-At: --0000000000007fbdaf05daa6d455 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Mar 20, 2022 at 1:52 PM Eli Zaretskii wrote: > > From: Augusto Stoffel > > Date: Sun, 20 Mar 2022 13:06:56 +0100 > > Cc: Jo=C3=A3o T=C3=A1vora , > > andreyk.mad@gmail.com > > > > This should solve the Eglot-related problem described in this Github > comment: > > > > https://github.com/joaotavora/eglot/issues/865#issuecomment-1065565845 > > If this is proposed for the release branch, then can you tell more? > The discussion to which you pointed seems to be caused by some recent > change to Eglot that you installed several days ago, so how does it > affect the current pretest of Emacs 28? > > I need to understand this to decide whether to consider the change for > the release branch. > Eglot, the Eldoc user, now simply doesn't strip _any_ properties from the text it sends Eldoc. I think is a conceptually correct change to Eglot. It's just that Eldoc just doesn't have a way to deal with that yet. If the patch is tested correctly, it is effectively fixing a bug in eldoc.el, whose current formatting/display code is oblivious to invisible text when calculating how much actual (read visual) free space it has in the echo area. And, presumably, this patch fixes that shortcoming. However, to err on the safe side, I'd say don't push it to the release branch. Eldoc is a "core ELPA package" so it can be distributed to the soon-to-be 28 release, by simply bumping the ELPA package version and then asking for users to update their packages. This is how bugs in flymake.el, eldoc.el, project.el have been fixed recently: no need to wait for an Emacs release. Maybe Augusto can fill in any details, if I haven't been clear. Jo=C3=A3o --0000000000007fbdaf05daa6d455 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Mar 20, 2022 at 1:52 PM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Augusto Stoffel <arstoffel@gmail.com>
> Date: Sun, 20 Mar 2022 13:06:56 +0100
> Cc: Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com>,
>=C2=A0 andre= yk.mad@gmail.com
>
> This should solve the Eglot-related problem described in this Github c= omment:
>
> https://github.com/joaota= vora/eglot/issues/865#issuecomment-1065565845

If this is proposed for the release branch, then can you tell more?
The discussion to which you pointed seems to be caused by some recent
change to Eglot that you installed several days ago, so how does it
affect the current pretest of Emacs 28?

I need to understand this to decide whether to consider the change for
the release branch.

Eglot, the Eld= oc user, now simply doesn't strip _any_ properties from the text
<= div>it sends Eldoc.=C2=A0 I think is a conceptually correct change to Eglot= . It's just that
Eldoc just doesn't have a way to deal wi= th that yet.

If the patch is tested correctly= , it is effectively fixing a bug in eldoc.el,
whose current forma= tting/display code is oblivious to invisible text when
calcu= lating how much actual (read visual) free space it has in the echo area.=C2= =A0
And, presumably, this patch fixes that shortcoming.

However, to err on the safe side, I'd = say don't push it to the release branch. Eldoc
is a "cor= e ELPA package" so it can be distributed to the soon-to-be 28 release,=
by simply bumping the ELPA package version and then asking for u= sers
to update their packages.=C2=A0 This is how bugs in flymake.= el, eldoc.el, project.el
have been fixed recently: no need to wai= t for an Emacs release.

Maybe Augus= to can fill in any details, if I haven't been clear.

Jo=C3=A3o
--0000000000007fbdaf05daa6d455--