From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Split source block at point Date: Wed, 27 Nov 2013 12:47:06 +0530 Message-ID: <87r4a2qpot.fsf@gmail.com> References: <87siui5n9k.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlZQY-0002v5-Vx for emacs-orgmode@gnu.org; Wed, 27 Nov 2013 02:20:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlZQQ-00064s-Ir for emacs-orgmode@gnu.org; Wed, 27 Nov 2013 02:20:50 -0500 Received: from mail-pd0-x233.google.com ([2607:f8b0:400e:c02::233]:34492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlZQQ-00064m-Ab for emacs-orgmode@gnu.org; Wed, 27 Nov 2013 02:20:42 -0500 Received: by mail-pd0-f179.google.com with SMTP id r10so9434889pdi.10 for ; Tue, 26 Nov 2013 23:20:40 -0800 (PST) In-Reply-To: <87siui5n9k.fsf@gmail.com> (Alexander Baier's message of "Wed, 27 Nov 2013 08:15:03 +0100") 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: Alexander Baier Cc: emacs-orgmode@gnu.org C-h K C-c C-v C-d Alexander Baier writes: > Hello together, > > is therer a command or a function that lets me split a source block at a > given position? I think what I mean is best demonstrated by looking at > an example: > > Given this buffer: > ---------------------------------------------------------------- > begin_src emacs-lisp > (defun foo () > (bar)) > > (baz (foo)) > end_src > ---------------------------------------------------------------- > > With point somewhere at the free line I want to invoke the split > function and get this: > ---------------------------------------------------------------- > begin_src emacs-lisp > (defun foo () > (bar)) > end_src > > begin_src emacs-lisp > (baz (foo)) > end_src > ---------------------------------------------------------------- > This is similar to what M-RET does in message-mode. > > Do we already have something like this in org? And if not, do you think > this is useful? Personally I find myself quite frequently splitting up > soure blocks manually. > > Best regards, > -- > Alexander Baier