emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Xebar Saram <zeltakc@gmail.com>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: org mode <emacs-orgmode@gnu.org>
Subject: Re: paste from clip to code block
Date: Fri, 17 Apr 2015 17:36:06 +0300	[thread overview]
Message-ID: <CAOQHXPq5hLC3-5GedG9_6y0mGQQc1gKCrq5BUOLaD-38a6xytQ@mail.gmail.com> (raw)
In-Reply-To: <m24moeg8oy.fsf@andrew.cmu.edu>

[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]

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
>

[-- Attachment #2: Type: text/html, Size: 1840 bytes --]

  reply	other threads:[~2015-04-17 14:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17  7:21 paste from clip to code block Xebar Saram
2015-04-17 13:56 ` John Kitchin
2015-04-17 14:36   ` Xebar Saram [this message]
2015-04-17 15:08   ` Jorge A. Alfaro-Murillo
2015-04-17 15:17     ` John Kitchin
2015-05-07  7:59       ` Sebastien Vauban
2015-09-05 20:15         ` Grant Rettke
2015-09-07 14:09           ` John Kitchin
2015-09-07 16:39             ` Grant Rettke
2015-09-07 20:18               ` John Kitchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOQHXPq5hLC3-5GedG9_6y0mGQQc1gKCrq5BUOLaD-38a6xytQ@mail.gmail.com \
    --to=zeltakc@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).