From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cN/LJZVMg2OdGwAAbAwnHQ (envelope-from ) for ; Sun, 27 Nov 2022 12:40:05 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MJfDJJVMg2OYVQEAG6o9tA (envelope-from ) for ; Sun, 27 Nov 2022 12:40:05 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2056F13ECE for ; Sun, 27 Nov 2022 12:40:05 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozG03-0006an-Fc; Sun, 27 Nov 2022 06:39:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozG01-0006aT-8d for emacs-orgmode@gnu.org; Sun, 27 Nov 2022 06:39:05 -0500 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ozFzz-0002Rb-DX for emacs-orgmode@gnu.org; Sun, 27 Nov 2022 06:39:04 -0500 Received: by mail-ej1-x631.google.com with SMTP id fy37so19560311ejc.11 for ; Sun, 27 Nov 2022 03:39:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=L+7JkBDDI1espO2Y1+gEs5gKRsctArLlBFBqYq7/+XY=; b=T9GnG3NjY8o/1UxXXYTxcQbWBa3s28tfkYE9LO8m13qGW2T8+m6kL93D0KZkFcNX70 28YqVlV73bbd/Z/NLkHhjG7o2DJ1mDLN2OJThCJoMg6uoFjVrxkx2WOLa3UThR+gbBIF Q8TQ+97VGY829W7PPk02l6vRInDWHrI+/QBaaPtI7Zm4E8yD9xrl6sSRKBeYLINph2Qr iLN+R4UC/a/iSOXor02et9ovbeD78NGUXIDoKCe+8kEd6mQYXaVcPZWcVflAuiMFR79B YBAXVKjwbCjdYu+qWb5G1xN9RPUHjbivcDNYU9OrzMyLlXpbg+w9NyBnd7HTu8jEJ7QU 7+/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=L+7JkBDDI1espO2Y1+gEs5gKRsctArLlBFBqYq7/+XY=; b=Sf9bjPlFxE7W35WWBusQ+4J052FO1wd9Up64BJtOSPBdysY2ob8hNs5tIP+XwTxSEK O25xxQzL9mEHEHjkAPu/AXi9IQTN8n8xMseUQ9Uj0EWRKLFy7cTLIQVWMMmBs6Zbxogi 8gy/rmOIjyH7cR15QW6QOXpApxr0yz0UwCJs3b5gjXRYLWeqJiopItmoZg8BT3ScdXgM RRKD2eW5aZoUsP2W0UVn4aBY6LeYhQVCa7kjvYLjBBAzMfp1+5UmWJrR0c/0tJTctJe0 XjXCU0cKQbJ53n5nQ6AiuAiflPpMpyzW0O0uSG8KzrPL4KJvMTxombwdn5SteyHLtdue f2Ew== X-Gm-Message-State: ANoB5pkdQiVgT4Wk7zifs1b/an7mDGgKMZiZ9lZzCqqM16vgk8O7oRDa f+PfDU31vXyMPb+wB0hwr0p0egARTXBzXQ== X-Google-Smtp-Source: AA0mqf6d9jbSBSH/7/iQmOrY4Ohb7FMP8tBms0ty1wwH6uP35hM/x38Fc1MQRJ5IIMt0oT3ehh0jqA== X-Received: by 2002:a17:906:404:b0:781:f54c:1947 with SMTP id d4-20020a170906040400b00781f54c1947mr26788513eja.69.1669549141392; Sun, 27 Nov 2022 03:39:01 -0800 (PST) Received: from flexignu ([2a02:908:1d5:3c20:cc2b:39eb:1f5e:47a5]) by smtp.gmail.com with ESMTPSA id g1-20020a17090604c100b007bb95b3b2d0sm2483534eja.34.2022.11.27.03.38.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Nov 2022 03:39:00 -0800 (PST) From: Jeremie Juste To: Ihor Radchenko Cc: William Denton , emacs-orgmode@gnu.org Subject: Re: Seeing all the steps when I run an R code block References: <87bkp9dl76.fsf@localhost> <87bkoxj50h.fsf@localhost> Date: Sun, 27 Nov 2022 12:38:58 +0100 In-Reply-To: <87bkoxj50h.fsf@localhost> (Ihor Radchenko's message of "Wed, 23 Nov 2022 11:15:42 +0000") Message-ID: <87mt8cy6ct.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=jeremiejuste@gmail.com; helo=mail-ej1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669549205; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=L+7JkBDDI1espO2Y1+gEs5gKRsctArLlBFBqYq7/+XY=; b=YCv1mQ7VyLRiQUHWMl88o42P0cun2tS7FUvFtykaXhDPBksOrGno4xyWEE/8QbnluTnWDd 5QDV3B6AtKnz06g8zPwAlrQduxVIUUuNnj7CvYqKCpEAq1R4MQKuoE5kzlfSqNa0/6qOib rDHspWze18VqUWDmXt1ohsRGYRwgS73R+QS/sm1RxxyImofMZbd9VljDBeMA+9Fe0W1+X9 Wy8SoA89IqNcAgzqOL5r7CDkq2e4IIra/54T+CrYfo3fHM8xJrKOIprCx9vAGS82EOe7eT nUxZikPv5iCq6Uxny9ws/37ulO86VwMxLRtLDX+7gb5gknb9mrcEvk0P0NrHnQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669549205; a=rsa-sha256; cv=none; b=jvvmikZNxUccPvvCi+J0QOTXc5TlWOFR1gYnDZ1R92lyTWLc2ZWvX6KmQTJqvCUFOY2ewD dqMKxCM02EJJSK3UnmzO3G3TtA/kY1cGT44dFb9Dm1BGKJHj0a19MKgCmz765r33qaIsit UHHy2EXBmMkAMAPG0NkofGqD88mbfEfKBegoIRfiB7FryTzv97mX4I5/FI3jwtSF9m1jUg j6y54PGy855u0GLqkubNddOvdHnSv8bvLpgMhf3gCSyXrxB44oRYOEDyHF4UJgKHkbhG9D 84IUdtpixxZkbDFhNYnXjaxTw6+tj/bSVbaG2wJgzVXEQ1uK3Wf0GSz2x49Wtg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=T9GnG3Nj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -7.46 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=T9GnG3Nj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2056F13ECE X-Spam-Score: -7.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: MxCdRJ1Csn0Y Hello William, Many thanks for reporting. > > I think this specific issue might be solved on Org side. > We can let-bind `ess-startup-directory' to 'default-directory while > running R source blocks. > > CCing the maintainer. Ihor, many thanks for the suggestion. However I'm not sure it will work here. The issue is that sometimes ESS has many ways of doing the same thing so finding a middle ground is more challenging. A possible configuration related to the point above for ESS is to do the following (setq ess-startup-directory nil) (describe-variable 'ess-startup-directory) which regardless of the value in the 'default-directory, will start the R process in the current project directory With the configuration above org-mode does not have any issues finding the current directory. For instance If I move following file test.org in the directory /home/djj/Documents/projects/R. And run the code chunk I get. #+begin_src R getwd() #+end_src #+RESULTS: : /home/djj/Documents/projects/R Moving it to /tmp/test/, I get #+begin_src R getwd() #+end_src #+RESULTS: : /tmp/test Note also that you can force the R process to start in a particular directory with the dir parameter. #+begin_src R :dir ~/ getwd() #+end_src #+RESULTS: : /home/djj Now on the org-mode side. This is becomes tricky because I don't know what users expects. For now this issue is delegated to the ESS configuration. Is the present state a satisfactory one? Please voice out your opinion. Hope this help, Jeremie