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.
This commit is contained in:
parent
2e306b392b
commit
70041e9ae7
8 changed files with 93 additions and 37 deletions
|
|
@ -1,3 +1,37 @@
|
|||
2010-12-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* gnus-group.el (gnus-group-delete-articles): New command.
|
||||
|
||||
2010-12-17 Andrew Cohen <cohen@andy.bu.edu>
|
||||
|
||||
* nnir.el (nnir-mode): Make sure 'gnus-registry-install is bound.
|
||||
|
||||
2010-12-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* 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.
|
||||
|
||||
* nnimap.el (nnimap-retrieve-headers): Remove CRLF from the headers.
|
||||
|
||||
2010-12-17 Julien Danjou <julien@danjou.info>
|
||||
|
||||
* gnus-util.el (gnus-rescale-image): Allow to resize images even if
|
||||
they are from file. Can also scale up.
|
||||
|
||||
2010-12-17 Andrew Cohen <cohen@andy.bu.edu>
|
||||
|
||||
* gnus-sum.el (gnus-summary-refer-thread): Simplify code. Restore
|
||||
gnus-use-agent.
|
||||
(gnus-get-newsgroup-headers): Avoid unwanted spaces at eol.
|
||||
|
||||
* nnir.el (nnir-get-active): Ignore nnir-ignored-newsgroups if null.
|
||||
|
||||
2010-12-17 Julien Danjou <julien@danjou.info>
|
||||
|
||||
* gravatar.el (gravatar-retrieve-synchronously): New function.
|
||||
(gravatar-get-data): Make more robust.
|
||||
|
||||
2010-12-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* nnimap.el (nnimap-wait-for-response): Fix the end-point calculation
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ If nil, default to `gravatar-size'."
|
|||
(let* ((mail-extr-disable-voodoo t)
|
||||
(addresses (mail-extract-address-components
|
||||
(or (mail-fetch-field header) "") t))
|
||||
(gravatar-size gnus-gravatar-size)
|
||||
(gravatar-size (or gnus-gravatar-size gravatar-size))
|
||||
name)
|
||||
(dolist (address addresses)
|
||||
(when (and (setq name (car address))
|
||||
|
|
|
|||
|
|
@ -2734,6 +2734,15 @@ server."
|
|||
(lambda (group)
|
||||
(gnus-group-delete-group group nil t))))))
|
||||
|
||||
(defun gnus-group-delete-articles (group)
|
||||
"Delete all articles in the current group."
|
||||
(interactive (list (gnus-group-group-name)))
|
||||
(let ((articles (gnus-uncompress-range (gnus-active group))))
|
||||
(when (gnus-yes-or-no-p
|
||||
(format "Do you really want to delete these %d articles forever? "
|
||||
(length articles)))
|
||||
(gnus-request-expire-articles articles group 'force))))
|
||||
|
||||
(defun gnus-group-delete-group (group &optional force no-prompt)
|
||||
"Delete the current group. Only meaningful with editable groups.
|
||||
If FORCE (the prefix) is non-nil, all the articles in the group will
|
||||
|
|
|
|||
|
|
@ -8868,30 +8868,27 @@ fetch what's specified by the `gnus-refer-thread-limit'
|
|||
variable."
|
||||
(interactive "P")
|
||||
(gnus-warp-to-article)
|
||||
(let ((id (mail-header-id (gnus-summary-article-header)))
|
||||
(gnus-inhibit-demon t)
|
||||
(gnus-agent nil)
|
||||
(gnus-summary-ignore-duplicates t)
|
||||
(gnus-read-all-available-headers t)
|
||||
(limit (if limit (prefix-numeric-value limit)
|
||||
gnus-refer-thread-limit)))
|
||||
(let* ((header (gnus-summary-article-header))
|
||||
(id (mail-header-id header))
|
||||
(gnus-inhibit-demon t)
|
||||
(gnus-summary-ignore-duplicates t)
|
||||
(gnus-read-all-available-headers t)
|
||||
(limit (if limit (prefix-numeric-value limit)
|
||||
gnus-refer-thread-limit)))
|
||||
(setq gnus-newsgroup-headers
|
||||
(gnus-merge
|
||||
'list gnus-newsgroup-headers
|
||||
(if (gnus-check-backend-function
|
||||
'request-thread gnus-newsgroup-name)
|
||||
(gnus-request-thread (gnus-summary-article-header))
|
||||
(gnus-request-thread header)
|
||||
(let* ((last (if (numberp limit)
|
||||
(min (+ (mail-header-number
|
||||
(gnus-summary-article-header))
|
||||
(min (+ (mail-header-number header)
|
||||
limit)
|
||||
gnus-newsgroup-highest)
|
||||
gnus-newsgroup-highest))
|
||||
(subject (gnus-simplify-subject
|
||||
(mail-header-subject
|
||||
(gnus-summary-article-header))))
|
||||
(refs (split-string (or (mail-header-references
|
||||
(gnus-summary-article-header))
|
||||
(mail-header-subject header)))
|
||||
(refs (split-string (or (mail-header-references header)
|
||||
"")))
|
||||
(gnus-parse-headers-hook
|
||||
(lambda () (goto-char (point-min))
|
||||
|
|
|
|||
|
|
@ -1983,21 +1983,16 @@ empty directories from OLD-PATH."
|
|||
"Rescale IMAGE to SIZE if possible.
|
||||
SIZE is in format (WIDTH . HEIGHT). Return a new image.
|
||||
Sizes are in pixels."
|
||||
(if (or (not (fboundp 'imagemagick-types))
|
||||
(not (get-buffer-window (current-buffer))))
|
||||
image
|
||||
(when (fboundp 'imagemagick-types)
|
||||
(let ((new-width (car size))
|
||||
(new-height (cdr size)))
|
||||
(when (> (cdr (image-size image t)) new-height)
|
||||
(setq image (or (create-image (plist-get (cdr image) :data) 'imagemagick t
|
||||
:height new-height)
|
||||
image)))
|
||||
(when (> (car (image-size image t)) new-width)
|
||||
(setq image (or
|
||||
(create-image (plist-get (cdr image) :data) 'imagemagick t
|
||||
:width new-width)
|
||||
image)))
|
||||
image)))
|
||||
(unless (= (cdr (image-size image t)) new-height)
|
||||
(setcdr image (plist-put (cdr image) :type 'imagemagick))
|
||||
(setcdr image (plist-put (cdr image) :height new-height)))
|
||||
(unless (= (car (image-size image t)) new-width)
|
||||
(setcdr image (plist-put (cdr image) :type 'imagemagick))
|
||||
(setcdr image (plist-put (cdr image) :width new-width)))))
|
||||
image)
|
||||
|
||||
(defun gnus-list-memq-of-list (elements list)
|
||||
"Return non-nil if any of the members of ELEMENTS are in LIST."
|
||||
|
|
|
|||
|
|
@ -78,10 +78,11 @@
|
|||
|
||||
(defun gravatar-get-data ()
|
||||
"Get data from current buffer."
|
||||
(when (string-match "^HTTP/.+ 200 OK$"
|
||||
(buffer-substring (point-min) (line-end-position)))
|
||||
(when (search-forward "\n\n" nil t)
|
||||
(buffer-substring (point) (point-max)))))
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward "^HTTP/.+ 200 OK$" nil (line-end-position))
|
||||
(when (search-forward "\n\n" nil t)
|
||||
(buffer-substring (point) (point-max))))))
|
||||
|
||||
(eval-and-compile
|
||||
(cond ((featurep 'xemacs)
|
||||
|
|
@ -98,7 +99,7 @@
|
|||
If no image available, return 'error."
|
||||
(let ((data (gravatar-get-data)))
|
||||
(if data
|
||||
(gravatar-create-image data nil t)
|
||||
(gravatar-create-image data nil t)
|
||||
'error)))
|
||||
|
||||
;;;###autoload
|
||||
|
|
@ -117,6 +118,23 @@ You can provide a list of argument to pass to CB in CBARGS."
|
|||
(gravatar-data->image))
|
||||
cbargs))))
|
||||
|
||||
;;;###autoload
|
||||
(defun gravatar-retrieve-synchronously (mail-address)
|
||||
"Retrieve MAIL-ADDRESS gravatar and returns it."
|
||||
(let ((url (gravatar-build-url mail-address)))
|
||||
(if (gravatar-cache-expired url)
|
||||
(with-current-buffer (url-retrieve-synchronously url)
|
||||
(when gravatar-automatic-caching
|
||||
(url-store-in-cache (current-buffer)))
|
||||
(let ((data (gravatar-data->image)))
|
||||
(kill-buffer (current-buffer))
|
||||
data))
|
||||
(with-temp-buffer
|
||||
(mm-disable-multibyte)
|
||||
(url-cache-extract (url-cache-create-filename url))
|
||||
(gravatar-data->image)))))
|
||||
|
||||
|
||||
(defun gravatar-retrieved (status cb &optional cbargs)
|
||||
"Callback function used by `gravatar-retrieve'."
|
||||
;; Store gravatar?
|
||||
|
|
|
|||
|
|
@ -167,7 +167,8 @@ textual parts.")
|
|||
(nnimap-article-ranges (gnus-compress-sequence articles))
|
||||
(nnimap-header-parameters))
|
||||
t)
|
||||
(nnimap-transform-headers))
|
||||
(nnimap-transform-headers)
|
||||
(nnheader-remove-cr-followed-by-lf))
|
||||
(insert-buffer-substring
|
||||
(nnimap-find-process-buffer (current-buffer))))
|
||||
'headers))
|
||||
|
|
@ -1568,7 +1569,7 @@ textual parts.")
|
|||
(min
|
||||
(- (point) 500)
|
||||
(save-excursion
|
||||
(forward-line -1)
|
||||
(forward-line -3)
|
||||
(point))))
|
||||
(point-min))
|
||||
t)))
|
||||
|
|
|
|||
|
|
@ -1543,7 +1543,8 @@ server is of form 'backend:name'."
|
|||
(let ((cur (current-buffer))
|
||||
name)
|
||||
(goto-char (point-min))
|
||||
(unless (string= nnir-ignored-newsgroups "")
|
||||
(unless (or (null nnir-ignored-newsgroups)
|
||||
(string= nnir-ignored-newsgroups ""))
|
||||
(delete-matching-lines nnir-ignored-newsgroups))
|
||||
(if (eq (car method) 'nntp)
|
||||
(while (not (eobp))
|
||||
|
|
@ -1589,7 +1590,8 @@ server is of form 'backend:name'."
|
|||
(when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir)
|
||||
(setq gnus-summary-line-format
|
||||
(or nnir-summary-line-format gnus-summary-line-format))
|
||||
(when (eq gnus-registry-install t)
|
||||
(when (and (boundp 'gnus-registry-install)
|
||||
(eq gnus-registry-install t))
|
||||
(remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t)
|
||||
(remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t)
|
||||
(remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue