From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#40529: 26.3; global-display-line-numbers-mode and flymake-show-diagnostics-buffer error Date: Sun, 12 Apr 2020 15:13:35 +0100 Message-ID: References: <83v9m7n98j.fsf@gnu.org> <83r1wvmt7k.fsf@gnu.org> <83ftdbmjan.fsf@gnu.org> <837dyklszu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000001e5d0005a3189351" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="94479"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40529@debbugs.gnu.org, Aidan Beggs To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 12 16:14:11 2020 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 1jNdND-000OSv-D3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Apr 2020 16:14:11 +0200 Original-Received: from localhost ([::1]:33828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNdNC-0004Pr-Fn for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Apr 2020 10:14:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32836) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNdN5-0004Pj-0z for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 10:14:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNdN3-0002zj-RM for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 10:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47076) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNdN3-0002zf-Oz for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 10:14:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jNdN3-0001Ws-Lg for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 10:14:01 -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, 12 Apr 2020 14:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40529 X-GNU-PR-Package: emacs Original-Received: via spool by 40529-submit@debbugs.gnu.org id=B40529.15867008345857 (code B ref 40529); Sun, 12 Apr 2020 14:14:01 +0000 Original-Received: (at 40529) by debbugs.gnu.org; 12 Apr 2020 14:13:54 +0000 Original-Received: from localhost ([127.0.0.1]:58622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jNdMv-0001WP-Hs for submit@debbugs.gnu.org; Sun, 12 Apr 2020 10:13:53 -0400 Original-Received: from mail-il1-f181.google.com ([209.85.166.181]:36906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jNdMt-0001WC-T1 for 40529@debbugs.gnu.org; Sun, 12 Apr 2020 10:13:52 -0400 Original-Received: by mail-il1-f181.google.com with SMTP id e4so4076143ils.4 for <40529@debbugs.gnu.org>; Sun, 12 Apr 2020 07:13:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TZE5SI50vKTy2HVa/+mBZxn8q8/vawTpbXMV9orm8dk=; b=gyHmUTO2TqgMMqBifgubiNxmU5exbU3JBtO02s80Zp0++OMpTHjCz2S27qrmfw6nQU 4m48Vnm0m0QxlLl7zKKt7eguWVofX0VCmuno4JqhNLRuM/JC+bbGbpUz+mfLm/HaBElH S5r1byZB6tDT6cSKGf7LeKfPgsRvhCFkoF7ybrdac1dEON+5wbnzxsaUuZNGv35nlsau nfMfmzourqXLazOpz6AdSxX5XlNfP9HzY6R6bxvg150rib4qtqplVk7AQY8mfzAmuvCk 87ohuXfHk49iju16R1mgyt5HMFHOtLuapaokhw2Tl3U+bBo8Z/scNEhElFdhgzqsSngl TJKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TZE5SI50vKTy2HVa/+mBZxn8q8/vawTpbXMV9orm8dk=; b=TJwFf1XAbME7SUjioNqMoQzsS6m6IChihH+MAOqNjwvhMd2emfhgPxlXwPxUXzLbRB eJUhRUtej+jIApB/vMreUG1TEe6P1hlt8l/Fr50g4/StN02gUzDN70OVr5wLd5akZyUX tpDb2QbG7YHrvHZpD4kYY4YciD5X1SP2hsPIyOhdKn+OfAbkK2uO0BcHAIbhi38W8PHw XQ+YCmNpA640EuwAaterhB3FtdM0dJSou463IK9D+V8XUF3BZM/RphyJaA9PnO5EwQRW VAPfX3FwBbXgEC0AeBgI+YbCG+5IlD/bIvjdIR1jSbJAx5ljc0K4JcEHBk56DCRFRX9g qtpw== X-Gm-Message-State: AGi0PubLkOUGfRht4Ocot1GGkBfGoCms4t8/XWxdd1HeAFbXClEk5HKW fQ22ZmkTT6bOUdNe2Nwzf3x8IMQDGu1QBJqJzGA= X-Google-Smtp-Source: APiQypJz2tlaLsL+xkFPqlLnKBQL5Nk6v6qIUM76ml7ALUTkXxtIhSj2UALdsUKTwZE4O23dSynHxnxq4GgKpOTaTv0= X-Received: by 2002:a92:ce8b:: with SMTP id r11mr13328061ilo.199.1586700826335; Sun, 12 Apr 2020 07:13:46 -0700 (PDT) In-Reply-To: <837dyklszu.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:178248 Archived-At: --0000000000001e5d0005a3189351 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Apr 12, 2020 at 2:43 PM Eli Zaretskii wrote: > > From: Jo=C3=A3o T=C3=A1vora > > Date: Sun, 12 Apr 2020 13:22:34 +0100 > > Cc: Aidan Beggs , 40529@debbugs.gnu.org > > > > But after some analysis, I think it is tabulated-list-mode, or rather > > its recent adaptation to display-line-numbers-mode, which is in the > > wrong here. It used to be that using a mode derived from > > tabulated-list-mode didn't immediately force a request for refreshing > its > > rows. After display-line-numbers-mode came along, that ceased to be > > true in some situations. > > > > Reading the special code in tabulated-list-mode concerned with line > > numbers, the latter seem to affect only the header line, not the > > buffer's contents. So this seems to be the correct fix: > > I don't remember all the callers/users of tabulated-list-mode, so I > cannot be sure your patch is correct. (Why only update the header? > the columns below the header need to be realigned as well, no? See > tabulated-line-print-col, for example.) > I don't know what you are calling attention to in that function. Can you be more specific? Regarding your question (why only the header?), well that seems to be the only place where a line-number _isn't_ printed, so it needs the additional indentation. I think that also explains why you already _only_ update only the header in pre-redisplay-functions and window-scroll-functions. Have a look at tabulated-list-watch-line-number-width and tabulated-list-window-scroll-function. All they do is update the header, not the contents. I'm just extending that criteria to the turn-on/off of d-l-n-m. Furthermore I think it is a regression in itself to deliver an Emacs 27 with this changed tabulated-list-mode bootstrapping behaviour. However, if you are convinced it's TRT, I'm okay with doing that on > master. On the release branch, please try to find a solution that is > not in tabulated-list-mode, but in Flymake. > I tried around a bit and couldn't come up with anything that I know is safe, short of some very ugly vapourware hacks. Not saying that it doesn't exist, but I started searching in tabulated-list-mode and I do think that's the best place to fix it. Jo=C3=A3o --0000000000001e5d0005a3189351 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Apr 12, 2020 at 2:43 PM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Jo=C3= =A3o T=C3=A1vora <joaotavora@gmail.com>
> Date: Sun, 12 Apr 2020 13:22:34 +0100
> Cc: Aidan Beggs <nadiasggeb001@gmail.com>, 40529@debbugs.gnu.org
>
> But after some analysis, I think it is tabulated-list-mode, or rather<= br> > its recent adaptation to display-line-numbers-mode, which is in the > wrong here.=C2=A0 It used to be that using a mode derived from
> tabulated-list-mode didn't immediately force a request for refresh= ing its
> rows.=C2=A0 After display-line-numbers-mode came along, that ceased to= be
> true in some situations.
>
> Reading the special code in tabulated-list-mode concerned with line > numbers, the latter seem to affect only the header line, not the
> buffer's contents.=C2=A0 So this seems to be the correct fix:

I don't remember all the callers/users of tabulated-list-mode, so I
cannot be sure your patch is correct.=C2=A0 (Why only update the header? the columns below the header need to be realigned as well, no?=C2=A0 See tabulated-line-print-col, for example.)

I don't know what you are calling attention to in that function. Can <= br>
you be more specific?

Regarding your= question (why only the header?), well that seems
to be the = only place where a line-number _isn't_ printed, so
it ne= eds the additional indentation.=C2=A0 I think that also explains
= why you already _only_ update only the header in pre-redisplay-functions
and window-scroll-functions.=C2=A0 Have a look at
tabula= ted-list-watch-line-number-width and
tabulated-list-window-s= croll-function. All they do is update the
header, not the conten= ts.=C2=A0

I'm just extending that criteri= a to the turn-on/off of d-l-n-m.

Furthermore I thi= nk it is a regression in itself to deliver an Emacs
27 with = this changed tabulated-list-mode bootstrapping behaviour.

However, if you are co= nvinced it's TRT, I'm okay with doing that on
master.=C2=A0 On the release branch, please try to find a solution that is<= br> not in tabulated-list-mode, but in Flymake.

=
I tried around a bit and couldn't come up with anything that I kno= w is
safe, short of some very ugly vapourware hacks. Not say= ing that it
doesn't exist, but I started searching in ta= bulated-list-mode and
I do think that's the best place t= o fix it.

Jo=C3=A3o

<= br>

--0000000000001e5d0005a3189351--