From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [PATCH] org.el: Added a new interactive function which inserts a code block Date: Tue, 08 May 2012 14:30:49 -0400 Message-ID: <87r4uuh6ee.fsf@gmx.com> References: <20120508211909.7e532ba3@asmara> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRr3g-0006A2-4I for emacs-orgmode@gnu.org; Tue, 08 May 2012 16:30:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SRr3e-0006ej-9Z for emacs-orgmode@gnu.org; Tue, 08 May 2012 16:30:55 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:54079) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SRr3e-0006eS-1w for emacs-orgmode@gnu.org; Tue, 08 May 2012 16:30:54 -0400 In-Reply-To: <20120508211909.7e532ba3@asmara> (Florian Adamsky's message of "Tue, 8 May 2012 21:19:09 +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: Florian Adamsky Cc: emacs-orgmode@gnu.org Hi Florian, You function looks good (although two lines in the middle are not indented correctly). Have you tried typing " writes: > Hello, > > I do not always use code blocks in org-mode, but when I do, I have > forgotten the syntax :-). In order to prevent that situation I wrote a > little function which is similar to org-insert-link. I called that > function org-insert-code-block. This function reads the language per > minibuffer in and supports completion. It only allows languages which > are loaded via org-babel-load-languages. > > Is this function also useful to others? I'm not a long-time Emacs lisp > hacker, so any comment is welcome. Has anyone an idea for a reasonable > keybinding for org-insert-code-block which is not already taken by > org-mode? > > Thanks in advance. > > Best regards, > Florian > -- Eric Schulte http://cs.unm.edu/~eschulte/