emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Property header :session... really working?
@ 2017-08-10 12:54 Igor Sosa Mayor
  2017-08-10 16:34 ` Berry, Charles
  0 siblings, 1 reply; 3+ messages in thread
From: Igor Sosa Mayor @ 2017-08-10 12:54 UTC (permalink / raw)
  To: emacs-orgmode

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?

I'm using:

Org mode version 9.0.9
GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.16) of
2017-07-16

Many thanks in advance.


-- 
:: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Property header :session... really working?
  2017-08-10 12:54 Property header :session... really working? Igor Sosa Mayor
@ 2017-08-10 16:34 ` Berry, Charles
  2017-08-10 16:41   ` Igor Sosa Mayor
  0 siblings, 1 reply; 3+ messages in thread
From: Berry, Charles @ 2017-08-10 16:34 UTC (permalink / raw)
  To: Igor Sosa Mayor; +Cc: emacs-orgmode@gnu.org


> On Aug 10, 2017, at 5:54 AM, Igor Sosa Mayor <joseleopoldo1792@gmail.com> 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: <CAFVt51KWV2OUFB5NB4tSsxz+rJdftB3DRNKurfac4AdiRT0jrw@mail.gmail.com>

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Property header :session... really working?
  2017-08-10 16:34 ` Berry, Charles
@ 2017-08-10 16:41   ` Igor Sosa Mayor
  0 siblings, 0 replies; 3+ messages in thread
From: Igor Sosa Mayor @ 2017-08-10 16:41 UTC (permalink / raw)
  To: emacs-orgmode

"Berry, Charles" <ccberry@ucsd.edu> writes:

>
> If you have more than one session running, it is a consequence of ESS's handling of multiple sessions.

Yes, I have. That explains at least a little bit the issue... Thanks for
your very informative answer. 

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-10 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-10 12:54 Property header :session... really working? Igor Sosa Mayor
2017-08-10 16:34 ` Berry, Charles
2017-08-10 16:41   ` Igor Sosa Mayor

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).