emacs-devel
[Top][All Lists]
Advanced

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

Re: Fill column indicator functionality


From: Eli Zaretskii
Subject: Re: Fill column indicator functionality
Date: Fri, 15 Mar 2019 16:12:30 +0200

> Cc: address@hidden
> From: Clément Pit-Claudel <address@hidden>
> Date: Fri, 15 Mar 2019 08:44:20 -0400
> 
> On 15/03/2019 03.30, Eli Zaretskii wrote:
> > Does this answer your question?
> 
> It does, thanks. It's a very thorough answer. Thanks for taking the time, Eli!
> 
> > The continuous line idea does have one advantage: it seamlessly
> > supports lines of variable height.  But that use case is rare, and I
> > think we will be able to support them with the glyph-based
> > implementation as well.
> 
> This was actually going to be my follow-up question :) I see lines of 
> variable height in many of most of my Emacs mode, through a combination of 
> factors:
> 
> - Font switches due to symbols picked by prettify-symbols-mode not being 
> available in my main programming font
> - Variable-pitch fonts being used by AucTeX for section and paragraph titles 
> - Varying font sizes to indicate nesting depth in Org-mode
> - Changing line spacing to separate top-level items in org-mode

Does the fci mode support those use cases?

> Is there actually a good way to support all this?  Maybe using a very thin 
> space and a face with a :background on it would do.  Or maybe it will be 
> possible to put a 'display (space …) property on the line character so that 
> it displays as a 1-px wide line?

You are thinking in terms of a Lisp program, but we are talking about
something the display engine itself does.  E.g., setting display
properties from inside the display engine is a non-starter, because
users don't expect such properties to appear without their say-so.

But yes, we have several methods of scaling display elements which
could be used to solve these use cases.  I just don't think we should
block the feature until they are fixed.  However important are the use
cases you enumerated, they are not the majority in Emacs, right?

> Also, as a second follow-up question: we already have code to draw boxes 
> around characters; would it be hard to extend that code to allow 
> customization of which sides to draw? Alternatively, would it be hard to add 
> a vertical strike-through face property? (I've used horizontal strike-through 
> as a way to display horizontal lines in the past)

I'm not sure where are you going with this.  Yes, Emacs is capable of
drawing horizontal and vertical lines of specified pixel-width, but
the issue here is not whether we can do it, the issue is how to do
that in a way that fits as much as possible the current basic design
and implementation of the display engine.  Otherwise, the job becomes
so large that we probably won't have this feature any time soon.

Specifically, drawing a "vertical strike-through" still doesn't solve
the problem with the height of the line, because the glyph we will
"strike through" will still need to have a suitable height, right?

You need to realize that on its highest level, the display engine
manipulates glyphs (and there are several kinds of them).  All the
decorations that are not glyphs can be drawn only in places where
glyphs can never appear.  In a nutshell (and this is admittedly an
over-simplification), the display engine can display and/or lay out
anything that we can present/represent as a glyph, but that's all it
can do.



reply via email to

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