help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to Display a Zero Height Line


From: Eli Zaretskii
Subject: Re: How to Display a Zero Height Line
Date: Wed, 04 Dec 2024 15:10:07 +0200

> From: Psionic K <psionik@positron.solutions>
> Date: Wed, 4 Dec 2024 14:08:16 +0900
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, Eli Zaretskii <eliz@gnu.org>
> 
> Regarding Eli's reply:
> > What do you mean by "extending the background of :inverse-video
> > background" of a line?  Can you show some simple Lisp which produces
> > this effect on display?
> 
>     (let ((buffer (get-buffer-create "testorito")))
>       (set-buffer buffer)
>       (erase-buffer)
>       (insert "* ")
>       (insert (propertize  "TODO" 'face '(:inverse-video t)))
>       (insert " Org Modern Uses Inverse Video")
>       (insert "\n")
>       (insert "* ")
>       (insert (propertize  "TODO" 'face '(:inverse-video t :foreground
> "#ff2222")))
>       (insert " To Draw Fancy Todos")
>       (setq-local p (point-max))
>       (insert "\n")
>       (setq-local o (make-overlay p (1+ p)))
>       (overlay-put o 'line-height 4.0)
>       (switch-to-buffer buffer))
> 
> This example re-creates the situation that exists in Dslide.  I need
> to separate the two lines by some floating point multiple of lines in
> order to "slide in" to a vanishing degree of separation between two
> lines of content.  I use the same technique between list items and
> sub-headings.  All text that has a background exhibits the behavior,
> not just `:inverse-video`.

And what is the problem with what the above snippet produces?  Is the
problem that you _want_ the background color extended to EOL?  If so,
you need to use (:extend t), and you need to make sure the face
affects the entire line till the newline.

But maybe I misunderstand what you want to achieve?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]