emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Control where files are emitted during block eval
@ 2020-09-16 21:31 George Mauer
  2020-09-23  7:37 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: George Mauer @ 2020-09-16 21:31 UTC (permalink / raw)
  To: emacs-orgmode

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

I would like to create a playground.org file inside my node project where I
will put bits of code that I'm playing with during development.

The problem is that when I actually evaluate a source block it gets written
into a temporary location that I do not control - I therefore cannot
`require` my project's node modules as they will not be found.

Is there a way to control the location the temp file is written? Maybe -
assuming it uses `with-temp-file` - a way to control its directory and file
name generation algorithm via a header?

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Control where files are emitted during block eval
  2020-09-16 21:31 Control where files are emitted during block eval George Mauer
@ 2020-09-23  7:37 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2020-09-23  7:37 UTC (permalink / raw)
  To: George Mauer; +Cc: emacs-orgmode

Hi George,

George Mauer <gmauer@gmail.com> writes:

> I would like to create a playground.org file inside my node project
> where I will put bits of code that I'm playing with during
> development.
>
> The problem is that when I actually evaluate a source block it gets
> written into a temporary location that I do not control - I therefore
> cannot `require` my project's node modules as they will not be found.
>
> Is there a way to control the location the temp file is written?
> Maybe - assuming it uses `with-temp-file` - a way to control its
> directory and file name generation algorithm via a header?

One problem is that *every* ob-*.el in Org uses with-temp-file for
executing source code.

Also, it seems to be a very peculiar use case, so I would not go
for a new org-with-temp-file macro allowing such control, but that
maybe something you want to explore?

-- 
 Bastien


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-23  7:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 21:31 Control where files are emitted during block eval George Mauer
2020-09-23  7:37 ` Bastien

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