Richard Lawrence <richard.lawre...@berkeley.edu> writes: > Try this: in your .emacs, add the following code: > > (defun prompt-for-lastname-and-upcase () > (upcase (read-string "Last name: "))) > > This defines a function that will prompt the user to type a last name > into the minibuffer, converts the result into uppercase, and returns it > as a string. > > Then, in your capture template, change "%^{LASTNAME}" to > "%(prompt-for-lastname-and-upcase)".
By the way, if you need to do the same thing for other fields, you can do something like this instead: (defun prompt-and-upcase (prompt-str) (upcase (read-string prompt-str))) This generalizes the original function I gave you; you can pass in a prompt string. Then, in your capture template, wherever you need an uppercase field: %(prompt-and-upcase "Whatever prompt you need: ") e.g., %(prompt-and-upcase "Last name: ") Best, Richard