From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YLZQAqpPg2PoXQEAbAwnHQ (envelope-from ) for ; Sun, 27 Nov 2022 12:53:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id IOtIAapPg2OHygAAG6o9tA (envelope-from ) for ; Sun, 27 Nov 2022 12:53:14 +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 A93B9E334 for ; Sun, 27 Nov 2022 12:53:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozGCy-00016w-GN; Sun, 27 Nov 2022 06:52:28 -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 1ozGCw-00016i-Q9 for emacs-orgmode@gnu.org; Sun, 27 Nov 2022 06:52:26 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozGCu-0004fF-E9 for emacs-orgmode@gnu.org; Sun, 27 Nov 2022 06:52:26 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id ABA67240101 for ; Sun, 27 Nov 2022 12:52:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669549941; bh=8U6JFWd6M0TR1h9pMaDRRuyb+Ckum2lIoSVEtQWfnSc=; h=From:To:Cc:Subject:Date:From; b=F5TJD3EvKjwK1jwleqiFxLt6P671H+8MWgiLyJWTUCVP7sbls5DeaoCqiCcYufmYF mT5C7aBZnbfUPynq/CeUrHoH7y1wU8tjI0RJl2HRJ8h0q3FrYPtmCXFGBL78zxuvng unofb38/uT3/73pZWJMHZdNan+2KBX1k4uVzKEAqzp4v15A7Aclwjz12gR/zrTsvj/ WSQ6SP5TA065Ucc9meRJTP4M8kjBkTi1b2uo7YgHH5tjbOmMdDnYHW01wGrX5/WaQa NcEjpoZcVHfayY6+lltqRYwkat3y2QUYz0RHtj/UGafo1caQvZC7z3cvG/Q9oA49l2 kao/Mbx4D3M7w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NKn5c2KC1z6tm6; Sun, 27 Nov 2022 12:52:20 +0100 (CET) From: Ihor Radchenko To: Jeremie Juste Cc: William Denton , emacs-orgmode@gnu.org Subject: Re: Seeing all the steps when I run an R code block In-Reply-To: <87mt8cy6ct.fsf@gmail.com> References: <87bkp9dl76.fsf@localhost> <87bkoxj50h.fsf@localhost> <87mt8cy6ct.fsf@gmail.com> Date: Sun, 27 Nov 2022 11:52:46 +0000 Message-ID: <87cz98ipgx.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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=1669549993; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=HR+5V/Rb6Pd5ERYE0kFAWLBx1mJJjS8400PTsaCi6qA=; b=hxnq1pDXeKF/aKR9XOE0nTqjZE4qXKw4LI9q7wnwBNkRn61SSofLtqZQ/vMJo0EJnXgqoG pgAwSaThPCgGCMnuyfc0e25eOsM0gQ08zYZ7QRgZHb0p0G3nXd7GcXhPDvJvQP7KGyne6I ioGgmn96tQiDvx+gLCwGCl1baSDuLGkw/ofhwE5z1meaz5FYzYLjwWzmGt+ss4zZbenN4k effxuQd0MZbes8dW7EXOXZq7HQjBrzkcadZgetN0+x243f46RuMWPRJ+k/v8FHxMRqYaDU hRAiK/zl+wQWKVddLNICfFkZUI+yBC1ndAGzC7Fk7XuW2Fk6jCCGZAiIuqMCNg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669549993; a=rsa-sha256; cv=none; b=YhY/UQ9KFB2DSqjXdjAQgzpZfOp7dfERaQuUEKLrrSdI64IfUqBHw5qIDYBX8Uk/ItQ03j i+CUH9FRkLtrSvm5khsw73aTXlRAurCxlv6jXmL9TOxht+3712JmK5ZVR/cTZAtjcITiZF 8NGkcFMRemlY1hQVxtBNTTKFv7IzTPprCK+ZINXb0b6E/3bYcUXBZExxymT8mpQk4eg5/Z mqFfvW2UOWuqIkNNViWYDGgHs+4uETaxpvo/l2jwO7bL8m3n2aM2eO9ROpjR5xHhHlXCM+ +Q5hOsLUnzWiqnlhTIENzvssHx5pgsemUngN7RNEiPJ+Oouo1QwWjRq89eURAQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=F5TJD3Ev; dmarc=pass (policy=none) header.from=posteo.net; 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: -3.56 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=F5TJD3Ev; dmarc=pass (policy=none) header.from=posteo.net; 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: A93B9E334 X-Spam-Score: -3.56 X-Migadu-Scanner: scn1.migadu.com X-TUID: YTH6T/ND2aJM Jeremie Juste writes: > 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 configurat= ion. > Is the present state a satisfactory one? Please voice out your opinion. >From Org perspective, we should follow what :dir does and fallback to buffer's `default-directory' otherwise: 16.4 Environment of a Code Block The =E2=80=98dir=E2=80=99 header argument specifies the default directo= ry during code block execution. If it is absent, then the directory associated with the current buffer is used. In other words, supplying =E2=80=98:dir DI= RECTORY=E2=80=99 temporarily has the same effect as changing the current directory with =E2=80=98M-x cd DIRECTORY=E2=80=99, and then not setting =E2=80= =98dir=E2=80=99. Under the surface, =E2=80=98dir=E2=80=99 simply sets the value of the Emacs varia= ble =E2=80=98default-directory=E2=80=99. Setting =E2=80=98mkdirp=E2=80=99 = header argument to a non-=E2=80=98nil=E2=80=99 value creates the directory, if necessary. =20=20=20=20 For example, to save the plot file in the =E2=80=98Work/=E2=80=99 fo= lder of the home directory=E2=80=94notice tilde is expanded: =20=20=20=20 #+BEGIN_SRC R :file myplot.png :dir ~/Work matplot(matrix(rnorm(100), 10), type=3D"l") #+END_SRC So, if R has some way to override the working directory, we should enforce what we promise in the above section of our manual anyway. Otherwise, the will lose on Org document reproducibility. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at