From: Dan Davison <davison@stats.ox.ac.uk>
To: Erik Iverson <iverson@biostat.wisc.edu>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: [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 [thread overview]
Message-ID: <87iq30d7qb.fsf@stats.ox.ac.uk> (raw)
In-Reply-To: <4C7014ED.4030308@biostat.wisc.edu> (Erik Iverson's message of "Sat, 21 Aug 2010 13:03:25 -0500")
Erik Iverson <iverson@biostat.wisc.edu> 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
prev parent reply other threads:[~2010-08-24 3:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-21 18:03 [PATCH] [babel] R :session should respect ess-ask-for-ess-directory set by user Erik Iverson
2010-08-24 3:12 ` Dan Davison [this message]
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=87iq30d7qb.fsf@stats.ox.ac.uk \
--to=davison@stats.ox.ac.uk \
--cc=emacs-orgmode@gnu.org \
--cc=iverson@biostat.wisc.edu \
/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).