(nnir-request-set-mark): New function.
(nnir-request-update-info): Improve marks updating.
(nnir-request-scan): Don't duplicate marks updating.
+ (gnus-group-make-nnir-group, nnir-run-imap, nnir-request-create-group):
+ Use 'assq rather than 'assoc. Quote anonymous function.
+ (nnir-request-group, nnir-close-group, gnus-summary-create-nnir-group):
+ Use 'gnus-group-prefixed-p.
+ (gnus-summary-create-nnir-group): Make sure server for method is open.
2013-04-04 Andrew Cohen <cohen@bu.edu>
skips all prompting."
(interactive "P")
(let* ((group-spec
- (or (cdr (assoc 'nnir-group-spec specs))
+ (or (cdr (assq 'nnir-group-spec specs))
(if (gnus-server-server-name)
(list (list (gnus-server-server-name)))
(nnir-categorize
(cdr (assoc (gnus-group-topic-name) gnus-topic-alist))))
gnus-group-server))))
(query-spec
- (or (cdr (assoc 'nnir-query-spec specs))
+ (or (cdr (assq 'nnir-query-spec specs))
(apply
'append
(list (cons 'query
(deffoo nnir-request-group (group &optional server dont-check info)
(nnir-possibly-change-group group server)
- (let ((pgroup (if (gnus-group-prefixed-p group)
- group
- (gnus-group-prefixed-name group '(nnir "nnir"))))
+ (let ((pgroup (gnus-group-guess-full-name-from-command-method group))
length)
;; Check for cached search result or run the query and cache the
;; result.
(deffoo nnir-close-group (group &optional server)
- (let ((pgroup (if (gnus-group-prefixed-p group)
- group
- (gnus-group-prefixed-name group '(nnir "nnir")))))
+ (let ((pgroup (gnus-group-guess-full-name-from-command-method group)))
(when (and nnir-artlist (not (gnus-ephemeral-group-p pgroup)))
(gnus-group-set-parameter pgroup 'nnir-artlist nnir-artlist))
(setq nnir-artlist nil)
'vconcat
(catch 'found
(mapcar
- (lambda (group)
+ #'(lambda (group)
(let (artlist)
(condition-case ()
(when (nnimap-possibly-change-group
(defun gnus-summary-create-nnir-group ()
(interactive)
+ (or (nnir-server-opened "") (nnir-open-server "nnir"))
(let ((name (gnus-read-group "Group name: "))
- (method "nnir")
- (pgroup (if (gnus-group-prefixed-p gnus-newsgroup-name)
- gnus-newsgroup-name
- (gnus-group-prefixed-name
- gnus-newsgroup-name '(nnir "nnir")))))
+ (method '(nnir ""))
+ (pgroup
+ (gnus-group-guess-full-name-from-command-method gnus-newsgroup-name)))
(with-current-buffer gnus-group-buffer
(gnus-group-make-group
name method nil
(deffoo nnir-request-create-group (group &optional server args)
(message "Creating nnir group %s" group)
(let* ((group (gnus-group-prefixed-name group '(nnir "nnir")))
- (specs (assoc 'nnir-specs args))
+ (specs (assq 'nnir-specs args))
(query-spec
- (or (cdr (assoc 'nnir-query-spec specs))
+ (or (cdr (assq 'nnir-query-spec specs))
(list (cons 'query
(read-string "Query: " nil 'nnir-search-history)))))
(group-spec
- (or (cdr (assoc 'nnir-group-spec specs))
+ (or (cdr (assq 'nnir-group-spec specs))
(list (list (read-string "Server: " nil nil)))))
(nnir-specs (list (cons 'nnir-query-spec query-spec)
(cons 'nnir-group-spec group-spec))))
(gnus-group-set-parameter group 'nnir-specs nnir-specs)
(gnus-group-set-parameter
group 'nnir-artlist
- (or (cdr (assoc 'nnir-artlist args))
+ (or (cdr (assq 'nnir-artlist args))
(nnir-run-query nnir-specs)))
(nnir-request-update-info group (gnus-get-info group)))
t)