From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: [PATCH] org.el: Added a new interactive function which inserts a code block Date: Wed, 9 May 2012 11:17:16 +0930 Message-ID: <87mx5ijfbv.fsf@ucl.ac.uk> References: <20120508211909.7e532ba3@asmara> <87r4uuh6ee.fsf@gmx.com> <87d36e76d1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRvzx-0007Ep-PM for emacs-orgmode@gnu.org; Tue, 08 May 2012 21:47:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SRvzv-0008HJ-VS for emacs-orgmode@gnu.org; Tue, 08 May 2012 21:47:25 -0400 In-Reply-To: <87d36e76d1.fsf@gnu.org> (Bastien's message of "Tue, 8 May 2012 22:41:46 +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: Bastien Cc: emacs-orgmode@gnu.org, Florian Adamsky , Eric Schulte Bastien writes: > Hi Florian and Eric, > > Eric Schulte writes: > >> Have you tried typing "> code blocks, as well as > >> That said your function does more than the > limits the languages to those which are supported. If others think this >> is generally useful I'd be happy to add it to ob.el. > > Don't we have this already? > > > inserts > > #+begin_src=20 > > and offers completion over =CC=80org-babel-load-languages' (see > `pcomplete/org-mode/block-option/src' in org-pcomplete.el) > > This spares us new keybindings :)=20=20 Thanks for this! I didn't know that completion was possible at that point. Mind you, the list of possible completions seems to be somewhat limited. I wonder where the list comes from? (I know: I should look at the code... ;-) For the OP, I use yasnippet [1] to introduce src code blocks: ,----[ src ] | #name : #+begin_src language options ...#+end_src | # -- | #+name: $1 | #+begin_src $2 $3 | $0 | #+end_src `---- Footnotes:=20 [1] https://github.com/capitaomorte/yasnippet --=20 : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1 : using Org release_7.8.09-544-g505cc7