0

I have a large collection of notes in org-mode, each with it's own heading and org-id. For example

* Note one
  :PROPERTIES:
  :ID:       403847B2-3D4C-4EFB-96DE-E0C5C52A02B5
  :END:

* Note two
  :PROPERTIES:
  :ID:       3F6CD10D-3DE9-4585-8E8F-845F6B5CBA60
  :END:
* Etc.

Invariably, I now find that some of these overlap and could be merged or otherwise refiled. The trouble is that many of these notes are linked to from other points in the document, so if I now combine Note oneand Note two under a single Note one/two heading, I will more than likely be breaking (at least some of) the links that point to these topics.

Is there a function or workflow for merging headlines that will also update links pointing to them? Or perhaps a way to assign both org-ids to the same headline? Something like this, perhaps:

* Note one/two
  :PROPERTIES:
  :ID:      403847B2-3D4C-4EFB-96DE-E0C5C52A02B5; 3F6CD10D-3DE9-4585-8E8F-845F6B5CBA60
  :END:
* Etc.
  • org-find-entry-with-id searches only for exact matches of the id. So there is nothing like alternative ids for the same heading built-in. Furthermore, the ids are hold in a database that assigns files to ids. So it is not very wise to advie org-find-entry-with-id. A naive way to replace the id of the removed heading with that one of the combined heading would be query-replace for id:.... There are many tools for query-replacing in multiple files if that matters for you. – Tobias Feb 13 at 15:39
  • Perhaps an easier way of handling this situation is to refile "Note two" under "Note one" using the org-refile command. This would preserve your links and still keep the contents of both entries together. – jagrg Feb 13 at 18:55
  • Thanks @Tobias. I'll take a look at query-replace-id. – Adam Feb 13 at 19:53
  • Hi @jagrg agreed, it would definitely be easier. But often times I find that writing is an iterative process, where I am constantly organizing and reorganizing and refining my ideas. Unfortunately, as handy as it is to link everything up, it seems that this really handcuffs you creatively, at the same time... unless I am missing something. – Adam Feb 13 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.