From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to Display a Zero Height Line
Date: Wed, 04 Dec 2024 15:10:07 +0200 [thread overview]
Message-ID: <865xnz1tn4.fsf@gnu.org> (raw)
In-Reply-To: <CADQMGAQBsMMy4ZsZofnFgo_tFjf_J5-r9AfDVhweqmbao6iRyA@mail.gmail.com> (message from Psionic K on Wed, 4 Dec 2024 14:08:16 +0900)
> 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?
next prev parent reply other threads:[~2024-12-04 13:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 5:08 How to Display a Zero Height Line Psionic K
2024-12-04 13:10 ` Eli Zaretskii [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-12 6:37 Psionic K
2024-12-12 6:47 ` Eli Zaretskii
2024-12-12 9:00 ` Psionic K
2024-12-12 9:23 ` Eli Zaretskii
2024-12-12 12:25 ` Psionic K
2024-12-01 1:04 Psionic K
2024-12-01 6:41 ` Eli Zaretskii
2024-12-03 13:30 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-11-30 3:02 Psionic K
2024-11-30 7:35 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=865xnz1tn4.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).