[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] paste from clip to code block
From: |
Grant Rettke |
Subject: |
Re: [O] paste from clip to code block |
Date: |
Sat, 5 Sep 2015 15:15:26 -0500 |
On Thu, May 7, 2015 at 2:59 AM, Sebastien Vauban
<address@hidden> 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: address@hidden
# --
#+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
- Re: [O] paste from clip to code block,
Grant Rettke <=