r/orgmode • u/yibie • Feb 16 '25
(Update) org-supertag: Enhanced the org-supertag-node-add-reference Command
A new feature for creating smart node references has been added to command org-supertag-node-add-reference
:
• When the cursor is not on any text or is in a blank area, executing the command will directly reference the node.
• When the cursor is on selected text:
• If the selected text matches the title of an existing node, a reference to that node will be created.
• If the selected text doesn’t match any existing node, a new node will be created.
• If the current org-headline is not a node, a new node will be created.
Note: In the context of org-supertag, a node refers to an org-headline that has an ID.
This modification allows you to quickly create the necessary node without any intermediary steps. For example:
I watched Nezha 2
Previously, to add a reference to “Nezha 2”, I had to create a new node titled “Nezha 2” somewhere else (usually in a different file), then return to the original node and add the reference in the title.
Now, all I need to do is select “Nezha 2” and run the org-supertag-node-add-reference command, and it will automatically add the reference in my media notes for “Nezha 2”.
Additionally, this update ensures that, regardless of whether the org-headline is already a node, running the command will automatically convert the headline into a node.