[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21650: fix should be underneath MH-E
From: |
Katsumi Yamaoka |
Subject: |
bug#21650: fix should be underneath MH-E |
Date: |
Thu, 04 Feb 2016 15:09:43 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (i686-pc-cygwin) |
On Wed, 03 Feb 2016 19:58:46 -0800, Mike Kupfer wrote:
> Bill Wohler wrote:
>> Katsumi Yamaoka <yamaoka@jpl.org> wrote:
>>> My solution is below. Tested briefly. This patch moves the
>>> binding of shr-inhibit-images and shr-blocked-images to Gnus
>>> from mm. So, MH-E has to do a similar thing.
>>
>> I disagree. This only works for shr and defeats encapsulation.
> I think what makes this a non-trivial problem is wanting more
> flexibility than just a binary yes-no decision, which is what
> mm-inline-text-html-with-images currently provides. That's why
> gnus-blocked-images is a regexp (or a function that returns a regexp).
> Could mm-inline-text-html-with-images be generalized to be more like
> gnus-blocked-images? (For example, nil means don't retrieve anything, t
> means retrieve everything, a string would be a regexp of what URLs will
> be retrieved.) Then shr could use mm-inline-text-html-with-images
> instead of shr-blocked-images, and MH-E users would have a single knob
> that could control any of the different rendering back-ends.
Ok, I was too near-sighted yesterday. Here is a second try:
Implement the new user options in mm:
`mm-html-inhibit-images' --- boolean
Non-nil means inhibit displaying of images inline in the article body.
The default is t.
`mm-html-blocked-images' --- regexp or nil
Regexp matching image URLs to be blocked. The default is "".
Make `mm-inline-text-html-with-images' an obsolete variable alias
for `mm-html-inhibit-images'.
How Gnus does when calling an mm function:
(defun gnus-function ()
(let ((mm-html-inhibit-images gnus-inhibit-images)
(mm-html-blocked-images (with-current-buffer gnus-summary-buffer
(gnus-blocked-images))))
(mm-function)))
MH-E doesn't have to do like this if there's no need to have
options like `mh-inhibit-images'.
That's all. Is this the right approach?
In Gnus, shr and gnus-html are controlled by both inhibit-images
and blocked-images, and w3m is controlled by only inhibit-images.
MH-E doesn't use gnus-html.el, does it? As for mm-shr, it would
have to be changed into:
--- mm-decode.el~ 2016-01-04 22:05:27.255542500 +0000
+++ mm-decode.el 2016-02-04 06:05:08.419602200 +0000
@@ -1846,11 +1846,5 @@
(buffer-string))))))
- shr-inhibit-images shr-blocked-images charset char)
- (if (and (boundp 'gnus-summary-buffer)
- (bufferp gnus-summary-buffer)
- (buffer-name gnus-summary-buffer))
- (with-current-buffer gnus-summary-buffer
- (setq shr-inhibit-images gnus-inhibit-images
- shr-blocked-images (gnus-blocked-images)))
- (setq shr-inhibit-images gnus-inhibit-images
- shr-blocked-images (gnus-blocked-images)))
+ (shr-inhibit-images mm-html-inhibit-images)
+ (shr-blocked-images mm-html-blocked-images)
+ charset char)
(unless handle
- bug#21650: fix should be underneath MH-E, Mike Kupfer, 2016/02/01
- bug#21650: fix should be underneath MH-E, Glenn Morris, 2016/02/02
- bug#21650: fix should be underneath MH-E, Katsumi Yamaoka, 2016/02/02
- bug#21650: fix should be underneath MH-E, Glenn Morris, 2016/02/02
- bug#21650: fix should be underneath MH-E, Katsumi Yamaoka, 2016/02/02
- bug#21650: fix should be underneath MH-E, Lars Ingebrigtsen, 2016/02/02
- bug#21650: fix should be underneath MH-E, Katsumi Yamaoka, 2016/02/03
- bug#21650: fix should be underneath MH-E, Bill Wohler, 2016/02/03
- bug#21650: fix should be underneath MH-E, Mike Kupfer, 2016/02/03
- Message not available
- bug#21650: fix should be underneath MH-E,
Katsumi Yamaoka <=
- bug#21650: fix should be underneath MH-E, Mike Kupfer, 2016/02/04
- Message not available
- bug#21650: fix should be underneath MH-E, Katsumi Yamaoka, 2016/02/05
- Message not available
- bug#21650: fix should be underneath MH-E, Katsumi Yamaoka, 2016/02/05
- bug#21650: fix should be underneath MH-E, Mike Kupfer, 2016/02/06
- Message not available
- bug#21650: fix should be underneath MH-E, Katsumi Yamaoka, 2016/02/08
- bug#21650: fix should be underneath MH-E, Mike Kupfer, 2016/02/08
- Message not available
- bug#21650: fix should be underneath MH-E, Katsumi Yamaoka, 2016/02/08
- bug#21650: fix should be underneath MH-E, Mike Kupfer, 2016/02/08
- Message not available
- bug#21650: fix should be underneath MH-E, Katsumi Yamaoka, 2016/02/08
- bug#21650: fix should be underneath MH-E, Bill Wohler, 2016/02/09