reddit / emacs

How to capitalize the begin_src/begin_export in org block?

Artistic-Boss-2430 · 2022-03-11 05:13
Hi all. In my emacs, whenever I type `<s` and press `TAB` I would get an auto expand block like this: #+begin_src #+end_src How do I make these headers to be capitalized? I have checked all my configs and there are no lines that said something about making the headers lower case. Interestingly, the Org website section 1.5 said that the default behavior should be capitalized, not lower case: [https://orgmode.org/org.html](https://orgmode.org/org.html) There is this answer here but to switch to lower case instead: [https://emacs.stackexchange.com/questions/34931/org-source-block-in-lowercase](https://emacs.stackexchange.com/questions/34931/org-source-block-in-lowercase) So I decide to experiment with the "accepted" answer and tried with `upcase` (mapc (lambda (arg) (setcdr arg (list (upcase (cadr arg))))) org-structure-template-alist) This yields error about wrong type argument `listp, export ascii` which is the list of argument/header to be inserted in the variable: `org-structure-template-alist` Any help is greatly appreciated. Thanks
razimbouzik · 2022-03-11 06:45
While I don't have the answer to your question, the org manual is not necessarily up to date on this one, as you can read here https://list.orgmode.org/87tuuw3n15.fsf@nicolasgoaziou.fr/ "Org is standardized on lower case. Uppercase is used in the manual as a poor man's bold, and supported for historical reasons." (Sorry for the very poor formatting, not sure how to do better on my phone)
Walheimat · 2022-03-11 11:31
I assume this is a `yasnippet`, so you could do `yasnippet-visit-snippet-file` (unsure about the exact name) and either edit there or create a custom snippet based on it.