bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#59141: 28.1.90; Face :extend when all the line but trailing \n is in


From: Kévin Le Gouguec
Subject: bug#59141: 28.1.90; Face :extend when all the line but trailing \n is invisible
Date: Sun, 13 Nov 2022 11:50:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Juri Linkov <juri@linkov.net> writes:

>> If someone came up with a patch to allow outline.el to delimit and hide
>> sections using a logic closer to magit-section's[1] (via an opt-in
>> variable, to be set e.g. by major modes, so that users happy with the
>> status quo are not affected), would that patch be given any
>> consideration?
>
> I suspect magit just inserts newlines without text properties
> between outlines, thus avoiding the problem.

I don't believe that to be the case?  Diff sections, for example, are
shown as an outline with 3 levels:

(1) filename heading,
(2) hunk headings,
(3) the hunk content (context lines + removed and added lines).

(1), (2) and (3) are painted with :extended faces, applied through text
properties (the magit-diff-file-heading, magit-diff-hunk-heading and
magit-diff-{context,removed,added}, respectively).

When under point, they also get painted with another set of :extended
faces (e.g. magit-diff-file-heading-highlight), applied either through
overlays ((1), (2)) or text properties (3).

AFAICT there is no single unpainted newline beween these sections.

>                                               Could you send
> a screenshot that shows a newline with the :extend attribute
> as the final character of the outline in magit?

See attached, showing a recent revision from emacs.git master, with the
diff completely folded (1.png) with hunks folded (2.png) and completely
unfolded (3.png).


I hope I understood your suspicion correctly and my answer was relevant?
Let me know if I misunderstood.  FWIW "insert a supplementary newline
before headings" is indeed a well-known workaround in the Org community.

Attachment: 1.png
Description: PNG image

Attachment: 2.png
Description: PNG image

Attachment: 3.png
Description: PNG image


reply via email to

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