[gnus git] branch master updated: m0-9-7-g69b14ac =1= * gnus-sum.el (gnus-summary-open-group-with-article): New command.

Lars Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  69b14ac458e923dcbe9cf740ab868633c055b405 (commit)
      from  4bb0647c56e3f8d30dc1d311ce7864a09de4de9b (commit)


- Log -----------------------------------------------------------------
commit 69b14ac458e923dcbe9cf740ab868633c055b405
Author: Dave Abrahams <[email protected]>
Date:   Fri Jan 31 15:59:06 2014 -0800

    * gnus-sum.el (gnus-summary-open-group-with-article): New command.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0a6a95b..d553205 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2014-01-31  Dave Abrahams  <[email protected]>
+
+	* gnus-sum.el (gnus-summary-open-group-with-article): New command.
+
 2014-01-31  Magnus Henoch  <[email protected]>
 
 	* dns.el (dns-servers-up-to-date-p): New function to see whether the
diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el
index d6c801f..9079e25 100644
--- a/lisp/gnus-sum.el
+++ b/lisp/gnus-sum.el
@@ -9085,6 +9085,41 @@ non-numeric or nil fetch the number specified by the
       (gnus-summary-limit-include-thread id)))
   (gnus-summary-show-thread))
 
+(defun gnus-summary-open-group-with-article (message-id)
+  "Open a group containing the article with the given MESSAGE-ID."
+  (interactive "sMessage-ID: ")
+  (require 'nndoc)
+  (with-temp-buffer
+    ;; Prepare a dummy article
+    (erase-buffer)
+    (insert "From nobody Tue Sep 13 22:05:34 2011\n\n")
+
+    ;; Prepare pretty modelines for summary and article buffers
+    (let ((gnus-summary-mode-line-format "Found %G")
+          (gnus-article-mode-line-format
+           ;; Group names just get in the way here, especially the
+           ;; abbreviated ones
+           (if (string-match "%[gG]" gnus-article-mode-line-format)
+	       (concat (substring gnus-article-mode-line-format
+				  0 (match-beginning 0))
+		       (substring gnus-article-mode-line-format (match-end 0)))
+	     gnus-article-mode-line-format)))
+
+      ;; Build an ephemeral group containing the dummy article (hidden)
+      (gnus-group-read-ephemeral-group
+       message-id
+       `(nndoc ,message-id
+	       (nndoc-address ,(current-buffer))
+	       (nndoc-article-type mbox))
+       :activate
+       (cons (current-buffer) gnus-current-window-configuration)
+       (not :request-only)
+       '(-1)				; :select-articles
+       (not :parameters)
+       0))				; :number
+    ;; Fetch the desired article
+    (gnus-summary-refer-article message-id)))
+
 (defun gnus-summary-refer-article (message-id)
   "Fetch an article specified by MESSAGE-ID."
   (interactive "sMessage-ID: ")

-----------------------------------------------------------------------
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/gnus-sum.el |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+)

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.