comparison lisp/gnus/nnir.el @ 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 4273d2312244
children f97704487fb3
comparison
equal deleted inserted replaced
111668:ccb8652ef52b 111669:ed117caa918e
39 ;; later) by typing `G G' in the Group buffer. You will then get a 39 ;; later) by typing `G G' in the Group buffer. You will then get a
40 ;; buffer which shows all articles matching the query, sorted by 40 ;; buffer which shows all articles matching the query, sorted by
41 ;; Retrieval Status Value (score). 41 ;; Retrieval Status Value (score).
42 42
43 ;; When looking at the retrieval result (in the Summary buffer) you 43 ;; When looking at the retrieval result (in the Summary buffer) you
44 ;; can type `A W' (aka M-x gnus-warp-article RET) on an article. You 44 ;; can type `A W' (aka M-x gnus-warp-to-article RET) on an article. You
45 ;; will be warped into the group this article came from. Typing `A W' 45 ;; will be warped into the group this article came from. Typing `A W'
46 ;; (aka M-x gnus-summary-refer-thread RET) will warp to the group and 46 ;; (aka M-x gnus-summary-refer-thread RET) will warp to the group and
47 ;; also show the thread this article is part of. 47 ;; also show the thread this article is part of.
48 48
49 ;; The Lisp setup may involve setting a few variables and setting up the 49 ;; The Lisp setup may involve setting a few variables and setting up the
680 (groups (or groups (nnir-get-active srv)))) 680 (groups (or groups (nnir-get-active srv))))
681 (message "Opening server %s" server) 681 (message "Opening server %s" server)
682 (apply 682 (apply
683 'vconcat 683 'vconcat
684 (mapcar 684 (mapcar
685 (lambda (x) 685 (lambda (group)
686 (let ((group x) 686 (let (artlist)
687 artlist)
688 (condition-case () 687 (condition-case ()
689 (when (nnimap-possibly-change-group 688 (when (nnimap-possibly-change-group
690 (gnus-group-short-name group) server) 689 (gnus-group-short-name group) server)
691 (with-current-buffer (nnimap-buffer) 690 (with-current-buffer (nnimap-buffer)
692 (message "Searching %s..." group) 691 (message "Searching %s..." group)
704 (cdr (assoc "SEARCH" 703 (cdr (assoc "SEARCH"
705 (cdr result))))))) 704 (cdr result)))))))
706 (message "Searching %s... %d matches" group arts))) 705 (message "Searching %s... %d matches" group arts)))
707 (message "Searching %s...done" group)) 706 (message "Searching %s...done" group))
708 (quit nil)) 707 (quit nil))
709 (reverse artlist))) 708 artlist))
710 groups))))) 709 groups)))))
711 710
712 (defun nnir-imap-make-query (criteria qstring) 711 (defun nnir-imap-make-query (criteria qstring)
713 "Parse the query string and criteria into an appropriate IMAP search 712 "Parse the query string and criteria into an appropriate IMAP search
714 expression, returning the string query to make. 713 expression, returning the string query to make.
1314 (search (format "%s %s %s" 1313 (search (format "%s %s %s"
1315 qstring groupspec authorspec)) 1314 qstring groupspec authorspec))
1316 (gnus-inhibit-demon t) 1315 (gnus-inhibit-demon t)
1317 artlist) 1316 artlist)
1318 (require 'mm-url) 1317 (require 'mm-url)
1319 (with-current-buffer nntp-server-buffer 1318 (with-current-buffer (get-buffer-create nnir-tmp-buffer)
1320 (erase-buffer) 1319 (erase-buffer)
1321 (mm-url-insert 1320 (mm-url-insert
1322 (concat 1321 (concat
1323 "http://search.gmane.org/nov.php" 1322 "http://search.gmane.org/nov.php"
1324 "?" 1323 "?"