Function: gnus-summary-open-group-with-article

gnus-summary-open-group-with-article is an interactive and byte-compiled function defined in gnus-sum.el.gz.

Signature

(gnus-summary-open-group-with-article MESSAGE-ID)

Documentation

Open a group containing the article with the given MESSAGE-ID.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-summary-open-group-with-article (message-id)
  "Open a group containing the article with the given MESSAGE-ID."
  (interactive "sMessage-ID: " gnus-summary-mode)
  (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)))