From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [babel] feature request: automatically connect source code block to its session Date: Tue, 22 Mar 2011 21:00:20 -0600 Message-ID: <87ei5ya672.fsf@gmail.com> References: <4D861AEF.2040806@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=56293 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2EMi-0004Sx-Ry for emacs-orgmode@gnu.org; Tue, 22 Mar 2011 23:04:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q2EMh-0004wx-Up for emacs-orgmode@gnu.org; Tue, 22 Mar 2011 23:04:08 -0400 Received: from mail-pv0-f169.google.com ([74.125.83.169]:57610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q2EMh-0004vw-Kf for emacs-orgmode@gnu.org; Tue, 22 Mar 2011 23:04:07 -0400 Received: by mail-pv0-f169.google.com with SMTP id 4so1514592pvg.0 for ; Tue, 22 Mar 2011 20:04:07 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Andreas Leha Cc: emacs-orgmode@gnu.org This seems reasonable, Do you know how ESS associates a code buffer with a session (i.e. is there some buffer-local variable which holds the session name)? With this information in hand it shouldn't be difficult to expand the C-' behavior for R s.t. it automatically associates the resulting Org-Src buffer with the proper R session. Good idea. Best -- Eric Andreas Leha writes: > Hi all, > > I have a feature request (if what I want is not already possible, that is). > > Could a source code block, which has the :session header argument, be > associated with its session as soon as C-' is pressed? > > The background to this question is, that all ess support functionality > for R (r-autoyas, autocomplete-R, and ess-eldoc) need an associated R > session. They start to function only as soon as the first line of the > code block is evaluated, which associates the source buffer with its > session. > The autocomplete-R even fails to load without an associated R session > (byte-code: Language mode `R-mode' fails with: "Symbol nil may not be > buffer-local") > and this way cuts the connection to org, such that C-' becomes undefined. > > Regards, > Andreas