From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: 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 Organization: LINKOV.NET Message-ID: <86sfidsbrx.fsf@mail.linkov.net> References: <871qqcdfvr.fsf@localhost> <83h6z5psqe.fsf@gnu.org> <83bkpdpf92.fsf@gnu.org> <8335app826.fsf@gnu.org> <831qq9p7b7.fsf@gnu.org> <87bkpc4e06.fsf@gmail.com> <865yfkoz1n.fsf@mail.linkov.net> <87mt8vnn6h.fsf@gmail.com> <86leoebv1q.fsf@mail.linkov.net> <87leoev6j0.fsf@gmail.com> <864jv26l0g.fsf@mail.linkov.net> <87zgctajf5.fsf@gmail.com> <86fsely0q3.fsf@mail.linkov.net> <87cz9prxbg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5933"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 59141@debbugs.gnu.org, Eli Zaretskii , Abdul-Lateef Haji-Ali , yantar92@posteo.net To: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 20 19:57:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1owpVG-0001Rl-8g for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Nov 2022 19:57:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owpV2-0007kU-Sl; Sun, 20 Nov 2022 13:57:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owpV0-0007ji-8l for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 13:57:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1owpUz-0003GN-VP for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 13:57:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1owpUz-000790-KD for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 13:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Nov 2022 18:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59141 X-GNU-PR-Package: emacs Original-Received: via spool by 59141-submit@debbugs.gnu.org id=B59141.166897061627446 (code B ref 59141); Sun, 20 Nov 2022 18:57:01 +0000 Original-Received: (at 59141) by debbugs.gnu.org; 20 Nov 2022 18:56:56 +0000 Original-Received: from localhost ([127.0.0.1]:44636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owpUt-00078b-R0 for submit@debbugs.gnu.org; Sun, 20 Nov 2022 13:56:56 -0500 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:59423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owpUq-00078K-VK for 59141@debbugs.gnu.org; Sun, 20 Nov 2022 13:56:54 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 0B7F520009; Sun, 20 Nov 2022 18:56:42 +0000 (UTC) In-Reply-To: <87cz9prxbg.fsf@gmail.com> ("=?UTF-8?Q?K=C3=A9vin?= Le Gouguec"'s message of "Mon, 14 Nov 2022 23:22:11 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248459 Archived-At: > 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.