From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Newsgroups: gmane.emacs.bugs Subject: bug#52587: 29.0.50; Wrong block header/footer background in Org Date: Tue, 21 Dec 2021 08:29:10 +0100 Message-ID: <87a6guo1q1.fsf@gmail.com> References: <87bl1cx21k.fsf@gnus.org> <8735moyev6.fsf@gmail.com> <83h7b491x2.fsf@gnu.org> <87fsqnvl98.fsf@gmail.com> <83r1a719xw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9333"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: larsi@gnus.org, salutis@me.com, 52587@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 21 08:51:06 2021 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 1mzZvO-0002Fp-4r for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Dec 2021 08:51:06 +0100 Original-Received: from localhost ([::1]:47598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzZvM-0006yw-Or for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Dec 2021 02:51:04 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzZb1-0003vg-9R for bug-gnu-emacs@gnu.org; Tue, 21 Dec 2021 02:30:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40673) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzZb0-0004cF-Tu for bug-gnu-emacs@gnu.org; Tue, 21 Dec 2021 02:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mzZb0-0005kF-Nt for bug-gnu-emacs@gnu.org; Tue, 21 Dec 2021 02:30:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Dec 2021 07:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52587 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 52587-submit@debbugs.gnu.org id=B52587.164007175922002 (code B ref 52587); Tue, 21 Dec 2021 07:30:02 +0000 Original-Received: (at 52587) by debbugs.gnu.org; 21 Dec 2021 07:29:19 +0000 Original-Received: from localhost ([127.0.0.1]:52219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzZaJ-0005io-Ae for submit@debbugs.gnu.org; Tue, 21 Dec 2021 02:29:19 -0500 Original-Received: from mail-wm1-f46.google.com ([209.85.128.46]:52088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzZaH-0005iY-QR for 52587@debbugs.gnu.org; Tue, 21 Dec 2021 02:29:18 -0500 Original-Received: by mail-wm1-f46.google.com with SMTP id z206so8451073wmc.1 for <52587@debbugs.gnu.org>; Mon, 20 Dec 2021 23:29:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=kXun/XhkAOYUII16H0XfyILubDbDxjO4AFzH+4UaMp8=; b=iQT56oHc3ZgUlw3eQJhZq7sc6VesgssnZH/BXZD+39uTQoTyvEyum/MffmFPu6homb MpnO7iWT8PAvlsVGtyoaSPC8hIK66gLwgmjMccv+2Yt9II+Old/2Vb8tpsyKhUXa8fKK OKwJLk9yGidLjWV/+6O7ZRv26OhijaPsl6hWC8fv5ze8WO4L6xn4nqjuy9uwv/QXia9Y e06RbCz/0Q/1nnCAb6nH3y3X3i5hO4D2OtPMzAufZL33DbAJw9wUgN8157uzijfqyZWG hoxxZMEw23g3XB4tEG80ZDtBMxY6Hg6AXVzXCi3kRPnrdpCJ56yO1meBWF7/5TDwjf2q Ozjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:message-id :user-agent:mime-version:content-transfer-encoding; bh=kXun/XhkAOYUII16H0XfyILubDbDxjO4AFzH+4UaMp8=; b=WJmBbD6B58OPi2uyAkIRR6DDRKZBcX7vtVPpNrzLzT0w9YxrSd3aJH6mTQtiGwn5+7 gqZg110mUAqc2+MeLBw7JizyFAs91C+Qm1yO9tSFgvJuGq/qNrwS3kYHPilgzUvCmQsc GXPbar/erJObXYANzBLpSVAcfFd2vRUMhgB+qGvEIBSleCl5Jj6J/853L1Hld/GIP7hR hps7bufZv3iYluGkqZIrtFk3RFmSeDD5NI7d8EV2gcAmobOV1xwtj6mVGiKLw4ZwLPWf bBe5jWodIxFL00/keCzfP+YgfqSnrib/ppXkIAJnONsKF9EGlD+cXtZzvFvP94aWkYZI n+PA== X-Gm-Message-State: AOAM532ri+gmZvautqyNN62DEAvMG9xClkyoeM74kMoWSOJpuHd4johm Bvud1rTrHbmHv7MXILQeYEJc06QZ+04= X-Google-Smtp-Source: ABdhPJwfWys5rQlcKxePEKO04RyVXR8sPJ676fSOlXxKFE/8NV8lKEvDNeJFWraczyCBU3SraXRoVA== X-Received: by 2002:a05:600c:2119:: with SMTP id u25mr1473921wml.93.1640071751494; Mon, 20 Dec 2021 23:29:11 -0800 (PST) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id r8sm14034059wru.107.2021.12.20.23.29.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Dec 2021 23:29:11 -0800 (PST) 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" Xref: news.gmane.io gmane.emacs.bugs:222854 Archived-At: Eli Zaretskii writes: >> From: K=C3=A9vin Le Gouguec >> Cc: larsi@gnus.org, salutis@me.com, 52587@debbugs.gnu.org >> Date: Mon, 20 Dec 2021 07:33:07 +0100 >>=20 >> But I think this bug report shows that some users have different >> expectations, rooted in an abstract sense of what is and is not "part" >> of the subsection to hide. Specifically, they consider that the >> end-of-line decoration of a subsection's last line is "part" of the >> subsection, and so expect it to be hidden when the subsection is folded. > > Which means the Lisp code which defines which parts are hidden should > hide slightly different parts? Because the display engine does its > job perfectly here, and so do the faces: they do what you tell them to > do. That sounds about right; FWIW I'd imagine this to be fixed/worked around either in outline-mode itself, or in derived modes which feature these :extended :backgrounds. > IOW, while I see your point, I don't think I understand how would you > like this to be resolved. I don't have a concrete implementation proposal yet (this itch has remained stuck in my "minor enough that I'll let someone else file a report" drawer ever since I discovered it; thanks Rudolf for the report btw =F0=9F=98=89). On the "vague handwavy half-baked idea" front, I'd imagine that when folding a headline's subsections, Outline could (1) check whether the headline has :extended decorations at end-of-line (2) pull off some shenanigans to "copy" these decorations onto the hidden content's final newline (by hacking its {font-lock-,}face property or slapping a display property on top of it maybe?), but that sounds pretty brittle. On the "gazing at the other side of fence where the grass looks greener" front, I wonder if there are things to learn from Jonas's magit-section[1], which AFAICT quacks like outline-mode (i.e. lets users define/show/hide/navigate arbitrarily nested hierarchies of subsections) and does not seem to suffer from this problem despite making heavy use of extended backgrounds. The "actionable suggestion" front is late to the battlefield, sorry =F0=9F= =98=95 [1] Code: https://git.savannah.gnu.org/cgit/emacs/nongnu.git/plain/lisp/magit-sec= tion.el?h=3Delpa/magit-section Manual: https://magit.vc/manual/magit-section/