emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Add org-bookmark-heading to Org proper?


From: Adam Porter
Subject: Re: [O] Add org-bookmark-heading to Org proper?
Date: Sat, 24 Sep 2016 20:40:26 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

Hi Nicolas,

> I think controlling how the bookmark locations are displayed is
> a different feature, which may fit better in Bookmark than in Org.

I think I see what you mean, but at the same time, it seems like an
Org-specific feature since it calls org-tree-to-indirect-buffer.  I
guess I think of Org as building on core Emacs features, so putting an
Org-specific feature in core bookmark.el seems...backwards?  (Though I'm
not sure that's what you meant...)

> We could introduce a generic hook somewhere so that to permit users
> adding their own display mechanism. However, the variable is, IMO, too
> specific.

That hook idea sounds interesting, but I'm not sure I understand how it
would be different than the built-in bookmark-handler feature.
bookmark-handle-bookmark says that the handler it calls, "changes
current buffer and point and returns nil, or signals a `file-error'," so
that's what my org-bookmark-jump handler does, in an Org-specific way.

The indirect-buffer feature could of course be removed from
org-bookmark-jump, and a user could add it himself as advice that runs
afterward.

Or maybe something like an org-bookmark-jump-hook could be added to call
other functions after jumping to an Org bookmark. I guess this is what
you meant, I just had to talk myself through it.  :)

> On another topic, by looking at bookmark.el, it seems you shouldn't
> create the internal representation of the bookmarks by hand, and use
> setters instead (e.g., `bookmark-set-filename').

I went by the docstring for bookmark-make-record-function, which says
that modes can set it buffer-locally for locations that should be
treated specially, and that the function called should return a record
according to bookmark-alist.  I guess the setters are intended for
modifying existing bookmarks...?

Thanks for your feedback.




reply via email to

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