From: "Charles C. Berry" <ccberry@ucsd.edu>
To: Vikas Rawal <vikaslists@agrarianresearch.org>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>,
Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: org babel, ess, R
Date: Mon, 3 Jul 2017 19:17:13 -0700 [thread overview]
Message-ID: <alpine.OSX.2.20.1707031840040.1288@charles-berrys-macbook.local> (raw)
In-Reply-To: <DC33D716-05A8-4258-8405-8A87E095778D@agrarianresearch.org>
[-- Attachment #1: Type: text/plain, Size: 2131 bytes --]
On Tue, 4 Jul 2017, Vikas Rawal wrote:
>
>> On 04-Jul-2017, at 1:22 AM, John Hendy <jw.hendy@gmail.com> wrote:
>>
>> On Sun, Jul 2, 2017 at 7:17 PM, Vikas Rawal
>> <vikaslists@agrarianresearch.org> wrote:
>>>>
>>>> Vikas Rawal <vikaslists@agrarianresearch.org> 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 <ubermonk@gmail.com>
Subject: Jumping between source blocks in a file
Archived-At: <http://permalink.gmane.org/gmane.emacs.orgmode/103130>
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
next prev parent reply other threads:[~2017-07-04 2:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-01 1:36 org babel, ess, R Vikas Rawal
2017-07-01 3:38 ` Vikas Rawal
2017-07-01 12:53 ` Nicolas Goaziou
2017-07-02 2:48 ` Vikas Rawal
2017-07-02 7:05 ` Nicolas Goaziou
2017-07-03 0:17 ` Vikas Rawal
2017-07-03 2:21 ` Andreas Kiermeier
2017-07-03 2:28 ` Vikas Rawal
2017-07-03 2:35 ` Andreas Kiermeier
2017-07-03 19:52 ` John Hendy
2017-07-03 23:19 ` Vikas Rawal
2017-07-04 2:17 ` Charles C. Berry [this message]
2017-07-04 9:20 ` Vikas Rawal
2017-07-05 21:22 ` Nicolas Goaziou
2017-07-05 21:58 ` John Hendy
2017-07-06 4:42 ` Charles C. Berry
2017-07-06 4:53 ` Vikas Rawal
2017-07-06 5:25 ` Charles C. Berry
2017-07-07 11:57 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.OSX.2.20.1707031840040.1288@charles-berrys-macbook.local \
--to=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
--cc=vikaslists@agrarianresearch.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.