[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Property header :session... really working?
From: |
Berry, Charles |
Subject: |
Re: [O] Property header :session... really working? |
Date: |
Thu, 10 Aug 2017 16:34:16 +0000 |
> On Aug 10, 2017, at 5:54 AM, Igor Sosa Mayor <address@hidden> wrote:
>
> Hi,
>
> I have in an org file the following
>
> #+PROPERTY: header-args:R :session *R-cities*
>
> I open a R session, rename it to *R-cities*, open the org file. If I go
> then to a babel block and send it to the R session with C-c C-c it is
> sent to the right session.
>
> But: if I edit the block with org-edit-src-code (C-c '), then the source
> buffer has no R-session attached and I'm asked which one I want to use.
>
> Is this maybe a small bug?
>
If you have more than one session running, it is a consequence of ESS's
handling of multiple sessions.
This issue is closely related to the one in this longish thread:
Subject: org babel, ess, R
Date: Sat, 1 Jul 2017 07:06:43 +0530
Message-ID: <address@hidden>
Getting stuff like this to work seamlessly looks to be a good challenge. I
notice that this function
,----[ C-h f org-babel-R-associate-session RET ]
| org-babel-R-associate-session is a compiled Lisp function in
| ‘ob-R.el’.
|
| (org-babel-R-associate-session SESSION)
|
| Associate R code buffer with an R session.
| Make SESSION be the inferior ESS process associated with the
| current code buffer.
|
| [back]
`----
looks like it aims to do something like what is needed, but never got used. I
suspect the author took a few steps in this direction and saw it was going to
be a heavy lift and gave up.
It isn't obvious to me how one would put a ruleset together that would work
well across a variety of situations with multiple sessions. That is, you may
want :session headers to be honored or ignored depending on circumstance.
HTM,
Chuck