Allow specifying template keys in remaining org-roam-dailies capture/goto commands#2065
Merged
jethrokuan merged 4 commits intoorg-roam:masterfrom Jan 29, 2022
Conversation
This is an extension of PR org-roam#2028 [1] by @astery, where the `keys` argument was added to `org-roam-dailies--capture` `org-roam-dailies-capture-today`. I extended this argument to also be available in other built-in dailies functions, as I didn't see any reason why not and it results in my opinion in more consistent behaviour. The rationale is the same as in org-roam#2028: Allow users to add keybindings (or in my case hydras) to calls of org-roam-dailies functions with specific template keys, thus circumventing the selection screen. So far it seems to work for me. I have only one pet-peeve about the interface, if the user starts adding keys to all their goto-functions, they might add (org-roam-dailies-goto-date nil "<key>") Then the key-string will be interpreted as the value for `prefer-future` and since it's non-nil, there won't be an error. [1] org-roam#2028
astery
reviewed
Jan 27, 2022
Contributor
|
There was no special reason, I just missed them. |
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an extension of PR #2028 by @astery, where the
keysargument was added toorg-roam-dailies--captureorg-roam-dailies-capture-today.I extended this argument to also be available in other built-in dailies functions, as I didn't see any reason why not and it results in my opinion in more consistent behaviour. So far it seems to work for me. But I' wondering why @astery didn't implement that everywhere in the first place, so maybe there is a reason I don't know.
One thing that might be confusing for users is when they start adding the keys to all their dailies functions without reading their respective docstrings, since some have have already other optional arguments, so users might need to add some
nil's, e.g.Then, in this case, the key-string will be interpreted as the value for
prefer-futureand since it's non-nil, there won't be an error.Motivation for this change
The rationale is the same as in #2028: Allow users to add keybindings (or in my case hydras) to calls of org-roam-dailies functions with specific template keys, thus circumventing the selection screen.