Function: mh-goto-msg

mh-goto-msg is an autoloaded, interactive and byte-compiled function defined in mh-folder.el.gz.

Signature

(mh-goto-msg NUMBER &optional NO-ERROR-IF-NO-MESSAGE DONT-SHOW)

Documentation

Go to a message.

You can enter the message NUMBER either before or after typing g (mh-goto-msg). In the latter case, Emacs prompts you.

In a program, optional non-nil second argument NO-ERROR-IF-NO-MESSAGE means return nil instead of signaling an error if message does not exist; in this case, the cursor is positioned near where the message would have been. Non-nil third argument DONT-SHOW means not to show the message.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-folder.el.gz
;;;###mh-autoload
(defun mh-goto-msg (number &optional no-error-if-no-message dont-show)
  "Go to a message\\<mh-folder-mode-map>.

You can enter the message NUMBER either before or after typing
\\[mh-goto-msg]. In the latter case, Emacs prompts you.

In a program, optional non-nil second argument NO-ERROR-IF-NO-MESSAGE
means return nil instead of signaling an error if message does not
exist; in this case, the cursor is positioned near where the message
would have been. Non-nil third argument DONT-SHOW means not to show
the message."
  (interactive "NGo to message: ")
  (setq number (prefix-numeric-value number))
  (let ((point (point))
        (return-value t))
    (goto-char (point-min))
    (unless (re-search-forward (format (mh-scan-msg-search-regexp) number)
                               nil t)
      (goto-char point)
      (unless no-error-if-no-message
        (error "No message %d" number))
      (setq return-value nil))
    (beginning-of-line)
    (or dont-show (not return-value) (mh-maybe-show number))
    return-value))