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

2019-05-18 Thread Ihor Radchenko
> There must be good reasons why some more > users than just me sometimes prefer the format B over A: Fair enough. Thanks for the clarification. Best, Ihor Michael Brand writes: > Hi Ihor > > On Tue, May 7, 2019 at 5:27 AM Ihor Radchenko wrote: > >> I am wondering why you are strictly

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

2019-05-07 Thread Michael Brand
Hi Ihor On Tue, May 7, 2019 at 5:27 AM Ihor Radchenko wrote: > I am wondering why you are strictly against ID properties. To me this looks like a misunderstanding. I use the ID often but my weighting of the different advantages is not the same in all cases. Some situations where no ID can be

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

2019-05-06 Thread Ihor Radchenko
Dear Michael, > ... I want self-explaining links with the already existing and > complete heading structure and don't want to add any ID, CUSTOM_ID or > <>. See this example: I am wondering why you are strictly against ID properties. The IDs can be set automatically. The property drawer can be

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

2019-05-06 Thread Michael Brand
Hi all On Wed, Mar 14, 2018 at 7:58 AM Michael Brand wrote: > ,(arbitrarily more levels upwards) > , * [...] > ,* > , * > ,* TODO > , * :5: > ,- The tag 5 is my rating of this audio recording. > ,- The audio

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

2018-03-14 Thread ST
On Wed, 2018-03-14 at 19:32 +0100, Nicolas Goaziou wrote: > ST writes: > > > Why [[file.org::#1:2:1]] is nicer than [file.org::1:2:1]]? > > Because you can write something more meaningful than "1:2:1" when using > a CUSTOM_ID. > > >> - it translates nicely to "id" tag in

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

2018-03-14 Thread Nicolas Goaziou
ST writes: > Why [[file.org::#1:2:1]] is nicer than [file.org::1:2:1]]? Because you can write something more meaningful than "1:2:1" when using a CUSTOM_ID. >> - it translates nicely to "id" tag in HTML. > > You can generate the "id" tag in HTML like this 1-2-1 (if HTML

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

2018-03-14 Thread ST
On Wed, 2018-03-14 at 14:26 +0100, Nicolas Goaziou wrote: > Hello, > > > I think this kind of linking is useful for many general cases. Christian > > has expressed concerns that such links are easily breakable which is > > true but only for documents that are in draft phase (or those which are >

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

2018-03-14 Thread ST
On Wed, 2018-03-14 at 07:15 -0700, John Kitchin wrote: > I don't think this should be in org-mode, it is still too fragile in > many ways. > > > For example, what if you have a colon in your headlines, e.g. "A > chapter about Romans 15:13". That will will mess up the suggested > approach that

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

2018-03-14 Thread Nicolas Goaziou
Hello, > I think this kind of linking is useful for many general cases. Christian > has expressed concerns that such links are easily breakable which is > true but only for documents that are in draft phase (or those which are > supposed to be restructured on regular basis - like ToDo lists).

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

2018-03-14 Thread John Kitchin
I don't think this should be in org-mode, it is still too fragile in many ways. For example, what if you have a colon in your headlines, e.g. "A chapter about Romans 15:13". That will will mess up the suggested approach that splits on ":". What if you have duplicate headlines in a hierarchy,

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

2018-03-14 Thread ST
John, thank you for this solution! I posted this question also here: https://emacs.stackexchange.com/q/39384/18760 So if you wish, you may add your solution also there. Somebody there, posted also a possible solution however the syntax is pretty heavy:

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

2018-03-14 Thread Michael Brand
Hi John On Wed, Mar 14, 2018 at 4:49 AM, John Kitchin wrote: > (defun xpath-follow (path) Thank you for this solution. I plan to adapt it to match the link path only to a portion of a headline branch by ignoring the higher and lower levels not given in the link path for

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

2018-03-13 Thread John Kitchin
This is a tricky problem to generally solve. I think this does it approximately well enough. It is lightly tested and works by exactly matching headlines at subsequent levels. It will be problematic if you have headlines with : in them, and it assumes there is a level 1 headline to start in.

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

2018-03-12 Thread ST
Hello, Ss Christian has pointed out - introduce a separate CUSTOM_ID for text with fixed structure and rather short verses is too heavy. I do need to write a custom link type, if this use case is not of common interest for the orgmode community. Thank you, On Mon, 2018-03-12 at 15:10 +0100,

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

2018-03-12 Thread Nicolas Goaziou
Hello, ST writes: > I'm not that experienced in writing in lisp. Is it difficult to create > such custom link type? What is the closest link type that you would > recommend to take as starting point (link on code, if possible)? I'm not answering your question, but I suggest

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

2018-03-12 Thread ST
Thank you for your reply. I'm not that experienced in writing in lisp. Is it difficult to create such custom link type? What is the closest link type that you would recommend to take as starting point (link on code, if possible)? Thank you! On Mon, 2018-03-12 at 14:08 +0100, Christian Moe

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

2018-03-12 Thread Christian Moe
ST writes: > Adding an extra <> is not an option, as it will make the text > less readable, and there is no need in this, as the headings tree > structure is already there: Adding targets, CUSTOM_IDs or IDs are all options. You may not like them. > * 1 > ** 1 > ** 2 > *** 1 > > Why should I

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

2018-03-12 Thread ST
PS: It doesn't have to be Bible. Links in form of citations, like [[MyBook:Chapter 1:Section 5:Subsection 3]] Is quite useful in general. Where #+LINK: MyBook path/to/MyBook.org::*%s It is both readable as raw text and clickable. Maybe it will be a good idea to be able to also add a <> at the

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

2018-03-12 Thread ST
Adding an extra <> is not an option, as it will make the text less readable, and there is no need in this, as the headings tree structure is already there: * 1 ** 1 ** 2 *** 1 Why should I turn it into the following * 1 ** 1 ** 2 *** 1 <<1>> and then link with [[file:1]]?!... This both: a)

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

2018-03-12 Thread Eric S Fraga
On Monday, 12 Mar 2018 at 12:09, ST wrote: > Hi, > > after reading the manual I didn't find a way to construct structured > links referring to headings with endless depth, like: I'm not entirely sure what your use case is but could you use a target, i.e. something like <>, to indicate where you

[O] Structured links to headings with endless depth

2018-03-12 Thread ST
Hi, after reading the manual I didn't find a way to construct structured links referring to headings with endless depth, like: having an file.org: * 1 ** 1 ** 2 *** 1 <---link here with the link: [[path/to/file.org::*1:2:1]] Is this possible or should I file it as feature request? PS: It