diff options
| -rw-r--r-- | lisp/gnus/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/gnus/gnus-agent.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/gnus-html.el | 41 |
4 files changed, 46 insertions, 11 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 0377808ed7e..8e593d72e65 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,5 +1,13 @@ | |||
| 1 | 2010-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org> | 1 | 2010-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 2 | ||
| 3 | * gnus-html.el (gnus-html-put-image): Allow images to be removed. | ||
| 4 | (gnus-html-wash-tags): Add a new `i' command to insert images. | ||
| 5 | (gnus-html-insert-image): New command and keystroke. | ||
| 6 | |||
| 7 | * gnus-agent.el (gnus-agent-auto-agentize-methods): Change the default | ||
| 8 | so that nnimap methods aren't agentized by default. There's apparently | ||
| 9 | many problems related to agent/imap behaviour. | ||
| 10 | |||
| 3 | * gnus-art.el (gnus-article-copy-string): New command and key binding. | 11 | * gnus-art.el (gnus-article-copy-string): New command and key binding. |
| 4 | 12 | ||
| 5 | * gnus-html.el: Doc fix. | 13 | * gnus-html.el: Doc fix. |
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index fdfb0f1044a..96a62e61552 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el | |||
| @@ -184,7 +184,7 @@ When found, offer to remove them." | |||
| 184 | :type 'boolean | 184 | :type 'boolean |
| 185 | :group 'gnus-agent) | 185 | :group 'gnus-agent) |
| 186 | 186 | ||
| 187 | (defcustom gnus-agent-auto-agentize-methods '(nntp nnimap) | 187 | (defcustom gnus-agent-auto-agentize-methods '(nntp) |
| 188 | "Initially, all servers from these methods are agentized. | 188 | "Initially, all servers from these methods are agentized. |
| 189 | The user may remove or add servers using the Server buffer. | 189 | The user may remove or add servers using the Server buffer. |
| 190 | See Info node `(gnus)Server Buffer'." | 190 | See Info node `(gnus)Server Buffer'." |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 56e78cc5544..944e65dfe8e 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -7832,8 +7832,8 @@ specified by `gnus-button-alist'." | |||
| 7832 | 'gnus-button-push from) | 7832 | 'gnus-button-push from) |
| 7833 | (gnus-put-text-property | 7833 | (gnus-put-text-property |
| 7834 | start end | 7834 | start end |
| 7835 | 'gnus-data (buffer-substring-no-properties | 7835 | 'gnus-string (buffer-substring-no-properties |
| 7836 | start end)))))))))) | 7836 | start end)))))))))) |
| 7837 | 7837 | ||
| 7838 | (defun gnus-article-extend-url-button (beg start end) | 7838 | (defun gnus-article-extend-url-button (beg start end) |
| 7839 | "Extend url button if url is folded into two or more lines. | 7839 | "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." | |||
| 7945 | "Copy the string in the button to the kill ring." | 7945 | "Copy the string in the button to the kill ring." |
| 7946 | (interactive) | 7946 | (interactive) |
| 7947 | (gnus-article-check-buffer) | 7947 | (gnus-article-check-buffer) |
| 7948 | (let ((data (get-text-property (point) 'gnus-data))) | 7948 | (let ((data (get-text-property (point) 'gnus-string))) |
| 7949 | (when data | 7949 | (when data |
| 7950 | (with-temp-buffer | 7950 | (with-temp-buffer |
| 7951 | (insert data) | 7951 | (insert data) |
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index 6687415ec16..4c0d4c0664f 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el | |||
| @@ -66,6 +66,12 @@ fit these criteria." | |||
| 66 | :group 'gnus-art | 66 | :group 'gnus-art |
| 67 | :type 'float) | 67 | :type 'float) |
| 68 | 68 | ||
| 69 | (defvar gnus-html-image-map | ||
| 70 | (let ((map (make-sparse-keymap))) | ||
| 71 | (define-key map "u" 'gnus-article-copy-string) | ||
| 72 | (define-key map "i" 'gnus-html-insert-image) | ||
| 73 | map)) | ||
| 74 | |||
| 69 | ;;;###autoload | 75 | ;;;###autoload |
| 70 | (defun gnus-article-html (handle) | 76 | (defun gnus-article-html (handle) |
| 71 | (let ((article-buffer (current-buffer))) | 77 | (let ((article-buffer (current-buffer))) |
| @@ -142,12 +148,24 @@ fit these criteria." | |||
| 142 | (delete-region start end) | 148 | (delete-region start end) |
| 143 | (gnus-put-image image (gnus-string-or string "*"))))) | 149 | (gnus-put-image image (gnus-string-or string "*"))))) |
| 144 | ;; Normal, external URL. | 150 | ;; Normal, external URL. |
| 145 | (unless (gnus-html-image-url-blocked-p | 151 | (if (gnus-html-image-url-blocked-p |
| 146 | url | 152 | url |
| 147 | (if (buffer-live-p gnus-summary-buffer) | 153 | (if (buffer-live-p gnus-summary-buffer) |
| 148 | (with-current-buffer gnus-summary-buffer | 154 | (with-current-buffer gnus-summary-buffer |
| 149 | gnus-blocked-images) | 155 | gnus-blocked-images) |
| 150 | gnus-blocked-images)) | 156 | gnus-blocked-images)) |
| 157 | (progn | ||
| 158 | (widget-convert-button | ||
| 159 | 'link start end | ||
| 160 | :action 'gnus-html-insert-image | ||
| 161 | :help-echo url | ||
| 162 | :keymap gnus-html-image-map | ||
| 163 | :button-keymap gnus-html-image-map) | ||
| 164 | (gnus-put-text-property | ||
| 165 | start end | ||
| 166 | 'gnus-image (list url | ||
| 167 | (set-marker (make-marker) start) | ||
| 168 | (set-marker (make-marker) end)))) | ||
| 151 | (let ((file (gnus-html-image-id url)) | 169 | (let ((file (gnus-html-image-id url)) |
| 152 | width height) | 170 | width height) |
| 153 | (when (string-match "height=\"?\\([0-9]+\\)" parameters) | 171 | (when (string-match "height=\"?\\([0-9]+\\)" parameters) |
| @@ -184,6 +202,7 @@ fit these criteria." | |||
| 184 | (let ((overlay (gnus-make-overlay start end))) | 202 | (let ((overlay (gnus-make-overlay start end))) |
| 185 | (gnus-overlay-put overlay 'evaporate t) | 203 | (gnus-overlay-put overlay 'evaporate t) |
| 186 | (gnus-overlay-put overlay 'gnus-button-url url) | 204 | (gnus-overlay-put overlay 'gnus-button-url url) |
| 205 | (gnus-put-text-property start end 'gnus-string url) | ||
| 187 | (when gnus-article-mouse-face | 206 | (when gnus-article-mouse-face |
| 188 | (gnus-overlay-put overlay 'mouse-face gnus-article-mouse-face))))) | 207 | (gnus-overlay-put overlay 'mouse-face gnus-article-mouse-face))))) |
| 189 | ;; The upper-case IMG_ALT is apparently just an artifact that | 208 | ;; The upper-case IMG_ALT is apparently just an artifact that |
| @@ -202,6 +221,12 @@ fit these criteria." | |||
| 202 | (when images | 221 | (when images |
| 203 | (gnus-html-schedule-image-fetching (current-buffer) (nreverse images))))) | 222 | (gnus-html-schedule-image-fetching (current-buffer) (nreverse images))))) |
| 204 | 223 | ||
| 224 | (defun gnus-html-insert-image () | ||
| 225 | "Fetch and insert the image under point." | ||
| 226 | (interactive) | ||
| 227 | (gnus-html-schedule-image-fetching | ||
| 228 | (current-buffer) (list (get-text-property (point) 'gnus-image)))) | ||
| 229 | |||
| 205 | (defun gnus-html-schedule-image-fetching (buffer images) | 230 | (defun gnus-html-schedule-image-fetching (buffer images) |
| 206 | (gnus-message 8 "gnus-html-schedule-image-fetching: buffer %s, images %s" | 231 | (gnus-message 8 "gnus-html-schedule-image-fetching: buffer %s, images %s" |
| 207 | buffer images) | 232 | buffer images) |
| @@ -268,7 +293,9 @@ fit these criteria." | |||
| 268 | (= (cdr size) 30)))) | 293 | (= (cdr size) 30)))) |
| 269 | (progn | 294 | (progn |
| 270 | (gnus-put-image (gnus-html-rescale-image image file size) | 295 | (gnus-put-image (gnus-html-rescale-image image file size) |
| 271 | (gnus-string-or string "*")) | 296 | (gnus-string-or string "*") |
| 297 | 'external) | ||
| 298 | (gnus-add-image 'external image) | ||
| 272 | t) | 299 | t) |
| 273 | (insert string) | 300 | (insert string) |
| 274 | (when (fboundp 'find-image) | 301 | (when (fboundp 'find-image) |