[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?
From: |
Eric Schulte |
Subject: |
Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly? |
Date: |
Fri, 10 Aug 2012 21:37:03 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
>>
>> Yes, the order of precedence is
>>
>> system-level < buffer/subtree-level < language-level <
>> code-block-level
>
> Then I'd say buffer level does NOT override system-level for some
> reason.
I believe you mean the buffer-level does not override the
language-level.
> I just re-built Emacs from bzr to make sure I'm running somewhat
> recent Org.
>
> Another weird thing is that when I tried to use Org from git (and not
> the stock one), Emacs freezes deadly on
> (org-clock-persistence-insinuate) unless I kill ntvdm.exe with Task
> Manager (I'm on Windows). But I guess it is a separate story.
>
I have no idea what could be causing the above, but it seems unrelated.
>
>>> ,----[ snippet from dot emacs ]
>>> | (setq org-babel-default-header-args:R
>>> | '((:results . "output") (:session . "*R*")))
>>> `----
>>>
>>
>> Given that (:session . "*R*") will be used by default you could simply
>> remove it from your custom setting for org-babel-default-header-args.
>
> This made a trick. Now indeed I have *Rreport* after C-c C-c on code
> block. However after C-c ' whenever I attempt to S-RET, yet another *R*
> is launched every time instead of evaluating a line.
>
> So the question perhaps is:
>
> How to alter [1] such that when I edit code block with C-c ' , S-RET
> executes lines in a proper session. I believe all information is in
> there, I just have no clue how would I extract it, e.g. to which main
> buffer that code editing buffer (I don't know the right name for it)
> belongs to, and what session header is set to in that buffer.
>
> If there is a way to fetch those, perhaps I'd be able to alter original
> set up in [1].
>
You can find the name of the original org-mode buffer by running the
following snippet of elisp within the edit buffer.
;; -*- emacs-lisp -*-
(marker-buffer org-edit-src-beg-marker)
The `org-src-in-org-buffer' macro may be used from an edit buffer to run
elisp inside the code block, in the org-mode buffer of the edit buffer.
e.g., the following
;; -*- emacs-lisp -*-
(org-src-in-org-buffer (message "-->%S" (org-babel-get-src-block-info)))
Best,
>
>>> Footnotes:
>>> [1]
>>> http://www.kieranhealy.org/blog/archives/2009/10/12/make-shift-enter-do-a-lot-in-ess/
--
Eric Schulte
http://cs.unm.edu/~eschulte
- [O] [babel, ess] How can I make S-RET to be multi-session friendly?, Mikhail Titov, 2012/08/09
- Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?, Achim Gratz, 2012/08/09
- Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?, Eric Schulte, 2012/08/10
- Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?, Mikhail Titov, 2012/08/10
- Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?,
Eric Schulte <=
- Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?, Andrew Young, 2012/08/11
- Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?, Eric Schulte, 2012/08/14
- Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?, Mikhail Titov, 2012/08/14
- Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?, Bastien, 2012/08/14
- Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?, Mikhail Titov, 2012/08/16
- Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?, Eric Schulte, 2012/08/17
- Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?, Mikhail Titov, 2012/08/23