Function: org-mhe-follow-link

org-mhe-follow-link is a byte-compiled function defined in ol-mhe.el.gz.

Signature

(org-mhe-follow-link FOLDER ARTICLE)

Documentation

Follow an MH-E link to FOLDER and ARTICLE.

If ARTICLE is nil FOLDER is shown. If the configuration variable org-mhe-search-all-folders is t and mh-searcher is pick, ARTICLE is searched in all folders. Indexed searches (swish++, namazu, and others supported by MH-E) will always search in all folders.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ol-mhe.el.gz
(defun org-mhe-follow-link (folder article)
  "Follow an MH-E link to FOLDER and ARTICLE.
If ARTICLE is nil FOLDER is shown.  If the configuration variable
`org-mhe-search-all-folders' is t and `mh-searcher' is pick,
ARTICLE is searched in all folders.  Indexed searches (swish++,
namazu, and others supported by MH-E) will always search in all
folders."
  (require 'mh-e)
  (require 'mh-search)
  (require 'mh-utils)
  (mh-find-path)
  (if (not article)
      (mh-visit-folder (mh-normalize-folder-name folder))
    (mh-search-choose)
    (if (eq mh-searcher 'pick)
	(progn
	  (setq article (org-link-add-angle-brackets article))
	  (mh-search folder (list "--message-id" article))
	  (when (and org-mhe-search-all-folders
		     (not (org-mhe-get-message-real-folder)))
	    (kill-buffer)
	    (mh-search "+" (list "--message-id" article))))
      (if mh-search-regexp-builder
	  (mh-search "+" (funcall mh-search-regexp-builder
				  (list (cons 'message-id article))))
	(mh-search "+" article)))
    (if (org-mhe-get-message-real-folder)
	(mh-show-msg 1)
      (kill-buffer)
      (error "Message not found"))))