From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Baier Subject: Re: Split source block at point Date: Wed, 27 Nov 2013 08:39:34 +0100 Message-ID: <87iove5m4p.fsf@gmail.com> References: <87siui5n9k.fsf@gmail.com> <87r4a2qpot.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlZj7-00019q-Ki for emacs-orgmode@gnu.org; Wed, 27 Nov 2013 02:40:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlZiz-0002qR-7y for emacs-orgmode@gnu.org; Wed, 27 Nov 2013 02:40:01 -0500 Received: from mail-ea0-x231.google.com ([2a00:1450:4013:c01::231]:38218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlZiz-0002qF-0f for emacs-orgmode@gnu.org; Wed, 27 Nov 2013 02:39:53 -0500 Received: by mail-ea0-f177.google.com with SMTP id n15so4301872ead.36 for ; Tue, 26 Nov 2013 23:39:52 -0800 (PST) In-Reply-To: <87r4a2qpot.fsf@gmail.com> (Jambunathan K.'s message of "Wed, 27 Nov 2013 12:47:06 +0530") 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: Jambunathan K Cc: emacs-orgmode@gnu.org On 13-11-27 08:17 Jambunathan K wrote: > 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 This works like a charm, thank you! Best regards, -- Alexander Baier