From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Add org-bookmark-heading to Org proper? Date: Sun, 25 Sep 2016 10:14:39 +0200 Message-ID: <87lgyg2y6o.fsf@nicolasgoaziou.fr> References: <8760podmwr.fsf@alphapapa.net> <87lgyjk9rb.fsf@nicolasgoaziou.fr> <87h997zeop.fsf@alphapapa.net> <87k2e2i6m9.fsf@nicolasgoaziou.fr> <87eg48vjsl.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bo4aE-0002TF-BP for emacs-orgmode@gnu.org; Sun, 25 Sep 2016 04:14:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bo4aA-0001nu-5M for emacs-orgmode@gnu.org; Sun, 25 Sep 2016 04:14:45 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:56488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bo4a9-0001no-Ux for emacs-orgmode@gnu.org; Sun, 25 Sep 2016 04:14:42 -0400 In-Reply-To: <87eg48vjsl.fsf@alphapapa.net> (Adam Porter's message of "Sat, 24 Sep 2016 20:40:26 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Adam Porter Cc: emacs-orgmode@gnu.org Hello, Adam Porter 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