unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* emacs: honoring notmuch-show-insert-part-text/html for 'w3m renderer
@ 2021-07-30 23:18 Jose Antonio Ortega Ruiz
  2021-07-31  9:20 ` David Edmondson
  0 siblings, 1 reply; 4+ messages in thread
From: Jose Antonio Ortega Ruiz @ 2021-07-30 23:18 UTC (permalink / raw)
  To: notmuch


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.

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: emacs: honoring notmuch-show-insert-part-text/html for 'w3m renderer
  2021-07-30 23:18 emacs: honoring notmuch-show-insert-part-text/html for 'w3m renderer Jose Antonio Ortega Ruiz
@ 2021-07-31  9:20 ` David Edmondson
  2021-08-03 22:29   ` David Bremner
  0 siblings, 1 reply; 4+ messages in thread
From: David Edmondson @ 2021-07-31  9:20 UTC (permalink / raw)
  To: Jose Antonio Ortega Ruiz, notmuch

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: emacs: honoring notmuch-show-insert-part-text/html for 'w3m renderer
  2021-07-31  9:20 ` David Edmondson
@ 2021-08-03 22:29   ` David Bremner
  2021-08-04  0:03     ` Jose Antonio Ortega Ruiz
  0 siblings, 1 reply; 4+ messages in thread
From: David Bremner @ 2021-08-03 22:29 UTC (permalink / raw)
  To: David Edmondson, Jose Antonio Ortega Ruiz, notmuch

David Edmondson <dme@dme.org> writes:

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

can someone (TM) make a patch I can apply with git-am?

thanks,

d

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: emacs: honoring notmuch-show-insert-part-text/html for 'w3m renderer
  2021-08-03 22:29   ` David Bremner
@ 2021-08-04  0:03     ` Jose Antonio Ortega Ruiz
  0 siblings, 0 replies; 4+ messages in thread
From: Jose Antonio Ortega Ruiz @ 2021-08-04  0:03 UTC (permalink / raw)
  To: David Bremner, David Edmondson, notmuch

On Tue, Aug 03 2021, David Bremner wrote:

> can someone (TM) make a patch I can apply with git-am?

sent: 20210804000241.1053748-1-jao@gnu.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-04  0:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30 23:18 emacs: honoring notmuch-show-insert-part-text/html for 'w3m renderer Jose Antonio Ortega Ruiz
2021-07-31  9:20 ` David Edmondson
2021-08-03 22:29   ` David Bremner
2021-08-04  0:03     ` Jose Antonio Ortega Ruiz

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