emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Berry, Charles" <ccberry@ucsd.edu>
To: Igor Sosa Mayor <joseleopoldo1792@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Property header :session... really working?
Date: Thu, 10 Aug 2017 16:34:16 +0000	[thread overview]
Message-ID: <4C0AEF77-9C21-440C-AFE9-F3AE6D5B5181@ucsd.edu> (raw)
In-Reply-To: <87a837mvly.fsf@gmail.com>


> 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


  reply	other threads:[~2017-08-10 16:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 12:54 Property header :session... really working? Igor Sosa Mayor
2017-08-10 16:34 ` Berry, Charles [this message]
2017-08-10 16:41   ` Igor Sosa Mayor

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C0AEF77-9C21-440C-AFE9-F3AE6D5B5181@ucsd.edu \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=joseleopoldo1792@gmail.com \
    /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 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).