Ihor Radchenko <yanta...@posteo.net> writes:

> Evgenii Klimov <eugene....@lipklim.org> writes:
>
>> I see in the comment there the reason for that, but still would prefer
>> to use unique IDs in tangled files: the probability to overwrite wrong
>> source block under nonunique header overweights a side-effect of
>> creating new ID in Org file during tangling.
>
> Did you actually encounter such situation?
> `org-babel-detangle' is far from ideal in general.
> For example, detangling noweb references is pretty much guaranteed to
> create mess.

Yes, I did.  I keep my whole emacs configuration in an Org file and
tangle it after adjustments at Emacs startup (~org-babel-load-file~).
Recently I decided to split the tangled file and learned about
detangling.

And I have a lot of similar headers since my Org file looks like this:

#+begin_example
* package 1
** basic
** custom functions
** custom bindings
* package 2
** basic
** custom functions
** custom bindings
#+end_example

>> Can we do something with this?  Add another option or provide an even
>> eager value in =org-id-link-to-org-use-id=.
>
> I do not like the idea of creating side effects in the original Org
> document during tangling.
> We can, however, use (org-id-link-to-org-use-id 'use-existing) to use
> the already present IDs.

Understandable, with (org-id-link-to-org-use-id 'use-existing) I would
at least be able to manually add them where needed.

> Ideally, we should improve the detangling to understand the order of
> blocks better instead of searching the containing heading independently.

Maybe recent feature suggestion [1] will be of use here.

[1] 
https://list.orgmode.org/118435e8-0b20-46fd-af6a-88de8e19f...@app.fastmail.com

Reply via email to