[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15899: 24.3.50; regression: `region' overlay is lower priority than

From: Drew Adams
Subject: bug#15899: 24.3.50; regression: `region' overlay is lower priority than default
Date: Fri, 15 Nov 2013 07:51:38 -0800 (PST)

> > In Emacs 24.3, the region highlight was not done by an overlay,
> > but by special code in C.  Now it is an overlay, so the issue
> > of priority creeps in.
> Indeed.  OTOH, I'm not convinced it's a bug, since this "bug" was
> also the fix for another bug.

Which other bug?  Was that bug there ever since the Emacs region
could be highlighted (i.e., several decades old)?  Or was that
bug introduced recently, as the result of some other change?
Maybe there is more than one change that needs to be reverted?

Oh, I see that Dmitry has now answered that question: 

Which was NOT a bug, IMO.  It should not have been "fixed".  The
fact that face `region' highlights "on top of" other highlighting
is _on purpose_, i.e., by design.  Countering that is folly, IMO.

What next?  Someone wants to see "theme" highlighting on top of
Isearch overlays?  And someone eagerly jumps in to "fix" that
"bug" too?

> It's a change, there's no doubt about that. Whether it's better
> or worse is not so clear.

Are you saying that you think it might not be a bug (regression)
to use an overlay rather than a text property?  That would be a
reasonable question.

Or are you suggesting that it might not be a bug that selecting
text does not show the selection face throughout the selection?

The latter would be unreasonable.  When you select text you
should always be able to see which text you selected - all of it,
even if it is only one character.  This should be a no-brainer.
The whole point of having a `region' face is to highlight what
is in the region.

(FWIW, I'm not sure I'm in favor of the change to using an
overlay from using a text property either, but that is not what
this bug report is about.  Using the region to select text, and
then replacing face `region' text property with another face or
another text property, or otherwise making use of the property,
can be useful.  Sure, you can make do without `region' as a text
property, but why should you have to?  Why did this behavior
suddenly need to be changed, after four decades or so of use?)


1. If you keep the use of an overlay, at *least* give users a
choice (e.g. a user option) of whether face `region' is to be
applied as a text property or used for an overlay.

2. When it is used for an overlay, please make its priority
higher than others, with the exception of isearch overlays
(yes, there can sometimes be a use for continuing to show the
region while isearching).  If there are any other exceptions
needed to bring the behavior back to pre-regression, those
would apply also.  (I can't think of any other exceptions,
right now).

These kinds of changes should first be the subject of proposal
and discussion in emacs-devel, and perhaps a user poll.  They
should not be made willy nilly when fixing a bug.  IMHO.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]