emacs-devel
[Top][All Lists]
Advanced

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

Re: Question about display engine


From: Eli Zaretskii
Subject: Re: Question about display engine
Date: Sat, 10 Aug 2019 14:42:52 +0300

> Date: Thu, 8 Aug 2019 18:43:19 +0200
> From: Ergus <address@hidden>
> Cc: martin rudalics <address@hidden>, address@hidden
> 
> >Indeed, nothing is ever as simple in the display code, due to the
> >sheer amount of different use cases.  I think at least one other face
> >attribute that's special in this regard is :box, in particular (but
> >not only) because extend_face_to_end_of_line is called from the
> >function which redisplays the mode line and the header line.
> >
> Yes I have seen :p. That's why I will vote for simplicity+efficiency
> over more complex customization that 99% of the users won't
> need/know/use.

We cannot take the simplicity+efficiency escape if it will cause
inconsistent behavior in valid use cases.

> I only want a uniform behavior between gui and tui. Because bigger
> changes I have understand that are close to impossible.

Making the behavior of TTY and GUI frames consistent should be easy
once we decide which one we want to keep, provided we also decide not
to extend the background color on GUI (and TTY) frames.  But if we
decide to keep the TTY behavior, it will make GUI display slightly
less efficient, especially in wide windows.

> I vote for:
> 
> Reproduce in TUI the gui behavior as is now by default but:
> 
> 1) With a not-extend-by-default policy

Including non-extension of background color?  Because if you still
want to extend the color, I don't see how to make TTY and GUI
consistent, at least not easily.

> 2.0) With some condition checks to extend the mentioned exceptions
> (secondary, region, hl_line_mode etc) maybe this last can be set in a
> customizable variable as there will be relatively few elements.
> 
> xor
> 
> 2.1) Add the "extensible" flag to the face.

I think both of these possibilities aren't workable due to face
merging.

> 3) Add an extra face to extend (like in my previous code) that needs to
> be merged with the last face in the line conditionally and can be used
> in case the user wants extend but removing the underline and keeping
> the background color (for example).

This can only work if we assume users will want the same attribute be
extended or not irrespective of the face.  Such an assumption is not
necessarily valid: users could want the hl-line face, for example, be
always extended, regardless of its attributes, but would like at the
same time not see other faces' :underline attribute extended.

IOW, such a solution (and similar ones proposed here) look like
kludgey workarounds, something that IMO is not really appropriate for
a major feature such as faces.

> I am specially concerned about this because org-mode behavior in
> terminal affects many users. 

We could claim this to be a bug in Org.  No?  Why does Org insist on
covering the newline with the face?



reply via email to

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