you are right, I meant C-y ;)
I have these templates defined in my setup:
;; * Expansions for blocks
;; add
\n?\n"))
;; add \n?\n"))
;; add \n?\n"))
;; add \n?\n"))
;; add \n?\n"))
John
-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
On Fri, Apr 17, 2015 at 11:08 AM, Jorge A. Alfaro-Murillo <
jorge.alfaro-murillo@yale.edu> wrote:
> John Kitchin writes:
>
> I like this kind of keyboard shortcut:
>> For python: > For emacs-lisp
>> >
>
> I agree, this is the best method. Although probably you mean C-y instead
> of C-w.
>
> For the record, this requires you to set up `org-structure-template-alist'
> to include python and emacs-lisp. For example, I use p and E, for python
> and emacs-lisp, so in my .emacs I have:
>
> #+BEGIN_SRC emacs-lisp
> (eval-after-load "org"
> '(progn
> (add-to-list 'org-structure-template-alist
> '("E"
> "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC"
> " lang=\\"emacs-lisp\\">\n\n?"))
> (add-to-list 'org-structure-template-alist
> '("p"
> "#+BEGIN_SRC python\n?\n#+END_SRC"
> " lang=\\"python\\">\n\n?"))))
> #+END_SRC
>
> I even use the method in message-mode, for writing emails with code, like
> I just did now =)
>
> Best,
>
> --
> Jorge.
>
>
>