thx john

that are very helpful tips!

Z

On Fri, Apr 17, 2015 at 4:56 PM, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
I like this kind of keyboard shortcut:

For python:
<p TAB C-w

For emacs-lisp

<el TAB C-w

What else would you want?

If you like yasnippets, you could do this:

# -*- mode: snippet; require-final-newline: nil -*-
# --

#+begin_src python
`(yank)`
#+end_src

$0

Or some kind of lisp function like:
#+BEGIN_SRC emacs-lisp
(defun paste-python-code ()
  (interactive)
  (insert "#+BEGIN_SRC python\n")
  (yank)
  (insert "\n#+END_SRC"))
#+END_SRC

I guess you need one of these for every language type.
Xebar Saram writes:

> Hi all
>
> i was wondering if anyone has every created a function to auto paste what
> in the sysclip/emas clip into org but as a formatted code block?
> any clue anyone?
>
> best
>
> Z

--
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