all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 40529@debbugs.gnu.org, Aidan Beggs <nadiasggeb001@gmail.com>
Subject: bug#40529: 26.3; global-display-line-numbers-mode and flymake-show-diagnostics-buffer error
Date: Sun, 12 Apr 2020 17:58:16 +0100	[thread overview]
Message-ID: <CALDnm52UAeXwT58vHMDy0FeqZJXFB3KKP1EEiUsue6yAC1Sa0g@mail.gmail.com> (raw)
In-Reply-To: <833698lq9o.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2481 bytes --]

On Sun, Apr 12, 2020 at 3:42 PM Eli Zaretskii <eliz@gnu.org> wrote:

> AFAIR, the :align-to display spec needs to be recalculated when line
> numbers are turned on or off.

I don't know what that is, but if it involves propertizing
the rows themselves, there's possiblya bug when you gain
or lose a character when scrolling. As evidenced by the fact
that the hooks I showed you also only recalculate the header.

> The code was introduced to solve real problems in some users of
> tabulated-list-mode (and we have quite a few of them in core alone).

Do you have reason to believe these would resurface if you
did my change? What are these "real problems"?  Can
references to them be found in the git log?

> Maybe so, but that code endured many months on the master branch and
> then in the pretest, so we have some reason to believe it is correct.

I don't think it's correct to ask the buffer's row-providing
backend to produce rows just you turned on the mode.
Certainly I can't think how it can be correct to do that depending
on whether or not a totally unrelated customization related to
presentation is enabled or not.

If you disagree, I would at least indicate this possibility in
the manual before releasing.

The manual says, in
https://www.gnu.org/software/emacs/manual/html_node/elisp/Tabulated-List-Mode.html

   The listing command should create or switch to a
   buffer, turn on the derived mode, specify the tabulated data,
   and finally call tabulated-list-print to populate the buffer.

Maybe you should add something explaining that sometimes
populating happens automatically, sometimes not.  If gathering
the data is expensive, the client code can be doing it twice,
a bad thing IMO.

But even conceptually and intuitively, changing the line numbers
to the left of a buffer shouldn't need recalculating the buffer's
contents. Even the effect on the header line smells a little, to
be honest. Shouldn't line numbers care to handle also push
the header line forward as they do the remainder of the buffer?
I don't know and I don't use line numbers, just wondering.

> I'm sure a simple solution for Flymake can be found.  E.g., what about
> skipping the entire body of flymake--diagnostics-buffer-entries if
> flymake--diagnostics-buffer-source is nil

Maybe that works, yes. Feel free to try it and commit it
to Emacs 27, I have little time and I'm booted into a machine
with no Emacs.

Thanks,
João

[-- Attachment #2: Type: text/html, Size: 3585 bytes --]

  reply	other threads:[~2020-04-12 16:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 20:55 bug#40529: 26.3; global-display-line-numbers-mode and flymake-show-diagnostics-buffer error Aidan Beggs
2020-04-10  6:30 ` Eli Zaretskii
2020-04-10 11:50   ` João Távora
2020-04-10 12:16     ` Eli Zaretskii
2020-04-10 14:38       ` João Távora
2020-04-10 15:50         ` Eli Zaretskii
2020-04-10 16:09           ` João Távora
2020-04-10 16:16             ` João Távora
2020-04-12 12:22               ` João Távora
2020-04-12 13:43                 ` Eli Zaretskii
2020-04-12 14:13                   ` João Távora
2020-04-12 14:42                     ` Eli Zaretskii
2020-04-12 16:58                       ` João Távora [this message]
2020-04-12 17:15                         ` Eli Zaretskii
2020-04-12 20:45                           ` Aidan Beggs
2020-04-13  5:03                             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALDnm52UAeXwT58vHMDy0FeqZJXFB3KKP1EEiUsue6yAC1Sa0g@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=40529@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=nadiasggeb001@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.