From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>, <help-gnu-emacs@gnu.org>
Subject: RE: Can't add bookmarks for help pages
Date: Tue, 12 Jun 2012 10:24:40 -0700 [thread overview]
Message-ID: <174C317299C94C8DA29AA3C163EF1B30@us.oracle.com> (raw)
In-Reply-To: <785789BA0DFD4763A756A8FA4961AE7E@us.oracle.com>
[-- Attachment #1: Type: text/plain, Size: 406 bytes --]
> > > Not letting me bookmark help pages isn't user-friendly.
> >
> > Agreed. Patches to add bookmark support to help buffers would
> > be welcome.
>
> Attached.
My bad. I was unclear about the *Help* xref stack. That patch worked for help
functions that expect an argument but not for ones that expect no arg.
The attached patch (against the latest help-mode.el) should DTRT. Sorry for the
noise.
[-- Attachment #2: help-mode-2012-06-12.patch --]
[-- Type: application/octet-stream, Size: 1986 bytes --]
diff -c "help-mode-BZR-2012-06-12.el" "help-mode-patched-2012-06-12.el"
*** help-mode.el Tue Jun 12 10:00:12 2012
--- help-mode-patched-2012-06-12.el Tue Jun 12 10:02:46 2012
***************
*** 806,814 ****
(unless (car help-xref-stack-item)
(error "Cannot create bookmark - help command not known"))
`(,@(bookmark-make-record-default 'NO-FILE 'NO-CONTEXT)
- (buffer-name . "*Help*")
(help-fn . ,(car help-xref-stack-item))
! (help-arg . ,(cadr help-xref-stack-item))
(position . ,(point))
(handler . help-bookmark-jump)))
--- 806,813 ----
(unless (car help-xref-stack-item)
(error "Cannot create bookmark - help command not known"))
`(,@(bookmark-make-record-default 'NO-FILE 'NO-CONTEXT)
(help-fn . ,(car help-xref-stack-item))
! (help-args . ,(cdr help-xref-stack-item))
(position . ,(point))
(handler . help-bookmark-jump)))
***************
*** 817,826 ****
"Jump to help-mode bookmark BOOKMARK.
Handler function for record returned by `help-bookmark-make-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))
! (position (bookmark-prop-get bookmark 'position)))
! (funcall help-fn help-arg)
(pop-to-buffer "*Help*")
(goto-char position)))
--- 816,825 ----
"Jump to help-mode bookmark BOOKMARK.
Handler function for record returned by `help-bookmark-make-record'.
BOOKMARK is a bookmark name or a bookmark record."
! (let ((help-fn (bookmark-prop-get bookmark 'help-fn))
! (help-args (bookmark-prop-get bookmark 'help-args))
! (position (bookmark-prop-get bookmark 'position)))
! (apply help-fn help-args)
(pop-to-buffer "*Help*")
(goto-char position)))
Diff finished at Tue Jun 12 10:22:26
next prev parent reply other threads:[~2012-06-12 17:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2514.1339265379.855.help-gnu-emacs@gnu.org>
2012-06-11 13:34 ` Can't add bookmarks for help pages Stefan Monnier
2012-06-11 21:00 ` Drew Adams
2012-06-12 1:03 ` Stefan Monnier
2012-06-12 17:24 ` Drew Adams [this message]
2012-06-09 18:09 Kelly Dean
2012-06-09 20:48 ` Drew Adams
2012-06-09 21:00 ` Drew Adams
2012-06-11 21:35 ` Kelly Dean
2012-06-11 23:41 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=174C317299C94C8DA29AA3C163EF1B30@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.