mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
gnus-agent.el: Change the default so that nnimap methods aren't agentized by default. There's apparently many problems related to agent/imap behaviour; gnus-art.el: Don't reuse the 'gnus-data text property, but use a new property. This avoids stomping over other functions that use this for other things; gnus-html.el: Add a new `i' command to insert images.
This commit is contained in:
parent
7426b4f7d0
commit
10e91ca982
4 changed files with 46 additions and 11 deletions
|
|
@ -1,5 +1,13 @@
|
|||
2010-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* gnus-html.el (gnus-html-put-image): Allow images to be removed.
|
||||
(gnus-html-wash-tags): Add a new `i' command to insert images.
|
||||
(gnus-html-insert-image): New command and keystroke.
|
||||
|
||||
* gnus-agent.el (gnus-agent-auto-agentize-methods): Change the default
|
||||
so that nnimap methods aren't agentized by default. There's apparently
|
||||
many problems related to agent/imap behaviour.
|
||||
|
||||
* gnus-art.el (gnus-article-copy-string): New command and key binding.
|
||||
|
||||
* gnus-html.el: Doc fix.
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ When found, offer to remove them."
|
|||
:type 'boolean
|
||||
:group 'gnus-agent)
|
||||
|
||||
(defcustom gnus-agent-auto-agentize-methods '(nntp nnimap)
|
||||
(defcustom gnus-agent-auto-agentize-methods '(nntp)
|
||||
"Initially, all servers from these methods are agentized.
|
||||
The user may remove or add servers using the Server buffer.
|
||||
See Info node `(gnus)Server Buffer'."
|
||||
|
|
|
|||
|
|
@ -7832,8 +7832,8 @@ specified by `gnus-button-alist'."
|
|||
'gnus-button-push from)
|
||||
(gnus-put-text-property
|
||||
start end
|
||||
'gnus-data (buffer-substring-no-properties
|
||||
start end))))))))))
|
||||
'gnus-string (buffer-substring-no-properties
|
||||
start end))))))))))
|
||||
|
||||
(defun gnus-article-extend-url-button (beg start end)
|
||||
"Extend url button if url is folded into two or more lines.
|
||||
|
|
@ -7945,7 +7945,7 @@ url is put as the `gnus-button-url' overlay property on the button."
|
|||
"Copy the string in the button to the kill ring."
|
||||
(interactive)
|
||||
(gnus-article-check-buffer)
|
||||
(let ((data (get-text-property (point) 'gnus-data)))
|
||||
(let ((data (get-text-property (point) 'gnus-string)))
|
||||
(when data
|
||||
(with-temp-buffer
|
||||
(insert data)
|
||||
|
|
|
|||
|
|
@ -66,6 +66,12 @@ fit these criteria."
|
|||
:group 'gnus-art
|
||||
:type 'float)
|
||||
|
||||
(defvar gnus-html-image-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map "u" 'gnus-article-copy-string)
|
||||
(define-key map "i" 'gnus-html-insert-image)
|
||||
map))
|
||||
|
||||
;;;###autoload
|
||||
(defun gnus-article-html (handle)
|
||||
(let ((article-buffer (current-buffer)))
|
||||
|
|
@ -142,12 +148,24 @@ fit these criteria."
|
|||
(delete-region start end)
|
||||
(gnus-put-image image (gnus-string-or string "*")))))
|
||||
;; Normal, external URL.
|
||||
(unless (gnus-html-image-url-blocked-p
|
||||
url
|
||||
(if (buffer-live-p gnus-summary-buffer)
|
||||
(with-current-buffer gnus-summary-buffer
|
||||
gnus-blocked-images)
|
||||
gnus-blocked-images))
|
||||
(if (gnus-html-image-url-blocked-p
|
||||
url
|
||||
(if (buffer-live-p gnus-summary-buffer)
|
||||
(with-current-buffer gnus-summary-buffer
|
||||
gnus-blocked-images)
|
||||
gnus-blocked-images))
|
||||
(progn
|
||||
(widget-convert-button
|
||||
'link start end
|
||||
:action 'gnus-html-insert-image
|
||||
:help-echo url
|
||||
:keymap gnus-html-image-map
|
||||
:button-keymap gnus-html-image-map)
|
||||
(gnus-put-text-property
|
||||
start end
|
||||
'gnus-image (list url
|
||||
(set-marker (make-marker) start)
|
||||
(set-marker (make-marker) end))))
|
||||
(let ((file (gnus-html-image-id url))
|
||||
width height)
|
||||
(when (string-match "height=\"?\\([0-9]+\\)" parameters)
|
||||
|
|
@ -184,6 +202,7 @@ fit these criteria."
|
|||
(let ((overlay (gnus-make-overlay start end)))
|
||||
(gnus-overlay-put overlay 'evaporate t)
|
||||
(gnus-overlay-put overlay 'gnus-button-url url)
|
||||
(gnus-put-text-property start end 'gnus-string url)
|
||||
(when gnus-article-mouse-face
|
||||
(gnus-overlay-put overlay 'mouse-face gnus-article-mouse-face)))))
|
||||
;; The upper-case IMG_ALT is apparently just an artifact that
|
||||
|
|
@ -202,6 +221,12 @@ fit these criteria."
|
|||
(when images
|
||||
(gnus-html-schedule-image-fetching (current-buffer) (nreverse images)))))
|
||||
|
||||
(defun gnus-html-insert-image ()
|
||||
"Fetch and insert the image under point."
|
||||
(interactive)
|
||||
(gnus-html-schedule-image-fetching
|
||||
(current-buffer) (list (get-text-property (point) 'gnus-image))))
|
||||
|
||||
(defun gnus-html-schedule-image-fetching (buffer images)
|
||||
(gnus-message 8 "gnus-html-schedule-image-fetching: buffer %s, images %s"
|
||||
buffer images)
|
||||
|
|
@ -268,7 +293,9 @@ fit these criteria."
|
|||
(= (cdr size) 30))))
|
||||
(progn
|
||||
(gnus-put-image (gnus-html-rescale-image image file size)
|
||||
(gnus-string-or string "*"))
|
||||
(gnus-string-or string "*")
|
||||
'external)
|
||||
(gnus-add-image 'external image)
|
||||
t)
|
||||
(insert string)
|
||||
(when (fboundp 'find-image)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue