[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] [APPLIED] Re: [PATCH] [babel] R :session should respect ess-as
From: |
Dan Davison |
Subject: |
[Orgmode] [APPLIED] Re: [PATCH] [babel] R :session should respect ess-ask-for-ess-directory set by user |
Date: |
Mon, 23 Aug 2010 23:12:28 -0400 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) |
Erik Iverson <address@hidden> writes:
> Hello,
>
> I have (setq ess-ask-for-ess-directory nil) in my .emacs. I.e., I don't
> want to be asked to set my working directory. As it stands, if we
> run an R code block with the :session argument and no :dir argument,
> ess-ask-for-ess-directory gets set to t. I would prefer if I had
> it previously set to nil, to do what ESS usually does to decide
> which directory to use.
>
> The following patch should do that, and below is some test code to
> make sure it works in each of the 4 cases.
Thanks Erik, I've applied that.
Dan
>
> ---
> lisp/ob-R.el | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/lisp/ob-R.el b/lisp/ob-R.el
> index 2a11421..e767449 100644
> --- a/lisp/ob-R.el
> +++ b/lisp/ob-R.el
> @@ -155,7 +155,8 @@ This function is called by `org-babel-execute-src-block'."
> "If there is not a current R process then create one."
> (unless (string= session "none")
> (let ((session (or session "*R*"))
> - (ess-ask-for-ess-directory (not (cdr (assoc :dir params)))))
> + (ess-ask-for-ess-directory
> + (and ess-ask-for-ess-directory (not (cdr (assoc :dir params))))))
> (if (org-babel-comint-buffer-livep session)
> session
> (save-window-excursion