From: David Bremner <david@tethera.net>
To: Jon Fineman <jon@fineman.me>, notmuch@notmuchmail.org
Subject: Re: Hiding hidden image
Date: Mon, 14 Aug 2023 07:56:05 -0300 [thread overview]
Message-ID: <87v8dhgaey.fsf@tethera.net> (raw)
In-Reply-To: <87y1if6t0p.fsf@tethera.net>
David Bremner <david@tethera.net> writes:
> I also noticed that it does not happen for all png image parts, but the
> pattern of what works and what does not is also unclear to me so far. I
> observed that the following function
>
> (defun hideit ()
> (interactive)
> (overlay-put (car (last (overlays-at (point)))) 'invisible t))
I think I'm missing something about overlays. The following code
does not work (i.e. hide the image) unless I extend the overlay to the
left.
(let ((buf (get-buffer-create "image-buffer"))
(img (find-image '((:type xpm :file "attach.xpm"))))
(overlay nil))
(switch-to-buffer buf)
(insert "0123456789")
(insert-image img "x")
(insert "0123456789")
(insert "\n")
(setq overlay (make-overlay 11 12))
(overlay-put overlay 'invisible t)
(message "props=%s" (overlay-properties overlay)))
This behaviour is the same in Emacs 28.2, unlike the problem Jon
describes with notmuch-emacs.
next prev parent reply other threads:[~2023-08-14 10:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 23:25 Hiding hidden image Jon Fineman
2023-08-13 12:12 ` David Bremner
2023-08-14 10:56 ` David Bremner [this message]
2023-08-31 13:17 ` David Bremner
2023-09-03 11:42 ` [PATCH] WIP: use gnus supplied undisplay function to hide images David Bremner
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://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8dhgaey.fsf@tethera.net \
--to=david@tethera.net \
--cc=jon@fineman.me \
--cc=notmuch@notmuchmail.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.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
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).