mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-17 17:58:46 +00:00
Support a new variable shr-ignore-cache' to re-fetch images when hitting
g' in Gnus.
gnus-sum.el (gnus-summary-show-article): Bind `shr-ignore-cache' to re-fetch images. shr.el (shr-tag-img): Support a new variable `shr-ignore-cache' to re-fetch images when hitting `g' in Gnus.
This commit is contained in:
parent
b02ba905b4
commit
728518c3e4
@ -1,3 +1,11 @@
|
||||
2011-09-24 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* gnus-sum.el (gnus-summary-show-article): Bind `shr-ignore-cache' to
|
||||
re-fetch images.
|
||||
|
||||
* shr.el (shr-tag-img): Support a new variable `shr-ignore-cache' to
|
||||
re-fetch images when hitting `g' in Gnus.
|
||||
|
||||
2011-09-22 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* mml.el (mml-inhibit-compute-boundary): New internal variable.
|
||||
|
@ -9611,8 +9611,10 @@ C-u g', show the raw article."
|
||||
(when (gnus-summary-goto-subject (cdr gnus-article-current) nil t)
|
||||
(gnus-summary-update-secondary-mark (cdr gnus-article-current))))))
|
||||
((not arg)
|
||||
;; Select the article the normal way.
|
||||
(gnus-summary-select-article nil 'force))
|
||||
(require 'shr)
|
||||
(let ((shr-ignore-cache t))
|
||||
;; Select the article the normal way.
|
||||
(gnus-summary-select-article nil 'force)))
|
||||
((equal arg '(16))
|
||||
;; C-u C-u g
|
||||
(let ((gnus-inhibit-article-treatments t))
|
||||
|
@ -112,6 +112,7 @@ cid: URL as the argument.")
|
||||
(defvar shr-table-depth 0)
|
||||
(defvar shr-stylesheet nil)
|
||||
(defvar shr-base nil)
|
||||
(defvar shr-ignore-cache nil)
|
||||
|
||||
(defvar shr-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
@ -896,10 +897,16 @@ ones, in case fg and bg are nil."
|
||||
(if (> (string-width alt) 8)
|
||||
(shr-insert (truncate-string-to-width alt 8))
|
||||
(shr-insert alt))))
|
||||
((url-is-cached (shr-encode-url url))
|
||||
((and (not shr-ignore-cache)
|
||||
(url-is-cached (shr-encode-url url)))
|
||||
(funcall shr-put-image-function (shr-get-image-data url) alt))
|
||||
(t
|
||||
(insert alt)
|
||||
(when (and shr-ignore-cache
|
||||
(url-is-cached (shr-encode-url url)))
|
||||
(let ((file (url-cache-create-filename (shr-encode-url url))))
|
||||
(when (file-exists-p file)
|
||||
(delete-file file))))
|
||||
(funcall
|
||||
(if (fboundp 'url-queue-retrieve)
|
||||
'url-queue-retrieve
|
||||
|
Loading…
Reference in New Issue
Block a user