Re: [O] can I force all-caps in part of a headline in a capture template?
Richard, this is great! Thank you. --Chris Richard Lawrence wrote: Richard Lawrencerichard.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
[O] can I force all-caps in part of a headline in a capture template?
I work for a public health department. Twice in the past 5 years we have had to open evacuation shelters during a flood, for anywhere from 80 to 120 medically-frail evacuees. Our documentation system (paper) has improved, but it is still not ideal. I am experimenting with whether org-mode could meet our needs. It's basis in plain text may strike the proper balance between structure and flexibility. Part of my .emacs includes the following: (setq org-capture-templates '((a Admit entry (file ~/Shelter/ShelterAdmissions.org) * admit %^{LASTNAME}, %^{firstname} %U :PROPERTIES: %^{IDnumber}p %^{Birthdate}p %^{Age}p %^{Sex}p %^{Address1}p %^{Address2}p %^{City}p %^{State}p %^{Zipcode}p %^{Doctor1}p %^{Doctor2}p %^{Pharmacy1}p %^{Pharmacy2}p :empty-lines: 1) ) ) The first line in my ShelterAdmissions.org file is: #+TODO: admit(a) in(i!) out(o@) | discharged(d@) and things are working pretty well so far. I'd like to know if there is a way to force LASTNAME to show up in all-caps in ShelterAdmissions.org, regardless of how it is typed into the capture template. Thanks. --Chris Ryan
Re: [O] can I force all-caps in part of a headline in a capture template?
Hi Chris, 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). Best, Richard
Re: [O] can I force all-caps in part of a headline in a capture template?
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