Hello, Adam Porter <a...@alphapapa.net> writes:
> 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...) I'm not saying that Bookmark should call `org-tree-to-indirect-buffer', but provide a way for major modes to specify a jump function. In any way, you are right, it already exists through the `handler' mechanism. > That hook idea sounds interesting, but I'm not sure I understand how it > would be different than the built-in bookmark-handler feature. There is only one handler per major mode. Providing a "-function" (or a "-hook", it depends if it extends a default feature or replace it) variable could allow users to add their own "view" function (`org-tree-to-indirect-buffer' in your case, but not limited to it). > 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. :) This is what I meant. > 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...? It makes sense, indeed. Regards, -- Nicolas Goaziou