From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: org babel, ess, R Date: Mon, 3 Jul 2017 19:17:13 -0700 Message-ID: References: <87mv8o2u9b.fsf@nicolasgoaziou.fr> <3295F295-A14A-43EA-8752-53D1BEBCC31A@agrarianresearch.org> <87fuef1fov.fsf@nicolasgoaziou.fr> <829AC437-872D-453D-8543-B3C147F08B54@agrarianresearch.org> Mime-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="0-705796199-1499134634=:1288" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSDP3-0002hy-0c for emacs-orgmode@gnu.org; Mon, 03 Jul 2017 22:17:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSDOz-0000vL-1U for emacs-orgmode@gnu.org; Mon, 03 Jul 2017 22:17:25 -0400 Received: from iport-acv3-out.ucsd.edu ([132.239.0.4]:12656) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1dSDOy-0000qy-I3 for emacs-orgmode@gnu.org; Mon, 03 Jul 2017 22:17:20 -0400 In-Reply-To: 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" To: Vikas Rawal Cc: org-mode mailing list , Nicolas Goaziou This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-705796199-1499134634=:1288 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT On Tue, 4 Jul 2017, Vikas Rawal wrote: > >> On 04-Jul-2017, at 1:22 AM, John Hendy wrote: >> >> On Sun, Jul 2, 2017 at 7:17 PM, Vikas Rawal >> wrote: >>>> >>>> Vikas Rawal writes: >>>> >>>>> Isn’t is what most users need while editing the code block? The >>>>> possibility of evaluating the code to test and see what happens? Often, but not always. And it would be seriously annoying to have the session buffer pop up every time I wanted to browse the code in a src block while simultaneously viewing the results of a previous invocation in the org buffer. As noted by others C-RET (or C-c C-n) on an empty line will make the session buffer visible. So will C-c C-z C-c C-z if you are in an ESS[S] mode buffer (and it will do that without trying to eval anything). There are any number of possibilities for customizing =org-edit-src-code= to your liking. For example, with this code C-c M-' will display the edit buffer and the session buffer as desired by Vikas: #+BEGIN_SRC emacs-lisp (defun my-babel-edit-src (&optional code edit-buffer) (interactive) (org-edit-src-code code edit-buffer) (when (string= mode-name "ESS[S]") (let ((cb (current-buffer))) (ess-switch-to-ESS t) (switch-to-buffer-other-window cb)))) (define-key org-mode-map (kbd "\C-c\M-'") 'my-babel-edit-src) #+END_SRC There are loads of possibilities. Just hack away at that function to add stops and whistles. Personally, I find that the code in this thread: From: Andrew Kirkpatrick Subject: Jumping between source blocks in a file Archived-At: has done a lot to ease my browsing and manipulation of src blocks even though it displays the org buffer along with the edit buffer --- requiring me to key in C-c C-z C-c C-z to get the process buffer back in view. I suppose I could replace =org-edit-src-code= at the end of Andrew Kirkpatrick's =my-babel-src-jump= with =my-babel-src-code= to fix that. Maybe tomorrow... Best, Chuck --0-705796199-1499134634=:1288--