GNU bug report logs - #34022
26.1; Region highlight has lower priority than flymake overlays

Previous Next

Package: emacs;

Reported by: Johann Klähn <johann <at> jklaehn.de>

Date: Wed, 9 Jan 2019 20:39:02 UTC

Severity: normal

Found in version 26.1

Fixed in version 27.1

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 34022 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 34022 <at> debbugs.gnu.org, johann <at> jklaehn.de
Subject: Re: 26.1; Region highlight has lower priority than flymake overlays
Date: Fri, 11 Jan 2019 20:04:05 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: João Távora <joaotavora <at> gmail.com>
>> Cc: Johann Klähn <johann <at> jklaehn.de>, 34022 <at> debbugs.gnu.org
>> Date: Fri, 11 Jan 2019 09:33:33 +0000
>> 
>> In Flymake multiple overlays (error, warning, note) can overlap and
>> priorities are used so that an error is never hidden by a note.  I based
>> thosed priorities in the 100's range (so note = 101, warning=102,
>> error=103, sth like that). 100 was a number chosen quite arbitrarily
>> which worked fine until Johann noticed the bug (I do think it's a bug).
>
> Would it still DTRT if you use priorities around 50?

No.  You can see the problem for yourself (Johann had already pasted a
slightly harder to follow recipe):

  Emacs -Q
  M-x flymake-mode RET
  M-: (set-face-background 'flymake-note "yellow green") RET
  C-x C-f lisp/progmodes/flymake.el RET
  M-g M-g 1057 RET

Case A: Start marking a region from the beginning of the line.
Case B: Start marking a region from the middle of the line

With stock flymake.el, in both cases the region is invisible in the
parts where it overlaps the green diagnostic.  Actually you could sort
of say that in case A it's doing the right thing.  But in case B it
clearly isn't.

Also if I make Flymake use priorities around 50 as you suggest (actually
41 in this case).

But if I make Flymake use priorities of the form (nil . 41), it is
possible to see both the region and the diagnostic in both A and B.  I
think it's the way this should behave.

>> Perhaps it isn't.  Can you point me to other packages that leave
>> persistent region-resisting overlays in the buffer?
> Wht do you mean by "region-resisting"?
> What is the meaning of "playing nice" in this context?

I hope I've clarified above!

João




This bug report was last modified 5 years and 205 days ago.

Previous Next


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