From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id kATDOXKLhmeShAAAqHPOHw:P1 (envelope-from ) for ; Tue, 14 Jan 2025 16:06:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id kATDOXKLhmeShAAAqHPOHw (envelope-from ) for ; Tue, 14 Jan 2025 17:06:11 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gNVFXX4E; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736870770; 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=is7wReDPjOgL/04HJPT+dxIDyUSadUv+MrrCEdpBzRI=; b=InyfihwGcoFoIdRlduThQSWLQlwmMZjPggDMcN5wPdkR9Am5kPUwhvnl/XmJxdlqvp2nc+ ojyfm03b2G/umaMzlhSzzKB8qGw/mGiWSa9YFeHu0VofO9EazT0e2F2tTMbUEQ3ORSGrY2 qiX5xSxFN8Kx4kOiNDWIKIOKR4mOBW8ky8HiW5hwb1IedY9fo41+E1tT7RF5iKip+JMxXs SfH+0XgksIJN3K2sjYzwFxe1WBR/vrIHAJRluj5hRckd0lEgjlsoIhVtFOGuj2WKgrH85u 4DmBzHHgApu/rlseVyf6vtQhOoJ5OLBxAnGLNlXZvfnDLMkg21dQkvE4pLpPdQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gNVFXX4E; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736870770; a=rsa-sha256; cv=none; b=Lc6I8xzvP7iiq0adkf1XAU90aSmOEIhlQC2xwE3q5Iu6Kvk5bO6xoGWTJDH5zC/8TR6f6D G+4bTcvLBpX1AZDmntSFoeUirrbg8CnhDZAm5PjO6TrdvOSUQL/ra2Rhg50D1zG/GdlIRh uJQCKTfzElKHd9xmkcfoXFktDYFv5MKwqOrfCu18/5acIHnJaP3BNlquhoQEgjwtb7gjgq WRRxJQRY2ygPGQi0cIVimB7PDE5/i1VHmcsj789ESw30ENcw7M8MllBZcu0eLLd/jXdrfb jrciKuaBRBwO6dyhk0NW6eNXX6Y/QN6ko/H6X26WpNjOZP7bPiKDGRLM9QKnPg== 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 87627783D9 for ; Tue, 14 Jan 2025 17:06:10 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tXjPp-00076v-Hg; Tue, 14 Jan 2025 11:05:17 -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 1tXjPj-000747-Oa for emacs-orgmode@gnu.org; Tue, 14 Jan 2025 11:05:11 -0500 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tXjPf-0001qR-2n for emacs-orgmode@gnu.org; Tue, 14 Jan 2025 11:05:11 -0500 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5401d3ea5a1so5625142e87.3 for ; Tue, 14 Jan 2025 08:05:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736870705; x=1737475505; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=is7wReDPjOgL/04HJPT+dxIDyUSadUv+MrrCEdpBzRI=; b=gNVFXX4Eh1zmMK5QrZTsn86WsFaJIU8ZzkU7Iz+LVdse3RqcM1DLrATanTRrv1UnBw mnbH58Zv/uQbvDNbWie22ByxDXLU8Ww+Hm+2jFWPxaX/Rioi3VUhbU2IB1tDy6d14e3V jt5GoDwxvcOiLxb5izeI62YrqshWtJjz4uanP/cOAWXyamLZZoWxOEyz+xnrbXw94Wms 9Oeu8ZqpXPGIZoxbevgq7V0YJ2TbiUDVH9a8J+5UgdzAejvrneUQx8u6MQlnPAF4u4C1 lIVg++xHpDhOeID6Lljn6jf4UTgjvmioX5iExfaPUaV2or1aKlBCev9UXJxqHFFp9JQ+ 4b9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736870705; x=1737475505; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=is7wReDPjOgL/04HJPT+dxIDyUSadUv+MrrCEdpBzRI=; b=Dhwrdua3PSY4I1YQ+1BmJtQS6TUVlNKY/75zBtszGEfpjLI9QhEmtDmom4buvM2V57 2LOd2NwbW7B6PRXeUFAVTTVSKVmejJc+7+4V3YIqTHBA4tGXYxnisDvUMP2HOkcXOXjp eCZDS7QDcW+ylrs7u/abyLD9UOZ1WVrZ+D03oaPWlLKKk6GG9+Fgh/cSvB+exH/j+Kxb JOatkbaueM1nvtbNUSUXubTV71ExbY7xlmlDdkQ2ZN7lhfjFxuyi8+hktKrMwCI8BvJe 7G5CXD0vkUJ2gLkNR0Owr7MK4/gTpJMT4bKkzMkKXxMzbPdGX45remqtFephbJd3nFwx l5dg== X-Forwarded-Encrypted: i=1; AJvYcCX1tLSt8utRLGQ9HuVxhZN3NT9PwXeJjoxl6lICOh7stO9zRDQyIQkTpbkGIe++lbVZUD4M7w/LtSt79MeF@gnu.org X-Gm-Message-State: AOJu0YyzBqXZIHSnpFS6Mj17/FErSaqDbMTZEdd5oRFZfIi4kecTNdcN CdYCqIRWXtzvEo8zIqRa0D76LXW2qwTXaniz67s4z0+1vu+AOAhMlB3eXKD9TJA7pGToO6EOFgW MZuCMg+Xy2aKQFBAyWi/zBNFDrg== X-Gm-Gg: ASbGncuaST9hNXhCyNp/K9jf4bAJG00bALGVkT2D5084lMcM06PuXFEXxreb2O13wb5 p3Letae+hgXpRKdvV5p+KqpUfBKP2MUax4KQxnpXkbI/jTPl/rUZTedUDE+U8EoNa5TzwH+g= X-Google-Smtp-Source: AGHT+IE+lu5NhIkG0Wb++Y2BFRlEohLMhmdcHXVXMHS1Dr+TJLUKgb+8tDkW8rBVLh2D05Z4uZEHbYuC0aQt6Ic9PuU= X-Received: by 2002:a05:6512:b87:b0:53e:395c:688b with SMTP id 2adb3069b0e04-542845bf66emr8353294e87.47.1736870703072; Tue, 14 Jan 2025 08:05:03 -0800 (PST) MIME-Version: 1.0 References: <16Z2_l6WnvrrYSQE7LC5XJQB3dO0DNAREBe7F4yE_DuNVOpHzqwELJ08ditlBSgFv_nnI3FSwi0JYCLEpd9CMqViJHxHiR3XbGeqDf4DM7Y=@crawf.uk> <87jzibkfc4.fsf@localhost> <871q4izpr4.fsf@localhost> <87y15ajb36.fsf@localhost> <67624935025af48d59e5a0437da4b793@purelymail.com> In-Reply-To: <67624935025af48d59e5a0437da4b793@purelymail.com> From: stardiviner Date: Wed, 15 Jan 2025 00:04:36 +0800 X-Gm-Features: AbW1kvZ0vOljXm_x2jCHnYr1NGnmLweYz1_ZZQEbfrJtiS-E3UHTZUMUI9bATCQ Message-ID: Subject: Re: The ob-R :results graphics file :dir "images" :file "plot.png" specified directory not working To: sam@crawf.uk Cc: Ihor Radchenko , Org-mode Content-Type: multipart/alternative; boundary="000000000000470d66062bacb944" Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=numbchild@gmail.com; helo=mail-lf1-x12b.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, HTML_MESSAGE=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 X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -5.52 X-Spam-Score: -5.52 X-Migadu-Queue-Id: 87627783D9 X-TUID: /LNGXIR0l7sj --000000000000470d66062bacb944 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Finally found the real reason: package `project-rootfile` -> (add-to-list 'project-find-functions #'project-rootfile-try-detect t) I don't know why project-rootfile involved in the Org mode Babel source block execution path. I checked out the source code of `project-rootfile`. Have not found any clue. Anyone have thoughts on this weird problem? [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint =3D 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ On Tue, Jan 14, 2025 at 6:49=E2=80=AFPM wrote: > On 2025-01-14 05:29, stardiviner wrote: > > I tested using org-mode's `make repro` clean Emacs & org-mode environment > instance. It works fine. I double checked my Emacs init file about R > settings. Have not found suspicious config. > > > So to confirm, you *cannot* reproduce the error with a clean config? > > Here is my reproduce test. > > > I tried running this, and it seems to work as expected. > > The generated plot image "images/hist_rnorm.png" is NOT in > "~/Org/Programming/R/images/hist_rnorm.png". It's in > "~/Org/hist_rnorm.png". > > > Some relevant settings that may be altered by your config are > `ess-startup-directory` and `ess-startup-directory-function`. It might be= , > for example, that one of these is forcibly changing the R process' workin= g > directory to a project root ("~/Org", in this instance) > > By the way, setting `:dir` changes the *working* directory, which you > might not want to be "images". There is a separate header argument, > `:output-dir` that can be used for this purpose. > > Sam > --000000000000470d66062bacb944 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Finally found the real reason: package `p= roject-rootfile` -> (add-to-list 'project-find-functions #'proje= ct-rootfile-try-detect t)
I don't know why project-roo= tfile=C2=A0involved in the Org mode Babel source block execution path.
I checked out the source code of `project-rootfile`. Have not = found any clue.
Anyone have thoughts on this weird problem= ?


[stardiviner]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 <Hack this world!>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 G= PG key ID: 47C32433
IRC(freeenode): stardiviner =C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 Twitter:=C2=A0 @numbchild
Key fingerprint =3D 9BAA 92BC = CDDD B9EF 3B36=C2=A0 CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


On Tue, Jan 14, 2= 025 at 6:49=E2=80=AFPM <sam@crawf.uk= > wrote:
On 2025-01-14 0= 5:29, stardiviner wrote:

I tested using org-mode's `make repro` clean= Emacs & org-mode environment instance. It works fine. I double checked= my Emacs init file about R settings. Have not found suspicious config.
So to confirm, you *cannot* reproduce the error with a clean config?
Here is my reproduce test.

I tried running this, and it seems to work as expected.

The generated plot image "images/hist_rnorm= .png" is NOT in
"~/Org/Programming/R/images/hist_rnorm.png&quo= t;. It's in "~/Org/hist_rnorm.png".

Some relevant settings that may be altered by your config are `ess-star= tup-directory` and `ess-startup-directory-function`. It might be, for examp= le, that one of these is forcibly changing the R process' working direc= tory to a project root ("~/Org", in this instance)

By the = way, setting `:dir` changes the *working* directory, which you might not wa= nt to be "images". There is a separate header argument, `:output-= dir` that can be used for this purpose.

Sam
--000000000000470d66062bacb944--