From mboxrd@z Thu Jan 1 00:00:00 1970 From: jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) Subject: Re: paste from clip to code block Date: Fri, 17 Apr 2015 11:08:38 -0400 Message-ID: <87383ypzbd.fsf@yale.edu> References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj7sw-0007YD-9B for emacs-orgmode@gnu.org; Fri, 17 Apr 2015 11:08:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yj7ss-0003l9-SJ for emacs-orgmode@gnu.org; Fri, 17 Apr 2015 11:08:50 -0400 Received: from plane.gmane.org ([80.91.229.3]:35094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj7ss-0003kA-Lo for emacs-orgmode@gnu.org; Fri, 17 Apr 2015 11:08:46 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Yj7sr-0002bF-7H for emacs-orgmode@gnu.org; Fri, 17 Apr 2015 17:08:45 +0200 Received: from nat-130-132-173-151.central.yale.edu ([130.132.173.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Apr 2015 17:08:45 +0200 Received: from jorge.alfaro-murillo by nat-130-132-173-151.central.yale.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Apr 2015 17:08:45 +0200 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: emacs-orgmode@gnu.org 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" "\n\n?")) (add-to-list 'org-structure-template-alist '("p" "#+BEGIN_SRC python\n?\n#+END_SRC" "\n\n?")))) #+END_SRC I even use the method in message-mode, for writing emails with code, like I just did now =) Best, -- Jorge.