+2011-07-20 Andrew Cohen <cohen@andy.bu.edu>
+
+ * nnimap.el (nnimap-make-thread-query): New utility function to format
+ an imap thread search query.
+ (nnimap-request-thread): Use it.
+
+ * gnus-sum.el (gnus-handle-ephemeral-exit): Ensure we are setting the
+ right select-method if we are not going back to the group buffer.
+
2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-group.el (gnus-group-read-ephemeral-group): Make sure we don't
(if (not (buffer-name (car quit-config)))
(gnus-configure-windows 'group 'force)
(set-buffer (car quit-config))
+ (unless (eq (cdr quit-config) 'group)
+ (setq gnus-current-select-method
+ (gnus-find-method-for-group gnus-newsgroup-name)))
(cond ((eq major-mode 'gnus-summary-mode)
(gnus-set-global-variables))
((eq major-mode 'gnus-article-mode)
(deffoo nnimap-request-thread (header &optional group server)
(when (nnimap-possibly-change-group group server)
- (let* ((id (mail-header-id header))
- (refs (split-string
- (or (mail-header-references header)
- "")))
- (cmd (let ((value
- (format
- "(OR HEADER REFERENCES %s HEADER Message-Id %s)"
- id id)))
- (dolist (refid refs value)
- (setq value (format
- "(OR (OR HEADER Message-Id %s HEADER REFERENCES %s) %s)"
- refid refid value)))))
- (result (with-current-buffer (nnimap-buffer)
- (nnimap-command "UID SEARCH %s" cmd))))
- (when result
- (gnus-fetch-headers
- (and (car result) (delete 0 (mapcar #'string-to-number
- (cdr (assoc "SEARCH" (cdr result))))))
- nil t)))))
+ (let* ((cmd (nnimap-make-thread-query header))
+ (result (with-current-buffer (nnimap-buffer)
+ (nnimap-command "UID SEARCH %s" cmd))))
+ (when result
+ (gnus-fetch-headers
+ (and (car result) (delete 0 (mapcar #'string-to-number
+ (cdr (assoc "SEARCH" (cdr result))))))
+ nil t)))))
(defun nnimap-possibly-change-group (group server)
(let ((open-result t))
group-art))
nnimap-incoming-split-list)))
+(defun nnimap-make-thread-query (header)
+ (let* ((id (mail-header-id header))
+ (refs (split-string
+ (or (mail-header-references header)
+ "")))
+ (value
+ (format
+ "(OR HEADER REFERENCES %s HEADER Message-Id %s)"
+ id id)))
+ (dolist (refid refs value)
+ (setq value (format
+ "(OR (OR HEADER Message-Id %s HEADER REFERENCES %s) %s)"
+ refid refid value)))))
+
+
(provide 'nnimap)
;;; nnimap.el ends here