I am using org-roam-dailies-capture-templates for inserting vocabulary items (in their own subheader) in my dailies files for later reviewing with org-drill.
I got the capture template itself stored in ~/org/roam-capture-templates/ directory. Here’s the en_vocab.org file contents:
When I call the template, I enter the new english word into the %^{New word} prompt. The %\1 simply repeats the word I entered in its place, giving the org-drill flashcard its front face. Now, the question is this: how do I get the template AUTO-CAPITALIZE, ie, turn the word I entered in %^{New word} prompt into ALL-CAPS?
I’ve spent hours trying to find solution online. Forums, stackexchange, and LLM agents didn’t yield a solution. Do you guys know a way to achieve that?
CapsLock is too far away from my fingers. When I capture a word I don’t want to bother with hitting difficult to reach capslock key. I just want to jot it down and let emacs handle the auto upcase’ing.
Capitalization catches my eye among my other notes in the dailies pages.
It gives a distinction and improves the overall structure of the daily
page, imo.
*** New word: %(upcase (read-string \"New word: \"))
But then %\1 won’t repeat the word you enter.
If you don’t need to use capture template, I would not. But if you have a reason to use a capture template, then you would probably need to pass the WORD to a global variable. It feels a bit too complex a solution for the outcome if it were for me. I cannot judge how much capitalization means to you, so you could pursue this further.
If youd really like to achieve this without the easy path mentioned by @nobiot then you can try to modify the org-capture-fill-template and create a version for just this need.
Any step youd take will increase the complexity immensely - fundamentally this is not a hill i would like to die on.
I can even imagine creating a function that would iterate over files in the dailies directory and depending on specific parameters placed before do this capitalisation –
either ways the complexity is too much, using the right side shift key is the preferred solution - I don’t think capitalising some words while writing will disturb your thinking midway in any way -
but for the general class of problem that the mnemonic based keybinding loses its appeal after muscle memory has been built - I would try to establish a keybinding system that places statistically important keys in appropriate place - but this is altogether a different problem.