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: Thu, 10 Nov 2022 09:45:11 +0200 Organization: LINKOV.NET Message-ID: <86fserqmm0.fsf@mail.linkov.net> References: <871qqcdfvr.fsf@localhost> <874jv8o9e4.fsf@gmail.com> <865yfovz6f.fsf@mail.linkov.net> <87a64zlhf5.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19083"; 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, =?UTF-8?Q?K=C3=A9vin?= Le Gouguec To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 10 09:09:51 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 1ot2dC-0004lz-GW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Nov 2022 09:09:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ot2cV-0000up-NE; Thu, 10 Nov 2022 03:09:07 -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 1ot2cS-0000t9-G5 for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 03:09:04 -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 1ot2cQ-0006qJ-Nm for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 03:09:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ot2cQ-0002Cd-Jm for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 03:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Nov 2022 08:09:02 +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.16680677208414 (code B ref 59141); Thu, 10 Nov 2022 08:09:02 +0000 Original-Received: (at 59141) by debbugs.gnu.org; 10 Nov 2022 08:08:40 +0000 Original-Received: from localhost ([127.0.0.1]:41797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot2c4-0002Be-A5 for submit@debbugs.gnu.org; Thu, 10 Nov 2022 03:08:40 -0500 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:48303) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot2c2-0002BD-O8 for 59141@debbugs.gnu.org; Thu, 10 Nov 2022 03:08:39 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id AEA6410000C; Thu, 10 Nov 2022 08:08:31 +0000 (UTC) In-Reply-To: <87a64zlhf5.fsf@localhost> (Ihor Radchenko's message of "Thu, 10 Nov 2022 01:36:14 +0000") 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:247489 Archived-At: >> Here is an experimental patch for outline.el >> that demonstrates a possible way to fix this: >> >> diff --git a/lisp/outline.el b/lisp/outline.el >> index a646f71db8..73ae707821 100644 >> --- a/lisp/outline.el >> +++ b/lisp/outline.el >> @@ -930,7 +930,8 @@ outline-flag-region >> ;; We use `front-advance' here because the invisible text begins at the >> ;; very end of the heading, before the newline, so text inserted at FROM >> ;; belongs to the heading rather than to the entry. >> - (let ((o (make-overlay from to nil 'front-advance))) >> + (let ((o (make-overlay from (1+ to)))) >> + (overlay-put o 'display "\n") > > Note that 'font-advance is there for a reason. > > Also, what will happen with ellipsis when there is 'display property? Then ellipsis could be added to (overlay-put o 'display "...\n"). Alternatively, maybe it would be sufficient to put the 'display "\n" property only on the final newline, thus hiding its face properties. The drawback is that it requires more overlays.