emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Evgenii Klimov <eugene.dev@lipklim.org>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: [FR] Add an option to use ID links during tangling
Date: Fri, 28 Jul 2023 11:13:31 +0100	[thread overview]
Message-ID: <874jlouytx.fsf@lipklim.org> (raw)
In-Reply-To: <87fs58fpg7.fsf@localhost>

Ihor Radchenko <yantar92@posteo.net> writes:

> Evgenii Klimov <eugene.dev@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

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

* package 1
** basic
** custom functions
** custom bindings
* package 2
** basic
** custom functions
** custom bindings

>> 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-88de8e19fac6@app.fastmail.com

  reply	other threads:[~2023-07-28 10:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27 14:20 [FR] Add an option to use ID links during tangling Evgenii Klimov
2023-07-28  7:46 ` Ihor Radchenko
2023-07-28 10:13   ` Evgenii Klimov [this message]
2023-07-28 10:35     ` Ihor Radchenko
2023-08-08 12:58     ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jlouytx.fsf@lipklim.org \
    --to=eugene.dev@lipklim.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).