Skip to content

Add customisable function for prompting when adding refs#2317

Merged
jethrokuan merged 2 commits intoorg-roam:mainfrom
Hugo-Heagren:ref-add-function
Feb 23, 2023
Merged

Add customisable function for prompting when adding refs#2317
jethrokuan merged 2 commits intoorg-roam:mainfrom
Hugo-Heagren:ref-add-function

Conversation

@Hugo-Heagren
Copy link
Copy Markdown
Contributor

Motivation for this change

I only use bibliography keys as refs, but I use a lot (e.g. for a book I'm half way through, I have nine nodes with the book's ref). When I want to add the ref to a node, at the moment I have to get the book's ref key somehow (e.g. with an embark action from citar, or by copying straight from Ebib), then run ``org-roam-ref-add`, then type '@', and finally insert the ref key and hit RET. This is a heavy workflow for something I do so often.

I imagine other users feel similarly. This PR lets the user set a prompt function for getting refs, which can streamline processes like this.

Personally, I could set this to a simple wrapper over citar-select-ref, though others might do otherwise. This makes the whole process of adding refs much simpler. Leaving the variable at nil retains the current behaviour or just prompting for a string.

@jethrokuan jethrokuan merged commit e73807e into org-roam:main Feb 23, 2023
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants