;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This program is distributed in the hope that it will be useful,
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, you can either send email to this
;; program's maintainer or write to: The Free Software Foundation,
-;; Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
+;; Inc.; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
;;; Commentary:
\"~/Maildir/.group\"."
:group 'gnus-namazu
:type '(repeat
- (cons (regexp :tag "Regexp of group name")
+ (cons (choice (regexp :tag "Regexp of group name")
+ (const :tag "Groups served by `gnus-select-method'" t))
(string :tag "Base path of groups")))
:set (lambda (symbol value)
(prog1 (set-default symbol value)
(push (cons gnus-namazu/group-name-regexp
gnus-namazu-coding-system)
gnus-group-name-charset-group-alist))))
- (gnus-namazu-update-all-indices))
+ (unless gnus-namazu-command-prefix
+ (gnus-namazu-update-all-indices)))
(defun gnus-namazu/server-directory (server)
"Return the top directory of the server SERVER."
"-a" ; show all matches
"-l") ; use list format
gnus-namazu-additional-arguments
- (list query)
+ (list (if gnus-namazu-command-prefix
+ (concat "'" query "'")
+ query))
gnus-namazu-index-directories)))
(apply 'call-process (car commands) nil t nil (cdr commands))))
(gnus-namazu/server-directory method))))
(push (cons dir group) alist)))
(dolist (pair gnus-namazu-remote-groups)
- (when (string-match (car pair) group)
- (setq dir (nnmail-group-pathname
- (substring group (match-end 0))
- "/"))
- (push (cons (concat (cdr pair) (substring dir 1)) group)
+ (when (setq dir
+ (or (and (eq t (car pair))
+ (gnus-method-equal method gnus-select-method)
+ group)
+ (and (stringp (car pair))
+ (string-match (car pair) group)
+ (substring group (match-end 0)))))
+ (setq dir (nnmail-group-pathname dir "/"))
+ (push (cons (concat (cdr pair)
+ ;; nnmail-group-pathname() on some
+ ;; systems returns pathnames which
+ ;; have drive letters at their top.
+ (substring dir (1+ (string-match "/" dir))))
+ group)
alist)))))
gnus-newsrc-hashtb)
(dolist (pair (nconc agent cache alist))