help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Can't add bookmarks for help pages


From: Drew Adams
Subject: RE: Can't add bookmarks for help pages
Date: Sat, 9 Jun 2012 14:00:44 -0700

> (defun my-jump-help-bookmark (bookmark)
>   "Jump to `*Help*' bookmark BOOKMARK.
> Handler function for record returned by `my-make-help-record'.
> BOOKMARK is a bookmark name or a bookmark record."
>   (let ((help-fn   (bookmark-prop-get bookmark 'help-fn))
>         (help-arg  (bookmark-prop-get bookmark 'help-arg)))
>     (funcall help-fn help-arg)))

Sorry, did I say the cursor would be at the recorded position?
Then make that:

(defun my-jump-help-bookmark (bookmark)
  "..."
  (let ((help-fn   (bookmark-prop-get bookmark 'help-fn))
        (help-arg  (bookmark-prop-get bookmark 'help-arg))
        (position  (bookmark-prop-get bookmark 'position)))
    (funcall help-fn help-arg)
    (with-current-buffer "*Help*" (goto-char position))))
    
Or if you want buffer `*Help*' to be current, then replace the last sexp,
(with-current...), with these two sexps:

(pop-to-buffer "*Help*")
(goto-char position)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]