1

I use org-store-link pretty often for setting unique IDs to org-mode nodes. I have the following option set in my init file to make this possible:

(setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)

But for my use case, I would like them to be CUSTOM_ID properties, rather than ID properties, so I end up changing it each time, which is a bit annoying. Is it possible to have org-store-link insert CUSTOM_ID properties, instead of ID properties, when the option is set as above?

Just to be clear, this is only for Org mode buffers.


Update. :CUSTOM_ID: is used for basic navigation between(and within) org files:

[[#02363be6-0855-4e57-aa94-5663c6fa8451][internal link to Foo]]
[[file:README.org::#02363be6-0855-4e57-aa94-5663c6fa8451][link to Foo from other file]]

* Foo
:PROPERTIES:
:CUSTOM_ID:       02363be6-0855-4e57-aa94-5663c6fa8451
:END:
4
  • How do you use org-store-link to set unique IDs? These seem completely unrelated operations. I don't understand what you are doing or what exactly you are asking. An example might help.
    – NickD
    Jun 29, 2023 at 1:20
  • @NickD How do I use org-store-link - I navigate to a node in org file(like "Foo" in the example below) that, I run org-store-link and it inserts an :ID: property which I rename to CUSTOM_ID Jun 29, 2023 at 11:33
  • "...it inserts an :ID: property" - not here, it doesn't. You must have extra machinery in play to do that. Does it happen when you start with emacs -q?
    – NickD
    Jun 29, 2023 at 12:19
  • @NickD Extra machinery might be (setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id) in my config Jun 29, 2023 at 13:02

1 Answer 1

0

It doesn't answer the original question fully but as a workaround I used the following:

Create an interactive function and bind it to your preferred shortcut:

(org-set-property "CUSTOM_ID" (uuidgen-1))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.