diff options
| author | Gnus developers | 2010-12-17 22:45:16 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-12-17 22:45:16 +0000 |
| commit | 70041e9ae7072eac5eeff2b5e1a50d9eab6b39f7 (patch) | |
| tree | 44e4cfef0c6fd744f917684171cf57574690d37f | |
| parent | 2e306b392b3d517bcbee818e2be1335fce012d48 (diff) | |
| download | emacs-70041e9ae7072eac5eeff2b5e1a50d9eab6b39f7.tar.gz emacs-70041e9ae7072eac5eeff2b5e1a50d9eab6b39f7.zip | |
Merge changes made in Gnus trunk.
nnir.el (nnir-get-active): Ignore nnir-ignored-newsgroups if null.
gnus-sum.el (gnus-summary-refer-thread): Simplify code. Restore gnus-use-agent.
(gnus-get-newsgroup-headers): Avoid unwanted spaces at eol.
gravatar.el (gravatar-retrieve-synchronously): New function.
(gravatar-get-data): Make more robust.
gnus-util.el (gnus-rescale-image): Allow to resize images even if they are from file. Can also scale up.
nnimap.el (nnimap-retrieve-headers): Remove CRLF from the headers.
nnir.el (nnir-mode): Make sure 'gnus-registry-install is bound.
gnus-sum.el (gnus-get-newsgroup-headers): Revert the last change here, since it's up to the backends to do CRLF removal if their protocol has it.
gnus-group.el (gnus-group-delete-articles): New command.
| -rw-r--r-- | lisp/gnus/ChangeLog | 34 | ||||
| -rw-r--r-- | lisp/gnus/gnus-gravatar.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-group.el | 9 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 25 | ||||
| -rw-r--r-- | lisp/gnus/gnus-util.el | 21 | ||||
| -rw-r--r-- | lisp/gnus/gravatar.el | 28 | ||||
| -rw-r--r-- | lisp/gnus/nnimap.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/nnir.el | 6 |
8 files changed, 93 insertions, 37 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index b725a688fe6..c79a6d7f219 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,37 @@ | |||
| 1 | 2010-12-17 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * gnus-group.el (gnus-group-delete-articles): New command. | ||
| 4 | |||
| 5 | 2010-12-17 Andrew Cohen <cohen@andy.bu.edu> | ||
| 6 | |||
| 7 | * nnir.el (nnir-mode): Make sure 'gnus-registry-install is bound. | ||
| 8 | |||
| 9 | 2010-12-17 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 10 | |||
| 11 | * gnus-sum.el (gnus-get-newsgroup-headers): Revert the last change | ||
| 12 | here, since it's up to the backends to do CRLF removal if their | ||
| 13 | protocol has it. | ||
| 14 | |||
| 15 | * nnimap.el (nnimap-retrieve-headers): Remove CRLF from the headers. | ||
| 16 | |||
| 17 | 2010-12-17 Julien Danjou <julien@danjou.info> | ||
| 18 | |||
| 19 | * gnus-util.el (gnus-rescale-image): Allow to resize images even if | ||
| 20 | they are from file. Can also scale up. | ||
| 21 | |||
| 22 | 2010-12-17 Andrew Cohen <cohen@andy.bu.edu> | ||
| 23 | |||
| 24 | * gnus-sum.el (gnus-summary-refer-thread): Simplify code. Restore | ||
| 25 | gnus-use-agent. | ||
| 26 | (gnus-get-newsgroup-headers): Avoid unwanted spaces at eol. | ||
| 27 | |||
| 28 | * nnir.el (nnir-get-active): Ignore nnir-ignored-newsgroups if null. | ||
| 29 | |||
| 30 | 2010-12-17 Julien Danjou <julien@danjou.info> | ||
| 31 | |||
| 32 | * gravatar.el (gravatar-retrieve-synchronously): New function. | ||
| 33 | (gravatar-get-data): Make more robust. | ||
| 34 | |||
| 1 | 2010-12-16 Lars Magne Ingebrigtsen <larsi@gnus.org> | 35 | 2010-12-16 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 36 | ||
| 3 | * nnimap.el (nnimap-wait-for-response): Fix the end-point calculation | 37 | * nnimap.el (nnimap-wait-for-response): Fix the end-point calculation |
diff --git a/lisp/gnus/gnus-gravatar.el b/lisp/gnus/gnus-gravatar.el index 1bd64e9533f..2b1143b3b7b 100644 --- a/lisp/gnus/gnus-gravatar.el +++ b/lisp/gnus/gnus-gravatar.el | |||
| @@ -56,7 +56,7 @@ If nil, default to `gravatar-size'." | |||
| 56 | (let* ((mail-extr-disable-voodoo t) | 56 | (let* ((mail-extr-disable-voodoo t) |
| 57 | (addresses (mail-extract-address-components | 57 | (addresses (mail-extract-address-components |
| 58 | (or (mail-fetch-field header) "") t)) | 58 | (or (mail-fetch-field header) "") t)) |
| 59 | (gravatar-size gnus-gravatar-size) | 59 | (gravatar-size (or gnus-gravatar-size gravatar-size)) |
| 60 | name) | 60 | name) |
| 61 | (dolist (address addresses) | 61 | (dolist (address addresses) |
| 62 | (when (and (setq name (car address)) | 62 | (when (and (setq name (car address)) |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 73eeb7104ca..9ce4f86f3ab 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -2734,6 +2734,15 @@ server." | |||
| 2734 | (lambda (group) | 2734 | (lambda (group) |
| 2735 | (gnus-group-delete-group group nil t)))))) | 2735 | (gnus-group-delete-group group nil t)))))) |
| 2736 | 2736 | ||
| 2737 | (defun gnus-group-delete-articles (group) | ||
| 2738 | "Delete all articles in the current group." | ||
| 2739 | (interactive (list (gnus-group-group-name))) | ||
| 2740 | (let ((articles (gnus-uncompress-range (gnus-active group)))) | ||
| 2741 | (when (gnus-yes-or-no-p | ||
| 2742 | (format "Do you really want to delete these %d articles forever? " | ||
| 2743 | (length articles))) | ||
| 2744 | (gnus-request-expire-articles articles group 'force)))) | ||
| 2745 | |||
| 2737 | (defun gnus-group-delete-group (group &optional force no-prompt) | 2746 | (defun gnus-group-delete-group (group &optional force no-prompt) |
| 2738 | "Delete the current group. Only meaningful with editable groups. | 2747 | "Delete the current group. Only meaningful with editable groups. |
| 2739 | If FORCE (the prefix) is non-nil, all the articles in the group will | 2748 | If FORCE (the prefix) is non-nil, all the articles in the group will |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index ceaa014363a..1966e4af6c9 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -8868,30 +8868,27 @@ fetch what's specified by the `gnus-refer-thread-limit' | |||
| 8868 | variable." | 8868 | variable." |
| 8869 | (interactive "P") | 8869 | (interactive "P") |
| 8870 | (gnus-warp-to-article) | 8870 | (gnus-warp-to-article) |
| 8871 | (let ((id (mail-header-id (gnus-summary-article-header))) | 8871 | (let* ((header (gnus-summary-article-header)) |
| 8872 | (gnus-inhibit-demon t) | 8872 | (id (mail-header-id header)) |
| 8873 | (gnus-agent nil) | 8873 | (gnus-inhibit-demon t) |
| 8874 | (gnus-summary-ignore-duplicates t) | 8874 | (gnus-summary-ignore-duplicates t) |
| 8875 | (gnus-read-all-available-headers t) | 8875 | (gnus-read-all-available-headers t) |
| 8876 | (limit (if limit (prefix-numeric-value limit) | 8876 | (limit (if limit (prefix-numeric-value limit) |
| 8877 | gnus-refer-thread-limit))) | 8877 | gnus-refer-thread-limit))) |
| 8878 | (setq gnus-newsgroup-headers | 8878 | (setq gnus-newsgroup-headers |
| 8879 | (gnus-merge | 8879 | (gnus-merge |
| 8880 | 'list gnus-newsgroup-headers | 8880 | 'list gnus-newsgroup-headers |
| 8881 | (if (gnus-check-backend-function | 8881 | (if (gnus-check-backend-function |
| 8882 | 'request-thread gnus-newsgroup-name) | 8882 | 'request-thread gnus-newsgroup-name) |
| 8883 | (gnus-request-thread (gnus-summary-article-header)) | 8883 | (gnus-request-thread header) |
| 8884 | (let* ((last (if (numberp limit) | 8884 | (let* ((last (if (numberp limit) |
| 8885 | (min (+ (mail-header-number | 8885 | (min (+ (mail-header-number header) |
| 8886 | (gnus-summary-article-header)) | ||
| 8887 | limit) | 8886 | limit) |
| 8888 | gnus-newsgroup-highest) | 8887 | gnus-newsgroup-highest) |
| 8889 | gnus-newsgroup-highest)) | 8888 | gnus-newsgroup-highest)) |
| 8890 | (subject (gnus-simplify-subject | 8889 | (subject (gnus-simplify-subject |
| 8891 | (mail-header-subject | 8890 | (mail-header-subject header))) |
| 8892 | (gnus-summary-article-header)))) | 8891 | (refs (split-string (or (mail-header-references header) |
| 8893 | (refs (split-string (or (mail-header-references | ||
| 8894 | (gnus-summary-article-header)) | ||
| 8895 | ""))) | 8892 | ""))) |
| 8896 | (gnus-parse-headers-hook | 8893 | (gnus-parse-headers-hook |
| 8897 | (lambda () (goto-char (point-min)) | 8894 | (lambda () (goto-char (point-min)) |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index fa4bf076a30..50292f4ff76 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -1983,21 +1983,16 @@ empty directories from OLD-PATH." | |||
| 1983 | "Rescale IMAGE to SIZE if possible. | 1983 | "Rescale IMAGE to SIZE if possible. |
| 1984 | SIZE is in format (WIDTH . HEIGHT). Return a new image. | 1984 | SIZE is in format (WIDTH . HEIGHT). Return a new image. |
| 1985 | Sizes are in pixels." | 1985 | Sizes are in pixels." |
| 1986 | (if (or (not (fboundp 'imagemagick-types)) | 1986 | (when (fboundp 'imagemagick-types) |
| 1987 | (not (get-buffer-window (current-buffer)))) | ||
| 1988 | image | ||
| 1989 | (let ((new-width (car size)) | 1987 | (let ((new-width (car size)) |
| 1990 | (new-height (cdr size))) | 1988 | (new-height (cdr size))) |
| 1991 | (when (> (cdr (image-size image t)) new-height) | 1989 | (unless (= (cdr (image-size image t)) new-height) |
| 1992 | (setq image (or (create-image (plist-get (cdr image) :data) 'imagemagick t | 1990 | (setcdr image (plist-put (cdr image) :type 'imagemagick)) |
| 1993 | :height new-height) | 1991 | (setcdr image (plist-put (cdr image) :height new-height))) |
| 1994 | image))) | 1992 | (unless (= (car (image-size image t)) new-width) |
| 1995 | (when (> (car (image-size image t)) new-width) | 1993 | (setcdr image (plist-put (cdr image) :type 'imagemagick)) |
| 1996 | (setq image (or | 1994 | (setcdr image (plist-put (cdr image) :width new-width))))) |
| 1997 | (create-image (plist-get (cdr image) :data) 'imagemagick t | 1995 | image) |
| 1998 | :width new-width) | ||
| 1999 | image))) | ||
| 2000 | image))) | ||
| 2001 | 1996 | ||
| 2002 | (defun gnus-list-memq-of-list (elements list) | 1997 | (defun gnus-list-memq-of-list (elements list) |
| 2003 | "Return non-nil if any of the members of ELEMENTS are in LIST." | 1998 | "Return non-nil if any of the members of ELEMENTS are in LIST." |
diff --git a/lisp/gnus/gravatar.el b/lisp/gnus/gravatar.el index 50b0ba1d636..c17bd201d2b 100644 --- a/lisp/gnus/gravatar.el +++ b/lisp/gnus/gravatar.el | |||
| @@ -78,10 +78,11 @@ | |||
| 78 | 78 | ||
| 79 | (defun gravatar-get-data () | 79 | (defun gravatar-get-data () |
| 80 | "Get data from current buffer." | 80 | "Get data from current buffer." |
| 81 | (when (string-match "^HTTP/.+ 200 OK$" | 81 | (save-excursion |
| 82 | (buffer-substring (point-min) (line-end-position))) | 82 | (goto-char (point-min)) |
| 83 | (when (search-forward "\n\n" nil t) | 83 | (when (re-search-forward "^HTTP/.+ 200 OK$" nil (line-end-position)) |
| 84 | (buffer-substring (point) (point-max))))) | 84 | (when (search-forward "\n\n" nil t) |
| 85 | (buffer-substring (point) (point-max)))))) | ||
| 85 | 86 | ||
| 86 | (eval-and-compile | 87 | (eval-and-compile |
| 87 | (cond ((featurep 'xemacs) | 88 | (cond ((featurep 'xemacs) |
| @@ -98,7 +99,7 @@ | |||
| 98 | If no image available, return 'error." | 99 | If no image available, return 'error." |
| 99 | (let ((data (gravatar-get-data))) | 100 | (let ((data (gravatar-get-data))) |
| 100 | (if data | 101 | (if data |
| 101 | (gravatar-create-image data nil t) | 102 | (gravatar-create-image data nil t) |
| 102 | 'error))) | 103 | 'error))) |
| 103 | 104 | ||
| 104 | ;;;###autoload | 105 | ;;;###autoload |
| @@ -117,6 +118,23 @@ You can provide a list of argument to pass to CB in CBARGS." | |||
| 117 | (gravatar-data->image)) | 118 | (gravatar-data->image)) |
| 118 | cbargs)))) | 119 | cbargs)))) |
| 119 | 120 | ||
| 121 | ;;;###autoload | ||
| 122 | (defun gravatar-retrieve-synchronously (mail-address) | ||
| 123 | "Retrieve MAIL-ADDRESS gravatar and returns it." | ||
| 124 | (let ((url (gravatar-build-url mail-address))) | ||
| 125 | (if (gravatar-cache-expired url) | ||
| 126 | (with-current-buffer (url-retrieve-synchronously url) | ||
| 127 | (when gravatar-automatic-caching | ||
| 128 | (url-store-in-cache (current-buffer))) | ||
| 129 | (let ((data (gravatar-data->image))) | ||
| 130 | (kill-buffer (current-buffer)) | ||
| 131 | data)) | ||
| 132 | (with-temp-buffer | ||
| 133 | (mm-disable-multibyte) | ||
| 134 | (url-cache-extract (url-cache-create-filename url)) | ||
| 135 | (gravatar-data->image))))) | ||
| 136 | |||
| 137 | |||
| 120 | (defun gravatar-retrieved (status cb &optional cbargs) | 138 | (defun gravatar-retrieved (status cb &optional cbargs) |
| 121 | "Callback function used by `gravatar-retrieve'." | 139 | "Callback function used by `gravatar-retrieve'." |
| 122 | ;; Store gravatar? | 140 | ;; Store gravatar? |
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 34e57b6dc19..acbb091b356 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -167,7 +167,8 @@ textual parts.") | |||
| 167 | (nnimap-article-ranges (gnus-compress-sequence articles)) | 167 | (nnimap-article-ranges (gnus-compress-sequence articles)) |
| 168 | (nnimap-header-parameters)) | 168 | (nnimap-header-parameters)) |
| 169 | t) | 169 | t) |
| 170 | (nnimap-transform-headers)) | 170 | (nnimap-transform-headers) |
| 171 | (nnheader-remove-cr-followed-by-lf)) | ||
| 171 | (insert-buffer-substring | 172 | (insert-buffer-substring |
| 172 | (nnimap-find-process-buffer (current-buffer)))) | 173 | (nnimap-find-process-buffer (current-buffer)))) |
| 173 | 'headers)) | 174 | 'headers)) |
| @@ -1568,7 +1569,7 @@ textual parts.") | |||
| 1568 | (min | 1569 | (min |
| 1569 | (- (point) 500) | 1570 | (- (point) 500) |
| 1570 | (save-excursion | 1571 | (save-excursion |
| 1571 | (forward-line -1) | 1572 | (forward-line -3) |
| 1572 | (point)))) | 1573 | (point)))) |
| 1573 | (point-min)) | 1574 | (point-min)) |
| 1574 | t))) | 1575 | t))) |
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index f2348bf40ad..87377e6c6a9 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el | |||
| @@ -1543,7 +1543,8 @@ server is of form 'backend:name'." | |||
| 1543 | (let ((cur (current-buffer)) | 1543 | (let ((cur (current-buffer)) |
| 1544 | name) | 1544 | name) |
| 1545 | (goto-char (point-min)) | 1545 | (goto-char (point-min)) |
| 1546 | (unless (string= nnir-ignored-newsgroups "") | 1546 | (unless (or (null nnir-ignored-newsgroups) |
| 1547 | (string= nnir-ignored-newsgroups "")) | ||
| 1547 | (delete-matching-lines nnir-ignored-newsgroups)) | 1548 | (delete-matching-lines nnir-ignored-newsgroups)) |
| 1548 | (if (eq (car method) 'nntp) | 1549 | (if (eq (car method) 'nntp) |
| 1549 | (while (not (eobp)) | 1550 | (while (not (eobp)) |
| @@ -1589,7 +1590,8 @@ server is of form 'backend:name'." | |||
| 1589 | (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir) | 1590 | (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir) |
| 1590 | (setq gnus-summary-line-format | 1591 | (setq gnus-summary-line-format |
| 1591 | (or nnir-summary-line-format gnus-summary-line-format)) | 1592 | (or nnir-summary-line-format gnus-summary-line-format)) |
| 1592 | (when (eq gnus-registry-install t) | 1593 | (when (and (boundp 'gnus-registry-install) |
| 1594 | (eq gnus-registry-install t)) | ||
| 1593 | (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t) | 1595 | (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t) |
| 1594 | (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t) | 1596 | (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t) |
| 1595 | (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t) | 1597 | (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t) |