Subject: bug#11832: 24.1.50; enhancement request: line truncation not dependent on fringe

From: "Drew Adams" <[email-masked]>
Date: Sun, 1 Jul 2012 14:41:27 -0700

AS> The truncation glyph always occupies one column, even
AS> if not shown.  If you configure your fringe to only show
AS> on the right you get (or lose) exactly the same amount
AS> of space.

Fair enough; good point.

The real point of the bug report, however, is that unless a user turns on fringe
display s?he has NO indication of which lines are truncated.  That's not good.

EL>>> However, if someone finds a clever solution to this 
EL>>> dilemma, patches or ideas are welcome.
> > 
> > Just sacrifice 100% perfection.
> 
EL> I understand the principle, but not the particulars.
EL> What do you suggest that the display engine do when it
EL> bumps into the case I described? not display the truncation
EL> glyph in that case? something else?
EL> 
EL> IOW, what is the solution you suggest, exactly?

I reported the bug (from enhancement request to regression, depending on your
point of view).  I do not claim to have a solution, let alone the best solution.

However, if nothing else, i.e., if you cannot find any way to let users with
fringe turned off see which lines are truncated, then consider adding a user
option that has a value that turns fringe on automatically for any frame
containing a window that shows line truncation.  IOW, let users choose to have
line truncation automatically display fringe.

(Even better would be to have an option value `show-minimally' that shows the
minimal fringe as needed - e.g. `right-only' if all text shown in the frame is
left-to-right, `left-only' if all is right-to-left, etc.)  Obviously, such an
option should have an effect only if fringe is not already displayed - they
would not cause fringe to disappear when no truncation, if the user asked for
fringe.

[IIUC, the presence or absence of fringe is frame-specific at best, and not
window-specific, which means that the entire frame would need to be affected for
truncation-provoked fringe display.  

That, in spite of the fact that the Emacs manual presents fringe in a node
entitled `Window Fringes', and it speaks of windows having fringes and not of
frames having fringes.  It is true that the fringe symbols used can be different
depending on the buffers displayed in individual windows, but IIUC all of the
windows in a given frame either have or do not have fringe along the same
edge(s).]

Let me be clear BTW about my motivation: I use Emacs with fringes turned off.
And I use it with line truncation turned off (although it gets turned on
automatically in contexts such as the debugger).  I am not asking for a fix to
this bug for myself but for Emacs.

I simply recognize that something was lost for users in moving to Emacs 21.  It
seems wrong that users who choose not to show fringe have no way of knowing
which lines are truncated.

I hope that at least the same subset of use cases that existed prior to Emacs 21
can have truncation indication restored in some way.  I do not know exactly what
that subset is (only fixed fonts in a given frame?).  But in the context of that
subset, which I imagine is not a rare context, Emacs should be able to DTRT, one
way or another.

---

BTW, I looked for index entries matching `.*bidirect.*' and found only one:
`bidirectional editing'.  There are 2 other entries for `bidi*', aimed at the
same node.  In that node it mentions that individual paragraphs that are r-to-l
show text continued or truncated on the left.  But I do not see any explanation
of what happens wrt truncation indicators (e.g. no mention of the fringe).  

Presumably, if a frame shows text (e.g. a paragraph) that is r-to-l and other
text (same buffer or another) that is l-to-r then both left and right fringes
would need to be displayed to see the truncation indications.  Maybe that should
be pointed out?  Seems like there should at least be cross references here to
nodes `Line Truncation' and `Continuation Lines'.

There is a cross-ref link to node `Bidirectional Editing' from node `Window
Fringes', which is good.  But maybe nodes `Line Truncation' and `Continuation
Lines' should also have a cross ref to `Bidirectional Editing'.

And maybe node `Continuation Lines' should be updated to not just say that
truncation is indicated in the right fringe?  (The two other fringe nodes have
already been updated in this regard for bidi, it seems.)