Function: gnus-summary-bookmark-jump

gnus-summary-bookmark-jump is an autoloaded and byte-compiled function defined in gnus-sum.el.gz.

Signature

(gnus-summary-bookmark-jump BOOKMARK)

Documentation

Handler function for record returned by gnus-summary-bookmark-make-record.

BOOKMARK is a bookmark name or a bookmark record.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
;;;###autoload
(defun gnus-summary-bookmark-jump (bookmark)
  "Handler function for record returned by `gnus-summary-bookmark-make-record'.
BOOKMARK is a bookmark name or a bookmark record."
  (let ((group    (bookmark-prop-get bookmark 'group))
        (article  (bookmark-prop-get bookmark 'article))
        (id       (bookmark-prop-get bookmark 'message-id))
        (buf      (car (split-string (bookmark-prop-get bookmark 'location)))))
    (gnus-fetch-group group (list article))
    (gnus-summary-insert-cached-articles)
    (gnus-summary-goto-article id nil 'force)
    ;; FIXME we have to wait article buffer is ready (only large buffer)
    ;; Is there a better solution to know that?
    ;; If we don't wait `bookmark-default-handler' will have no chance
    ;; to set position. However there is no error, just wrong pos.
    (sit-for 1)
    (when (string= buf "Gnus-art")
      (other-window 1))
    (bookmark-default-handler
     `(""
       (buffer . ,(current-buffer))
       . ,(bookmark-get-bookmark-record bookmark)))))