[gnus git] branch master updated: n0-17-197-g360456e =1= (nnimap-make-thread-query): New utility function to format a thread query.

Andrew Cohen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  360456e0a431d660e7b848a81f7d3ae228aca9c0 (commit)
      from  d96021a8d164856adfa2bfb01dbdd9ff6ce335f5 (commit)


- Log -----------------------------------------------------------------
commit 360456e0a431d660e7b848a81f7d3ae228aca9c0
Author: Andrew Cohen <[email protected]>
Date:   Wed Jul 20 08:48:15 2011 -0400

    (nnimap-make-thread-query): New utility function to format a thread query.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d150347..d13f4e3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
 2011-07-20  Andrew Cohen  <[email protected]>
 
+	* 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.
 
diff --git a/lisp/nnimap.el b/lisp/nnimap.el
index ef5bee7..3855227 100644
--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -1567,18 +1567,7 @@ 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)))))
+    (let* ((cmd (nnimap-make-thread-query header))
 	 (result (with-current-buffer (nnimap-buffer)
 		   (nnimap-command  "UID SEARCH %s" cmd))))
     (when result
@@ -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

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog |    4 ++++
 lisp/nnimap.el |   42 +++++++++++++++++++++++-------------------
 2 files changed, 27 insertions(+), 19 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.