From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: paste from clip to code block Date: Mon, 07 Sep 2015 10:09:01 -0400 Message-ID: References: <87383ypzbd.fsf@yale.edu> <86k2wkbyyb.fsf@example.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYx6d-0005ch-JO for emacs-orgmode@gnu.org; Mon, 07 Sep 2015 10:09:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYx6a-0008AQ-DA for emacs-orgmode@gnu.org; Mon, 07 Sep 2015 10:09:11 -0400 Received: from mail-qg0-x22b.google.com ([2607:f8b0:400d:c04::22b]:36758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYx6a-0008A7-7N for emacs-orgmode@gnu.org; Mon, 07 Sep 2015 10:09:08 -0400 Received: by qgx61 with SMTP id 61so62743142qgx.3 for ; Mon, 07 Sep 2015 07:09:07 -0700 (PDT) In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Grant Rettke Cc: Sebastien Vauban , "emacs-orgmode@gnu.org" Neat. Do you have some handy way to store a link to the source block, or jump to them? Grant Rettke writes: > On Thu, May 7, 2015 at 2:59 AM, Sebastien Vauban > 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: gcr@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 -- 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