From 59e75882626e69dfe0db3578558a012a4e8227a2 Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Sun, 21 Nov 2010 22:46:16 +0000 Subject: [PATCH] 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. --- doc/misc/ChangeLog | 4 ++++ doc/misc/gnus.texi | 5 +++++ lisp/gnus/ChangeLog | 13 +++++++++++++ lisp/gnus/gnus-srvr.el | 14 ++++++++++++++ lisp/gnus/nnimap.el | 19 ++++++++++++------- lisp/gnus/nnir.el | 11 +++++------ 6 files changed, 53 insertions(+), 13 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index d94044d5b80..38671f1410c 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2010-11-21 Lars Magne Ingebrigtsen + + * gnus.texi (Server Commands): Document gnus-server-show-server. + 2010-11-20 Michael Albinus Sync with Tramp 2.2.0. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 5ce214a6912..ad9be300a1d 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -13840,6 +13840,11 @@ Add a new server (@code{gnus-server-add-server}). @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 diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 73a4a746b0c..365e49bf367 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,16 @@ +2010-11-21 Andrew Cohen + + * 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 + + * 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 * mm-uu.el (mm-uu-type-alist): Prevent spurious empty line from diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index ae773657d24..19fd5fe6636 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -115,6 +115,7 @@ If nil, a faster, but more primitive, buffer is used instead." ["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 @@ If nil, a faster, but more primitive, buffer is used instead." "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 @@ The following commands are available: (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))) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index af58ce2468d..f6315a5aab7 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -375,12 +375,7 @@ textual parts.") (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 @@ textual parts.") (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 @@ textual parts.") (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) diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 1983a0a5cbd..e5ba3c60620 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el @@ -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 @@ details on the language and supported extensions" (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 @@ details on the language and supported extensions" (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 @@ Tested with Namazu 2.0.6 on a GNU/Linux system." (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 -- 2.39.2