Re: [O] Split source block at point

2013-11-27 Thread Jambunathan K

C-h K C-c C-v C-d


Alexander Baier lexi.ba...@gmail.com 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



Re: [O] Split source block at point

2013-11-27 Thread Jambunathan K
Jambunathan K kjambunat...@gmail.com writes:

 C-h K C-c C-v C-d
  ^
  ^
  k

Looks like the keybindings are not indexed the canonical way in the Org
manual.
  
 Alexander Baier lexi.ba...@gmail.com 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



Re: [O] Split source block at point

2013-11-26 Thread Christian Moe

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:

C-c C-v d (org-babel-demarcate-block)

Yours,
Christian 





Re: [O] Split source block at point

2013-11-26 Thread Alexander Baier
On 13-11-27 08:17 Jambunathan K wrote:
 C-h K C-c C-v C-d


 Alexander Baier lexi.ba...@gmail.com 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