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 <kevin.legouguec@gmail.com>
Newsgroups: gmane.emacs.bugs
Subject: bug#65896: 30.0.50;
 folding text with text properties prevents background from extending
 past the newline
Date: Fri, 29 Sep 2023 09:12:07 +0200
Message-ID: <87o7hla1x4.fsf@gmail.com>
References: <87ttrzmfua.fsf@strawberrytea.xyz> <83v8cfns1m.fsf@gnu.org>
 <87il8fm7x2.fsf@gmail.com>
 <40b4f4d3-34ae-4631-bebd-eefcd034d87e@app.fastmail.com>
 <83il8envaf.fsf@gnu.org> <87pm2d6mbj.fsf@localhost>
 <83a5tfadpq.fsf@gnu.org> <87a5tfp74p.fsf@gmail.com>
 <86o7huvjrh.fsf@mail.linkov.net>
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="21543"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cc: Eli Zaretskii <eliz@gnu.org>, 65896@debbugs.gnu.org,
 Ihor Radchenko <yantar92@posteo.net>, look@strawberrytea.xyz
To: Juri Linkov <juri@linkov.net>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 29 09:13:13 2023
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1qm7gX-0005HB-47
	for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Sep 2023 09:13:13 +0200
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces@gnu.org>)
	id 1qm7gA-0008Jf-Lj; Fri, 29 Sep 2023 03:12:50 -0400
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 <Debian-debbugs@debbugs.gnu.org>)
 id 1qm7g8-0008JT-6L
 for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2023 03:12:48 -0400
Original-Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1qm7g7-0007sO-UJ
 for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2023 03:12:47 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1qm7gM-00016q-7k
 for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2023 03:13:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec <kevin.legouguec@gmail.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Fri, 29 Sep 2023 07:13:02 +0000
Resent-Message-ID: <handler.65896.B65896.16959715534221@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 65896
X-GNU-PR-Package: emacs
Original-Received: via spool by 65896-submit@debbugs.gnu.org id=B65896.16959715534221
 (code B ref 65896); Fri, 29 Sep 2023 07:13:02 +0000
Original-Received: (at 65896) by debbugs.gnu.org; 29 Sep 2023 07:12:33 +0000
Original-Received: from localhost ([127.0.0.1]:55035 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1qm7fs-000160-PY
 for submit@debbugs.gnu.org; Fri, 29 Sep 2023 03:12:33 -0400
Original-Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:49517)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kevin.legouguec@gmail.com>) id 1qm7fq-00015l-Gb
 for 65896@debbugs.gnu.org; Fri, 29 Sep 2023 03:12:31 -0400
Original-Received: by mail-ej1-x632.google.com with SMTP id
 a640c23a62f3a-9b2cee55056so120417566b.3
 for <65896@debbugs.gnu.org>; Fri, 29 Sep 2023 00:12:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1695971529; x=1696576329; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=E7TzgB3E1jismgyWEA8mC6Hgo6mpRMQKr/Qx9kAVqLY=;
 b=R4O4A4ZdMt09PwqjZ0+T9hEMnUk94Y3pYjvHytQD5CBYXhtTMOi2O/pMPXYlzShCog
 802yQqSnQUDtaOsdN8vQrZSG46TYCB5Aaj61WJneYzWpg+TUemdOJs6W2yVXvRl5jY+G
 S79AfH6SAeDKXOBva6sCLGOXqg3MxzC+CqNjrH2OkUgJrO+fjtvvajcfE0V+i1yoEEdW
 IlFOjT1HdzvNeubbYcGARHWZZhgqh4eP5w7veRLoMhqrx2B4retgUHEy0SGaeH6XCTvB
 3oprxyenl4d5TlEBeeshs1Z9am66O0jiYpYi/HqBdUutHnexiO16y7d45UDLXo8SUxaS
 woZg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1695971529; x=1696576329;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=E7TzgB3E1jismgyWEA8mC6Hgo6mpRMQKr/Qx9kAVqLY=;
 b=J7aha9JH/tnbWl8/euV97qbVJkxGXvpg/BkdOsi7WkGe3R7a0OPo7gStM+/N6lYQHv
 0WfO0ZyhalDwYTHOAji3zBrZq3TqrqivAhzpZkWtjupsUf8eXCCwWpYqEFzGNdftsb3i
 yMHFWhoDcul9Ej0/S+pOmI/J3e5XJ9UMu6OUOPaJq8UhbmvtJyTBI3nYyi3lhKMJ0YQV
 TlSDf2fYN6NBtZOEu6jTW1bN3Q6pKjCUblgXTBjh1MufySt/tnmuFSj3ecWq+L/xA5Mo
 FfFc2Ia8aZMJkkv7LkLHP8QSUUFySo+8mHiAHlxE4QI0iRIPw29o3+fLXvxfrWIo6JPp
 pd6A==
X-Gm-Message-State: AOJu0Yz7T3W9U72HxU3DYyskW2CkDfztTbFs8eFUyd8MyBuNi3lYwJFp
 Z0XoD3hTr4UVHFMPTYEykOCGICpuVGw=
X-Google-Smtp-Source: AGHT+IGeJ9d9JmSuE4mcvPRAOb6Zb8R7J3Ohf7SUk4QbmPhIt+sXHwmYi2v8NsFPKr8rQjMzb8UMag==
X-Received: by 2002:a17:906:749b:b0:992:c8d7:b66f with SMTP id
 e27-20020a170906749b00b00992c8d7b66fmr2952771ejl.75.1695971528799; 
 Fri, 29 Sep 2023 00:12:08 -0700 (PDT)
Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49])
 by smtp.gmail.com with ESMTPSA id
 g17-20020a7bc4d1000000b003fe2a40d287sm800356wmk.1.2023.09.29.00.12.07
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 29 Sep 2023 00:12:08 -0700 (PDT)
In-Reply-To: <86o7huvjrh.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 
 22 Sep 2023 09:40:42 +0300")
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" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=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:271469
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/271469>

Juri Linkov <juri@linkov.net> writes:

>> FWIW, I would invite motivated hackers to check out magit-section and
>> see if outline-mode could be taught a new "folding style" that would use
>> the same folding principles.  My own wandering through the EIEIO maze
>> has been too brief to yield anything useful, but AFAICT the salient
>> points are:
>>
>> * setting the 'invisible overlay's BEG at the start of the "section
>> body" (after the heading's newline),
>>
>> * storing bookkeeping information (such as this beginning position) in a
>> 'magit-section property applied to the heading, so that
>> magit-section-show can retrieve that information when invoked by the
>> user with point on that heading.
>>
>> I would imagine outline.el could grow a user option to adjust overlay
>> boundaries this way, so the heading's newline would remain visible, and
>> so would any :extend property on that newline=E2=80=A6 although perhaps =
I'm
>> missing some key differences between outline-mode and magit-section-mode
>> that may derail this train of thought.
>
> I tried, but the conclusion was that this requires changes in the display=
 engine.

Could you expand on what exactly you tried, and what limitations you
faced?  (Apologies if you went over this somewhere else and I missed it)

My point was that magit-section exists right now, with no changes to the
display engine, with the exact feature set of outline.el *and* the
ability to keep heading faces extended after folding sections.  So,
unless I've missed a crucial difference between the two libraries, I
don't see why outline.el could not "learn new tricks".

(FWIW magit-section advertises itself as "sections for read-only
buffers", but if there's something in there that could not be made to
work for writable buffers, I have not found it yet)