Mercurial > emacs
changeset 111669:ed117caa918e
Merge changes made in Gnus trunk.
nnir.el: Fix typo in comments.
(nnir-run-imap): Simplify code. No need to reverse artlist.
(nnir-run-gmane): Use nnir-tmp-buffer for web results.
gnus-srvr.el (gnus-server-show-server): New command and keystroke.
nnimap.el (nnimap-get-capabilities): Refactor out.
(nnimap-open-connection): Re-request capabilities after STARTTLS.
gnus.texi (Server Commands): Document gnus-server-show-server.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Sun, 21 Nov 2010 22:46:16 +0000 |
parents | ccb8652ef52b |
children | f736e5e4fef4 |
files | doc/misc/ChangeLog doc/misc/gnus.texi lisp/gnus/ChangeLog lisp/gnus/gnus-srvr.el lisp/gnus/nnimap.el lisp/gnus/nnir.el |
diffstat | 6 files changed, 53 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/misc/ChangeLog Sun Nov 21 20:46:48 2010 +0100 +++ b/doc/misc/ChangeLog Sun Nov 21 22:46:16 2010 +0000 @@ -1,3 +1,7 @@ +2010-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * gnus.texi (Server Commands): Document gnus-server-show-server. + 2010-11-20 Michael Albinus <michael.albinus@gmx.de> Sync with Tramp 2.2.0.
--- a/doc/misc/gnus.texi Sun Nov 21 20:46:48 2010 +0100 +++ b/doc/misc/gnus.texi Sun Nov 21 22:46:16 2010 +0000 @@ -13840,6 +13840,11 @@ @findex gnus-server-edit-server Edit a server (@code{gnus-server-edit-server}). +@item S +@kindex S (Server) +@findex gnus-server-show-server +Show the definition of a server (@code{gnus-server-show-server}). + @item SPACE @kindex SPACE (Server) @findex gnus-server-read-server
--- a/lisp/gnus/ChangeLog Sun Nov 21 20:46:48 2010 +0100 +++ b/lisp/gnus/ChangeLog Sun Nov 21 22:46:16 2010 +0000 @@ -1,3 +1,16 @@ +2010-11-21 Andrew Cohen <cohen@andy.bu.edu> + + * nnir.el: Fix typo in comments. + (nnir-run-imap): Simplify code. No need to reverse artlist. + (nnir-run-gmane): Use nnir-tmp-buffer for web results. + +2010-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * gnus-srvr.el (gnus-server-show-server): New command and keystroke. + + * nnimap.el (nnimap-get-capabilities): Refactor out. + (nnimap-open-connection): Re-request capabilities after STARTTLS. + 2010-11-21 Ralf Angeli <angeli@caeruleus.net> * mm-uu.el (mm-uu-type-alist): Prevent spurious empty line from
--- a/lisp/gnus/gnus-srvr.el Sun Nov 21 20:46:48 2010 +0100 +++ b/lisp/gnus/gnus-srvr.el Sun Nov 21 22:46:16 2010 +0000 @@ -115,6 +115,7 @@ ["Kill" gnus-server-kill-server t] ["Yank" gnus-server-yank-server t] ["Copy" gnus-server-copy-server t] + ["Show" gnus-server-show-server t] ["Edit" gnus-server-edit-server t] ["Regenerate" gnus-server-regenerate-server t] ["Compact" gnus-server-compact-server t] @@ -152,6 +153,7 @@ "c" gnus-server-copy-server "a" gnus-server-add-server "e" gnus-server-edit-server + "S" gnus-server-show-server "s" gnus-server-scan-server "O" gnus-server-open-server @@ -609,6 +611,18 @@ (gnus-server-position-point)) 'edit-server))) +(defun gnus-server-show-server (server) + "Show the definition of the server on the current line." + (interactive (list (gnus-server-server-name))) + (unless server + (error "No server on current line")) + (let ((info (gnus-server-to-method server))) + (gnus-edit-form + info "Showing the server." + `(lambda (form) + (gnus-server-position-point)) + 'edit-server))) + (defun gnus-server-scan-server (server) "Request a scan from the current server." (interactive (list (gnus-server-server-name)))
--- a/lisp/gnus/nnimap.el Sun Nov 21 20:46:48 2010 +0100 +++ b/lisp/gnus/nnimap.el Sun Nov 21 22:46:16 2010 +0000 @@ -375,12 +375,7 @@ (setf (nnimap-greeting nnimap-object) (buffer-substring (line-beginning-position) (line-end-position))) - ;; Store the capabilities. - (setf (nnimap-capabilities nnimap-object) - (mapcar - #'upcase - (nnimap-find-parameter - "CAPABILITY" (cdr (nnimap-command "CAPABILITY"))))) + (nnimap-get-capabilities) (when nnimap-server-port (push (format "%s" nnimap-server-port) ports)) ;; If this is a STARTTLS-capable server, then sever the @@ -391,7 +386,10 @@ (eq nnimap-stream 'starttls)) (fboundp 'open-gnutls-stream)) (nnimap-command "STARTTLS") - (gnutls-negotiate (nnimap-process nnimap-object) nil)) + (gnutls-negotiate (nnimap-process nnimap-object) nil) + ;; Get the capabilities again -- they may have changed + ;; after doing STARTTLS. + (nnimap-get-capabilities)) ((and (eq nnimap-stream 'network) (nnimap-capability "STARTTLS")) (let ((nnimap-stream 'starttls)) @@ -447,6 +445,13 @@ (nnimap-command "ENABLE QRESYNC")) (nnimap-process nnimap-object)))))))) +(defun nnimap-get-capabilities () + (setf (nnimap-capabilities nnimap-object) + (mapcar + #'upcase + (nnimap-find-parameter + "CAPABILITY" (cdr (nnimap-command "CAPABILITY")))))) + (defun nnimap-quote-specials (string) (with-temp-buffer (insert string)
--- a/lisp/gnus/nnir.el Sun Nov 21 20:46:48 2010 +0100 +++ b/lisp/gnus/nnir.el Sun Nov 21 22:46:16 2010 +0000 @@ -41,7 +41,7 @@ ;; Retrieval Status Value (score). ;; When looking at the retrieval result (in the Summary buffer) you -;; can type `A W' (aka M-x gnus-warp-article RET) on an article. You +;; can type `A W' (aka M-x gnus-warp-to-article RET) on an article. You ;; will be warped into the group this article came from. Typing `A W' ;; (aka M-x gnus-summary-refer-thread RET) will warp to the group and ;; also show the thread this article is part of. @@ -682,9 +682,8 @@ (apply 'vconcat (mapcar - (lambda (x) - (let ((group x) - artlist) + (lambda (group) + (let (artlist) (condition-case () (when (nnimap-possibly-change-group (gnus-group-short-name group) server) @@ -706,7 +705,7 @@ (message "Searching %s... %d matches" group arts))) (message "Searching %s...done" group)) (quit nil)) - (reverse artlist))) + artlist)) groups))))) (defun nnir-imap-make-query (criteria qstring) @@ -1316,7 +1315,7 @@ (gnus-inhibit-demon t) artlist) (require 'mm-url) - (with-current-buffer nntp-server-buffer + (with-current-buffer (get-buffer-create nnir-tmp-buffer) (erase-buffer) (mm-url-insert (concat