Commit af92e247 authored by Andrew Cohen's avatar Andrew Cohen Committed by Katsumi Yamaoka
Browse files

Merge changes made in Gnus trunk.

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.
parent 8ca42262
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
......
......@@ -7339,6 +7339,9 @@ The state which existed when entering the ephemeral is reset."
(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)
......
......@@ -1567,25 +1567,14 @@ textual parts.")
(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))
......@@ -1951,6 +1940,21 @@ textual parts.")
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment