Re: Hiding hidden image

Subject: Re: Hiding hidden image

Date: Sun, 13 Aug 2023 09:12:06 -0300

To: Jon Fineman, notmuch@notmuchmail.org

Cc:

From: David Bremner


Jon Fineman <jon@fineman.me> writes:

> This occurs using either:
>
> notmuch version 0.37 and emacs version 29.1 on Debian trixie/sid X11/XFCE
>
> or
>
> OpenBSD OpenBSD 7.3-current (GENERIC.MP) #1327 X11/awsomewm.
>
> I received an email with a hidden image/png. When I click on it, the
> image displays fine. However when I click on it again to hide it the
> email body text following it moves up as expected, but the picture
> doesn't hide (go away). So I am left with the image overlaying the
> email text. When I hide it the status of the attach line does change
> to (hidden).

Hi Jon;

Thanks for the report. I suspect this has to do with the new overlay
handling code in 29.1, but I haven't managed to isolate what exactly is
going on yet. I did verify that the problem does not occur with Emacs
28.2 on Debian testing. I


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))

exhibits the same behaviour as toggling the button: i.e. one works iff
the other does. The fact that the overlay in question is the last one is
a I think a notmuch specific hack.

I don't have much to suggest, but I guess a start would be to identify
some distinguishing characteristics for the messages where the part
visibility fails to toggle. The problem does seem to manifest in more
cases than not. 

d
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: