* [PATCH] emacs: honour notmuch-show-text/html-blocked-images in w3m messages
@ 2021-08-04 0:02 jao
2021-08-04 1:59 ` David Bremner
0 siblings, 1 reply; 7+ messages in thread
From: jao @ 2021-08-04 0:02 UTC (permalink / raw)
To: notmuch; +Cc: jao
When mm-text-html-renderer is set to 'w3m, the variable playing the
role of a regular expression for blocked images is
w3m-ignored-image-url-regexp. We bind it when the renderer is not
'shr.
---
emacs/notmuch-show.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 9a95eb34..0f96c4fe 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -59,6 +59,7 @@
(defvar shr-blocked-images)
(defvar gnus-blocked-images)
(defvar shr-content-function)
+(defvar w3m-ignored-image-url-regexp)
;;; Options
@@ -823,7 +824,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
--
2.32.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs: honour notmuch-show-text/html-blocked-images in w3m messages
2021-08-04 0:02 [PATCH] emacs: honour notmuch-show-text/html-blocked-images in w3m messages jao
@ 2021-08-04 1:59 ` David Bremner
2021-08-17 16:07 ` Jonathan Wilner
0 siblings, 1 reply; 7+ messages in thread
From: David Bremner @ 2021-08-04 1:59 UTC (permalink / raw)
To: jao, notmuch; +Cc: jao
jao <jao@gnu.org> writes:
> When mm-text-html-renderer is set to 'w3m, the variable playing the
> role of a regular expression for blocked images is
> w3m-ignored-image-url-regexp. We bind it when the renderer is not
> 'shr.
> ---
applied to master
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs: honour notmuch-show-text/html-blocked-images in w3m messages
2021-08-04 1:59 ` David Bremner
@ 2021-08-17 16:07 ` Jonathan Wilner
2021-08-17 16:32 ` David Edmondson
0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Wilner @ 2021-08-17 16:07 UTC (permalink / raw)
To: David Bremner, jao, notmuch; +Cc: jao
Apologies in advance for thread-jacking this patch !
No matter what I try to do, I can't configure notmuch/emacs to show any inline images. That's using any of the renderer options, from shr to the various w3ms, other than html2text. I've set every possible variable to allow things, to no avail.
Using w3m under Emacs on the same machine pulls in local and network images fine.
Does anyone either have this working as the default or even using a toggle ("T") to enable images one message at time?
Thanks in advance,
Jonathan
David Bremner <david@tethera.net> writes:
> jao <jao@gnu.org> writes:
>
>> When mm-text-html-renderer is set to 'w3m, the variable playing the
>> role of a regular expression for blocked images is
>> w3m-ignored-image-url-regexp. We bind it when the renderer is not
>> 'shr.
>> ---
> applied to master
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs: honour notmuch-show-text/html-blocked-images in w3m messages
2021-08-17 16:07 ` Jonathan Wilner
@ 2021-08-17 16:32 ` David Edmondson
2021-08-17 16:39 ` Jonathan Wilner
2021-08-19 9:54 ` Tomi Ollila
0 siblings, 2 replies; 7+ messages in thread
From: David Edmondson @ 2021-08-17 16:32 UTC (permalink / raw)
To: Jonathan Wilner, David Bremner, jao, notmuch; +Cc: jao
On Tuesday, 2021-08-17 at 09:07:53 -07, Jonathan Wilner wrote:
> Apologies in advance for thread-jacking this patch !
>
> No matter what I try to do, I can't configure notmuch/emacs to show
> any inline images. That's using any of the renderer options, from shr
> to the various w3ms, other than html2text. I've set every possible
> variable to allow things, to no avail.
>
> Using w3m under Emacs on the same machine pulls in local and network images fine.
>
> Does anyone either have this working as the default or even using a
> toggle ("T") to enable images one message at time?
I use (with shr):
(defun dme:notmuch-show-refresh-show-images ()
"Refresh the current buffer with external images enabled."
(interactive)
(make-local-variable 'notmuch-show-text/html-blocked-images)
(setq notmuch-show-text/html-blocked-images nil)
(notmuch-show-refresh-view))
(define-key notmuch-show-mode-map "I" 'dme:notmuch-show-refresh-show-images)
>
> Thanks in advance,
>
> Jonathan
>
> David Bremner <david@tethera.net> writes:
>
>> jao <jao@gnu.org> writes:
>>
>>> When mm-text-html-renderer is set to 'w3m, the variable playing the
>>> role of a regular expression for blocked images is
>>> w3m-ignored-image-url-regexp. We bind it when the renderer is not
>>> 'shr.
>>> ---
>> applied to master
>> _______________________________________________
>> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs: honour notmuch-show-text/html-blocked-images in w3m messages
2021-08-17 16:32 ` David Edmondson
@ 2021-08-17 16:39 ` Jonathan Wilner
2021-08-19 9:54 ` Tomi Ollila
1 sibling, 0 replies; 7+ messages in thread
From: Jonathan Wilner @ 2021-08-17 16:39 UTC (permalink / raw)
To: David Edmondson, David Bremner, jao, notmuch; +Cc: jao
Thank you ! I'll give this a try now. :-)
David Edmondson <dme@dme.org> writes:
> On Tuesday, 2021-08-17 at 09:07:53 -07, Jonathan Wilner wrote:
>
>> Apologies in advance for thread-jacking this patch !
>>
>> No matter what I try to do, I can't configure notmuch/emacs to show
>> any inline images. That's using any of the renderer options, from shr
>> to the various w3ms, other than html2text. I've set every possible
>> variable to allow things, to no avail.
>>
>> Using w3m under Emacs on the same machine pulls in local and network images fine.
>>
>> Does anyone either have this working as the default or even using a
>> toggle ("T") to enable images one message at time?
>
> I use (with shr):
>
> (defun dme:notmuch-show-refresh-show-images ()
> "Refresh the current buffer with external images enabled."
> (interactive)
> (make-local-variable 'notmuch-show-text/html-blocked-images)
> (setq notmuch-show-text/html-blocked-images nil)
> (notmuch-show-refresh-view))
> (define-key notmuch-show-mode-map "I" 'dme:notmuch-show-refresh-show-images)
>
>>
>> Thanks in advance,
>>
>> Jonathan
>>
>> David Bremner <david@tethera.net> writes:
>>
>>> jao <jao@gnu.org> writes:
>>>
>>>> When mm-text-html-renderer is set to 'w3m, the variable playing the
>>>> role of a regular expression for blocked images is
>>>> w3m-ignored-image-url-regexp. We bind it when the renderer is not
>>>> 'shr.
>>>> ---
>>> applied to master
>>> _______________________________________________
>>> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs: honour notmuch-show-text/html-blocked-images in w3m messages
2021-08-17 16:32 ` David Edmondson
2021-08-17 16:39 ` Jonathan Wilner
@ 2021-08-19 9:54 ` Tomi Ollila
2021-08-19 10:16 ` David Edmondson
1 sibling, 1 reply; 7+ messages in thread
From: Tomi Ollila @ 2021-08-19 9:54 UTC (permalink / raw)
To: David Edmondson, Jonathan Wilner, David Bremner, jao, notmuch; +Cc: jao
On Tue, Aug 17 2021, David Edmondson wrote:
> On Tuesday, 2021-08-17 at 09:07:53 -07, Jonathan Wilner wrote:
>
>> Apologies in advance for thread-jacking this patch !
>>
>> No matter what I try to do, I can't configure notmuch/emacs to show
>> any inline images. That's using any of the renderer options, from shr
>> to the various w3ms, other than html2text. I've set every possible
>> variable to allow things, to no avail.
>>
>> Using w3m under Emacs on the same machine pulls in local and network images fine.
>>
>> Does anyone either have this working as the default or even using a
>> toggle ("T") to enable images one message at time?
>
> I use (with shr):
>
> (defun dme:notmuch-show-refresh-show-images ()
> "Refresh the current buffer with external images enabled."
> (interactive)
> (make-local-variable 'notmuch-show-text/html-blocked-images)
> (setq notmuch-show-text/html-blocked-images nil)
How does let-bind differ with the above ?
> (notmuch-show-refresh-view))
> (define-key notmuch-show-mode-map "I" 'dme:notmuch-show-refresh-show-images)
>
Tomi
>>
>> Thanks in advance,
>>
>> Jonathan
>>
>> David Bremner <david@tethera.net> writes:
>>
>>> jao <jao@gnu.org> writes:
>>>
>>>> When mm-text-html-renderer is set to 'w3m, the variable playing the
>>>> role of a regular expression for blocked images is
>>>> w3m-ignored-image-url-regexp. We bind it when the renderer is not
>>>> 'shr.
>>>> ---
>>> applied to master
>>> _______________________________________________
>>> 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
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs: honour notmuch-show-text/html-blocked-images in w3m messages
2021-08-19 9:54 ` Tomi Ollila
@ 2021-08-19 10:16 ` David Edmondson
0 siblings, 0 replies; 7+ messages in thread
From: David Edmondson @ 2021-08-19 10:16 UTC (permalink / raw)
To: Tomi Ollila, Jonathan Wilner, David Bremner, jao, notmuch; +Cc: jao
On Thursday, 2021-08-19 at 12:54:51 +03, Tomi Ollila wrote:
> On Tue, Aug 17 2021, David Edmondson wrote:
>
>> On Tuesday, 2021-08-17 at 09:07:53 -07, Jonathan Wilner wrote:
>>
>>> Apologies in advance for thread-jacking this patch !
>>>
>>> No matter what I try to do, I can't configure notmuch/emacs to show
>>> any inline images. That's using any of the renderer options, from shr
>>> to the various w3ms, other than html2text. I've set every possible
>>> variable to allow things, to no avail.
>>>
>>> Using w3m under Emacs on the same machine pulls in local and network images fine.
>>>
>>> Does anyone either have this working as the default or even using a
>>> toggle ("T") to enable images one message at time?
>>
>> I use (with shr):
>>
>> (defun dme:notmuch-show-refresh-show-images ()
>> "Refresh the current buffer with external images enabled."
>> (interactive)
>> (make-local-variable 'notmuch-show-text/html-blocked-images)
>> (setq notmuch-show-text/html-blocked-images nil)
>
> How does let-bind differ with the above ?
It would be fine.
>> (notmuch-show-refresh-view))
>> (define-key notmuch-show-mode-map "I" 'dme:notmuch-show-refresh-show-images)
>>
>
> Tomi
>
>>>
>>> Thanks in advance,
>>>
>>> Jonathan
>>>
>>> David Bremner <david@tethera.net> writes:
>>>
>>>> jao <jao@gnu.org> writes:
>>>>
>>>>> When mm-text-html-renderer is set to 'w3m, the variable playing the
>>>>> role of a regular expression for blocked images is
>>>>> w3m-ignored-image-url-regexp. We bind it when the renderer is not
>>>>> 'shr.
>>>>> ---
>>>> applied to master
>>>> _______________________________________________
>>>> 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
>> _______________________________________________
>> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-08-19 10:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-04 0:02 [PATCH] emacs: honour notmuch-show-text/html-blocked-images in w3m messages jao
2021-08-04 1:59 ` David Bremner
2021-08-17 16:07 ` Jonathan Wilner
2021-08-17 16:32 ` David Edmondson
2021-08-17 16:39 ` Jonathan Wilner
2021-08-19 9:54 ` Tomi Ollila
2021-08-19 10:16 ` David Edmondson
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).