emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Structured links to headings with endless depth


From: Michael Brand
Subject: Re: [O] Structured links to headings with endless depth
Date: Mon, 6 May 2019 18:34:59 +0200

Hi all

On Wed, Mar 14, 2018 at 7:58 AM Michael Brand
<address@hidden> wrote:

> ,    (arbitrarily more levels upwards)
> ,      * [...]
> ,        * <composer>
> ,          * <work>
> ,            * TODO <movement>
> ,              * <interpreter> :5:
> ,                - The tag 5 is my rating of this audio recording.
> ,                - The audio recording is stored under the file path
> ,                  [...]/<composer>/<work>/<movement>/<interpreter>/<sth>.mp3
> ,
> ,    * TODO [...]
> ,      - The theme is very similar to this prelude
> ,        [[/:<composer_1>/<work_1>/<movement_1>]].
> ,    * [...]
> ,      - [...] like in this piano concert
> ,        [[/:<composer_2>/<work_2>]].

Despite all the valuable recommendations in this thread I implemented
something simple for my very specific use case of a music database
where I want self-explaining links with the already existing and
complete heading structure and don't want to add any ID, CUSTOM_ID or
<<target>>. See this example:

#+begin_src org
,#+STARTUP: oddeven showeverything

Specs for outline path of links to a heading, any combinations allowed
including none:
- "/" delimits headings of adjacent levels.
- A leading "/" requires matching the top level heading.
- "//" delimits heading levels with 0 to n discarded heading levels
between them.

Demo examples:
- Goes to tag 1: [[*Chopin/Prelude]]
- Goes to tag 2: [[*/Prelude]]
- Goes to tag 3: [[*d/c//b/a]]
- Goes to tag 4: [[*d/c/b/a]]
,* Foo
,** Bach
,*** Prelude
,** Chopin
,*** Prelude :1:
,* Prelude :2:
,* d
,** c
,*** Bar
,**** Baz
,***** b
,****** a :3:
,*** b
,**** a :4:
#+end_src

Limitations of this simplified implementation:
- Export of links with a path to a heading is not supported.
- Links to a heading with "/" that existed before are broken.
- There may be other issues for your use case already discussed in the
current thread (
http://lists.gnu.org/archive/html/emacs-orgmode/2018-03/msg00231.html
).

Due to the limitations this implementation is for private use only and
not meant to be commited upstream although the format of the attached
patches might imply that.

Michael

Attachment: 0001-org-get-heading-New-parameter-no-cookie.patch
Description: Text Data

Attachment: 0002-org-link-search-Search-for-outline-path.patch
Description: Text Data


reply via email to

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