Re: emacs: honoring notmuch-show-insert-part-text/html for 'w3m renderer

Subject: Re: emacs: honoring notmuch-show-insert-part-text/html for 'w3m renderer

Date: Sat, 31 Jul 2021 10:20:25 +0100

To: Jose Antonio Ortega Ruiz, notmuch@notmuchmail.org

Cc:

From: David Edmondson


On Saturday, 2021-07-31 at 00:18:45 +01, Jose Antonio Ortega Ruiz wrote:

> Hi,
>
> notmuch-show-insert-part-text/html correctly binds shr-blocked-images to
> notmuch-show-text/html-blocked-images when using 'shr as the
> mm-text-html-renderer.  However, when the latter is not shr, the
> function only binds gnus-blocked-images, which is not used by the 'w3m
> rendered.  The corresponding variable to bind is in the latter case
> w3m-ignored-image-url-regexp, and something like the simple patch below
> seem to make things work, at least for me.

Patch looks good.

Reviewed-by: David Edmondson <dme@dme.org>

> Cheers,
> jao
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 9a95eb34..0c4fc110 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -823,7 +823,8 @@ will return nil if the CID is unknown or cannot be
> retrieved."
>      (let ((mm-inline-text-html-with-w3m-keymap nil)
>           ;; FIXME: If we block an image, offer a button to load external
>           ;; images.
> -         (gnus-blocked-images notmuch-show-text/html-blocked-images))
> +         (gnus-blocked-images notmuch-show-text/html-blocked-images)
> +         (w3m-ignored-image-url-regexp
> notmuch-show-text/html-blocked-images))
>        (notmuch-show-insert-part-*/* msg part content-type nth depth
> button))))
>
>  ;;; Functions used by notmuch-show--insert-part-text/html-shr
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: