From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph LANGE Subject: Two functions for efficient headline navigation Date: Sun, 21 Feb 2016 19:30:07 +0100 Message-ID: <56CA022F.7020002@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXYlr-000211-Do for emacs-orgmode@gnu.org; Sun, 21 Feb 2016 13:30:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXYlm-00010k-UV for emacs-orgmode@gnu.org; Sun, 21 Feb 2016 13:30:15 -0500 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:38277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXYlm-00010g-N2 for emacs-orgmode@gnu.org; Sun, 21 Feb 2016 13:30:10 -0500 Received: by mail-wm0-x22d.google.com with SMTP id a4so134648769wme.1 for ; Sun, 21 Feb 2016 10:30:10 -0800 (PST) Received: from [192.168.1.31] (x5d81b072.dyn.telefonica.de. [93.129.176.114]) by smtp.googlemail.com with ESMTPSA id di1sm21049458wjc.3.2016.02.21.10.30.08 for (version=TLSv1/SSLv3 cipher=OTHER); Sun, 21 Feb 2016 10:30:08 -0800 (PST) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "emacs-orgmode@gnu.org" Dear Org community, at http://orgmode.org/worg/org-hacks.html#org-jump-to-child and http://orgmode.org/worg/org-hacks.html#org-jump-to-id I have contributed two interactive functions to aid structural navigation in large, complex trees (source: http://orgmode.org/worg/code/elisp/org-jump.el). The latter function I had already introduced on this list on 2015-03-31. Related to these functions I have a comment on Org's design. org-jump-to-child (prompts for the title of a sub-heading of the current heading and navigates there) was fairly complex to implement. Coming from an XML background I was surprised to see that Org has no notion of a data model or of the semantics of a document and its tree, but that I was basically required to implement an algorithm to walk through all sub-headings and collect them. Has an implementation based on a data model ever been considered? OTOH I could imagine it would not be easily to implement this efficiently: as an Org document is technically a text file that the user can edit without any restrictions, one would have to continuously sync some internal data structure with the user's text-level edits. Cheers, Christoph -- Dr. Christoph Lange, Enterprise Information Systems Department Applied Computer Science @ University of Bonn; Fraunhofer IAIS http://langec.wordpress.com/about, Skype duke4701 → Project management / coordination job in WDAqua Marie Curie ITN http://eis.iai.uni-bonn.de/Jobs.html