On Thu, May 7, 2015 at 2:59 AM, Sebastien Vauban <sva-n...@mygooglest.com> wrote: > John Kitchin wrote: >> I have these templates defined in my setup:
I used my duplicated Org macros as an excuse to learn YASnippet and came up with this. It is work in progress, but it works. I got tired of entering a name so many times along with an output file during exploratory programming in the .emacs.el: https://github.com/grettke/help/blob/master/yasnippet/org-mode/sc. It does require learning YAS at some point, and it is worth it. # -*- mode: snippet -*- # key: sc # name: Source Block # group: HELP # contributor: g...@wisdomandwonder.com # -- #+NAME: ${1:`(org-id-new)`} #+BEGIN_SRC ${2:$$(yas-choose-value '("emacs-lisp" "org" "sass" "R" "ditaa" "dot" "plantuml"))}${2:$(when (-contains? '("ditaa" "dot" "plantuml") yas-text) (concat " :file \\"./image/" (yas-field-value 1) ".png\\""))} $3 $0 #+END_SRC