Skip to content

Conversation

meliache
Copy link
Contributor

This is an extension of PR #2028 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. 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.

      (org-roam-dailies-goto-date nil "<key>")

Then, in this case, the key-string will be interpreted as the value for prefer-future and 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.

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
Copy link
Contributor

astery commented Jan 27, 2022

There was no special reason, I just missed them.

@jethrokuan jethrokuan merged commit 9f7a4a0 into org-roam:master Jan 29, 2022
@jethrokuan
Copy link
Member

Thanks!

@meliache meliache deleted the feature/dailies-allow-keys-in-all-capture-goto-templates branch January 30, 2022 23:02
@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.

3 participants