From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Add org-bookmark-heading to Org proper? Date: Thu, 22 Sep 2016 21:35:52 +0200 Message-ID: <87lgyjk9rb.fsf@nicolasgoaziou.fr> References: <8760podmwr.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn9mr-0007Th-ED for emacs-orgmode@gnu.org; Thu, 22 Sep 2016 15:36:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn9mp-0003I5-BA for emacs-orgmode@gnu.org; Thu, 22 Sep 2016 15:36:00 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:41615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn9mp-0003HD-5j for emacs-orgmode@gnu.org; Thu, 22 Sep 2016 15:35:59 -0400 In-Reply-To: <8760podmwr.fsf@alphapapa.net> (Adam Porter's message of "Thu, 22 Sep 2016 09:33:40 -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, > Given that, now might be a good time to consider merging the package > into Org proper. It seems like something that should be in Org already, > being able to make Emacs bookmarks that point to Org headings. It's > actually just three functions, so not much of a "package" really. > > https://github.com/alphapapa/org-bookmark-heading > > Thoughts? :) I think Org could benefit from a shrunk version of this library, i.e., `org-bookmark-make-record' and `org-bookmark-jump'. However I'm not convinced about `org-bookmark-jump-indirect' since this variable complicates code and the same effect can be achieved easily once the destination headline is reached. Besides, the helm part doesn't really belong to Org. IIUC, it is not even needed if we drop support for `org-bookmark-jump-indirect', as suggested above. A few suggestions, after a cursory look: - please switch to lexical binding as all but one file in Org core, - it is "Org mode", not "org-mode" - `org-replace-links-in-string-with-desc' already exists, it is (mis)called `org-link-display-format' - `assoc' -> `assq' when key is a symbol - if you create a marker, unset it once useless - first sentence in docstrings has to fit in the first line. Thank you for your work. Regards, -- Nicolas Goaziou