Function: nnmairix-goto-original-article

nnmairix-goto-original-article is an interactive and byte-compiled function defined in nnmairix.el.gz.

Signature

(nnmairix-goto-original-article &optional NO-REGISTRY)

Documentation

Jump to the original group and display article.

The original group of the article is first determined with the registry (if enabled). If the registry is not enabled or did not find the article or the prefix NO-REGISTRY is non-nil, this function will try to determine the original group form the path of the mail file. The path is obtained through another mairix search in raw mode.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nnmairix.el.gz
;; Search for original article helper functions

(defun nnmairix-goto-original-article (&optional no-registry)
  "Jump to the original group and display article.
The original group of the article is first determined with the
registry (if enabled).  If the registry is not enabled or did not
find the article or the prefix NO-REGISTRY is non-nil, this
function will try to determine the original group form the path
of the mail file.  The path is obtained through another mairix
search in raw mode."
  (interactive "P")
  (when (not (eq (car gnus-current-select-method) 'nnmairix))
    (let ((method (gnus-find-method-for-group gnus-newsgroup-name)))
      (if (eq (car method) 'nnmairix)
	  (nnmairix-open-server (nth 1 method))
	(error "Not in a nnmairix group"))))
  (when (not (gnus-buffer-live-p gnus-article-buffer))
    (error "No article buffer available"))
  (let ((server (nth 1 gnus-current-select-method))
	mid group allgroups) ;; rval
    ;; get message id
    (with-current-buffer gnus-article-buffer
      (gnus-summary-toggle-header 1)
      (setq mid (message-fetch-field "Message-ID"))
      ;; first check the registry (if available)
      (unless no-registry
	(setq allgroups (nnmairix-determine-original-group-from-registry mid)))
      (unless (or allgroups
		  nnmairix-only-use-registry)
	;; registry was not available or did not find article
	;; so we search again with mairix in raw mode to get filename
	(setq allgroups
	      (nnmairix-determine-original-group-from-path mid server)))
      (if (> (length allgroups) 1)
	  (setq group
		(gnus-completing-read
		 "Message exists in more than one group. Choose"
		 allgroups t))
	(setq group (car allgroups))))
    (if group
	;; show article in summary buffer
	(nnmairix-show-original-article group mid)
      (nnheader-message 3 "Couldn't find original article"))))