From: "Johann Klähn" <johann@jklaehn.de>
To: "João Távora" <joaotavora@gmail.com>
Cc: 34022@debbugs.gnu.org
Subject: bug#34022: 26.1; Region highlight has lower priority than flymake overlays
Date: Thu, 10 Jan 2019 22:06:42 +0100 [thread overview]
Message-ID: <1547154402.1640373.1631290352.72E71BD4@webmail.messagingengine.com> (raw)
In-Reply-To: <87ftu1lfka.fsf@gmail.com>
(Sorry, I initially forgot to CC the bug tracker.)
Hi João,
thanks for your quick response! I did not see `flymake-overlay-control' because I was still using
the version of flymake shipped with Emacs 26.1. (I really like the options introduced with the new
version allows, so I will probably switch to using it.)
On Wed, Jan 9, 2019, at 21:52, João Távora wrote:
> Johann Klähn <johann@jklaehn.de> writes:
> > • M-: (set-face-background flymake-note "yellow green")
>
> You probably mean
>
> (set-face-background 'flymake-note "yellow green")
Exactly :)
> Yes, it was intentional. Doesn't mean that it's correct :-) Perhaps it
> should be reduced to the 50's region and also use the (nil . <value>),
> form which I didn't know about (so thanks for showing me this).
Wrt. to using non-numeric priority values maybe Eli Zaretskii could chime in, because there is the
following section ("Overlay Properties") in the Emacs Lisp manual, which he wrote (see Bug#20253):
‖ ‘priority’
‖ This property’s value determines the priority of the overlay. If
‖ you want to specify a priority value, use either ‘nil’ (or zero),
‖ or a positive integer. Any other value has undefined behavior.
‖ [...]
‖ Note that Emacs sometimes uses non-numeric priority values for some
‖ of its internal overlays, so do not try to do arithmetic on the
‖ priority of an overlay (unless it is one that you created). In
‖ particular, the overlay used for showing the region uses a priority
‖ value of the form ‘(PRIMARY . SECONDARY)’, where the PRIMARY value
‖ is used as described above, and SECONDARY is the fallback value
‖ used when PRIMARY and the nesting considerations fail to resolve
‖ the precedence between overlays. However, you are advised not to
‖ design Lisp programs based on this implementation detail; if you
‖ need to put overlays in priority order, use the SORTED argument of
‖ ‘overlays-at’. *Note Finding Overlays::.
Even though it's shipped with Emacs, flymake is probably not "internal" enough to use those?
...looking around further I just found Bug#16192, where a similar problem was fixed for hl-line-mode
by using a negative priority. And then there is also Bug#15899, which discusses the use of overlays
to highlight region in the first place.
next prev parent reply other threads:[~2019-01-10 21:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-09 20:33 bug#34022: 26.1; Region highlight has lower priority than flymake overlays Johann Klähn
2019-01-09 20:52 ` João Távora
2019-01-10 21:06 ` Johann Klähn [this message]
2019-01-10 22:03 ` João Távora
[not found] ` <1547153959.1638293.1631244736.794AFB75@webmail.messagingengine.com>
[not found] ` <83o98nhcst.fsf@gnu.org>
2019-01-11 9:33 ` João Távora
2019-01-11 19:14 ` Eli Zaretskii
2019-01-11 20:04 ` João Távora
2019-01-11 21:00 ` Eli Zaretskii
2019-11-02 16:17 ` João Távora
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1547154402.1640373.1631290352.72E71BD4@webmail.messagingengine.com \
--to=johann@jklaehn.de \
--cc=34022@debbugs.gnu.org \
--cc=joaotavora@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).