GNU bug report logs - #77544
(WIP) [PATCH] Prettify page separators.

Previous Next

Package: emacs;

Reported by: Elijah Gabe Pérez <eg642616 <at> gmail.com>

Date: Sat, 5 Apr 2025 05:02:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Visuwesh <visuweshm <at> gmail.com>
Cc: Elijah Gabe Pérez <eg642616 <at> gmail.com>, 77544 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#77544: (WIP) [PATCH] Prettify page separators.
Date: Sun, 06 Apr 2025 09:12:55 +0200
Visuwesh <visuweshm <at> gmail.com> writes:

> [சனி ஏப்ரல் 05, 2025] Elijah Gabe Pérez wrote:
>
>> Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:
>>
>>> Nothing to add to your comments ATM, but maybe an alternative idea: how
>>> about solving this with a new type of display property for drawing a
>>> horizontal line? Say `horizontal-line WIDTH' where WIDTH could be nil or
>>> something to draw a line to the end of the display area? That would have
>>> the advantage that it would be a relatively locally confined change and
>>> would have no impact when not used, and hopefully little potential to
>>> break unrelated things when not used.
>>
>> I like this idea.
>
> Do we need a new display property when we have the :strike-through face
> attribute?  The following achieves the same effect, albeit the newline
> is required for the :extend attribute to work properly AFAIU:
>
>     (font-lock-add-keywords 
>      nil
>      '(("\f\n" (0 (prog1 nil
>                     (put-text-property (match-beginning 0) (1- (match-end 0))
>                                        'display " ")
>                     (put-text-property (match-beginning 0) (match-end 0)
>                                        'face '(:strike-through t :extend t)))))))
>     (push 'display font-lock-extra-managed-props)

Hm, that's right. And at least on my tty (iTerm2 on macOS)

  (display-supports-face-attributes-p '(:strike-through t))
   => t

and it actually works, too.




This bug report was last modified today.

Previous Next


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