GNU bug report logs - #59141
28.1.90; Face :extend when all the line but trailing \n is invisible

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Wed, 9 Nov 2022 02:24:01 UTC

Severity: normal

Tags: fixed

Found in version 28.1.90

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #128 received at 59141 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Cc: 59141 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Abdul-Lateef Haji-Ali <abdo.haji.ali <at> gmail.com>, yantar92 <at> posteo.net
Subject: Re: bug#59141: 28.1.90; Face :extend when all the line but trailing
 \n is invisible
Date: Sun, 20 Nov 2022 20:38:02 +0200
> As I mentioned, magit supports replacing its fringe bitmaps with
> ellipses.  See the magit-section-visibility-indicator user option, and
> the functions that act on it[1].  tl;dr the option can be set to
>
> * (SYMBOL1 . SYMBOL2): each symbol describes a fringe bitmap to be used
>   for expandable (1) or collapsible (2) sections,
>
> * (STRING . BOOLEAN): STRING is appended at the end of collapsed
>   sections.
>
> IIUC magit-section sets these ellipses via 'after-string overlays on the
> last character before a heading's newline, rather than adjusting display
> tables.
>
> Thanks for weighing in on how outline.el could be adapted, Juri.  Can't
> promise I'll be able to act on your advice and turn it into a patch
> anytime soon, but finally hashing out the implementation details between
> these two packages has made me more hopeful outline.el can be taught
> more tricks without resorting to ugly hacks.

Thanks for summarizing the relevant details of magit-section.
Now everything is clear.

>   (defun magit-section-maybe-paint-visibility-ellipses ()
>     ;; This is needed because we hide the body instead of "the body
>     ;; except the final newline and additionally the newline before
>     ;; the body"; otherwise we could use `buffer-invisibility-spec'.

This comment explains why this is needed.  I believe we could avoid
ugly hacks in outline.el because unlike magit-section, outline.el can
display arrows on the left side even on TTYs.  But since the default
ellipses should be disabled in any case, even when users don't want to use
the left-side arrows, we could add ellipses in a more clean way: as a new
value of the user option 'outline-minor-mode-use-buttons'.  So when it's
customized to 'ellipsis', the ellipsis overlay will be created in a new
pcase branch in outline--insert-button.




This bug report was last modified 1 year and 112 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.