emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: stardiviner <numbchild@gmail.com>
To: sam@crawf.uk
Cc: Ihor Radchenko <yantar92@posteo.net>, Org-mode <emacs-orgmode@gnu.org>
Subject: Re: The ob-R :results graphics file :dir "images" :file "plot.png" specified directory not working
Date: Wed, 15 Jan 2025 00:09:07 +0800	[thread overview]
Message-ID: <CAL1eYuKFqndsAbOKsMzm_-ZzotYAUmTt-6Ehm+V+CEjHGVSXsA@mail.gmail.com> (raw)
In-Reply-To: <67624935025af48d59e5a0437da4b793@purelymail.com>

[-- Attachment #1: Type: text/plain, Size: 1975 bytes --]

> 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' working
directory to a project root ("~/Org", in this instance)

Yes, I found the reason `project-rootfile` changed the directory when babel
source block execution.

> 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.

Thanks for your tips.


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


On Tue, Jan 14, 2025 at 6:49 PM <sam@crawf.uk> 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' working
> 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
>

[-- Attachment #2: Type: text/html, Size: 4398 bytes --]

      parent reply	other threads:[~2025-01-14 16:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25 10:57 [BUG] Relative filenames for graphics output in ob-R.el [9.8-pre (release_9.7.4-80-g7fa169)] Sam Crawford
2024-06-26 13:23 ` Ihor Radchenko
     [not found]   ` <Eol9qrqro63gxtIvCHknY775AV2QB4sVptOEZY__3tyWRRgw7GkCfbxqahcbQoVgNoQeqJzzXs5fHS-7ocn3OqTE0hJSwW9HCmWF4lt6N6g=@crawf.uk>
2024-06-27  9:41     ` [POLL] ob-R, ob-julia: Should we force-disable ess-ask-for-ess-directory? (was: [BUG] Relative filenames for graphics output in ob-R.el [9.8-pre (release_9.7.4-80-g7fa169)]) Ihor Radchenko
2024-06-28 12:47       ` Rudolf Adamkovič
2024-06-28 13:46         ` Christian Moe
2024-06-28 15:09       ` [POLL] ob-R, ob-julia: Should we force-disable ess-ask-for-ess-directory? Suhail Singh
2024-08-06  8:43       ` [POLL] ob-R, ob-julia: Should we force-disable ess-ask-for-ess-directory? (was: [BUG] Relative filenames for graphics output in ob-R.el [9.8-pre (release_9.7.4-80-g7fa169)]) Ihor Radchenko
2025-01-14  5:10         ` The ob-R :results graphics file :dir "images" :file "plot.png" specified directory not working stardiviner
2025-01-14  5:29           ` stardiviner
2025-01-14 10:49             ` sam--- via General discussions about Org-mode.
2025-01-14 16:04               ` stardiviner
2025-01-15  3:31                 ` William Denton
2025-01-14 16:09               ` stardiviner [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=CAL1eYuKFqndsAbOKsMzm_-ZzotYAUmTt-6Ehm+V+CEjHGVSXsA@mail.gmail.com \
    --to=numbchild@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=sam@crawf.uk \
    --cc=yantar92@posteo.net \
    /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).