unofficial mirror of emacs-orgmode@gnu.org
 help / color / mirror / 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

unofficial mirror of emacs-orgmode@gnu.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/orgmode/0 orgmode/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 orgmode orgmode/ https://yhetil.org/orgmode \
		emacs-orgmode@gnu.org
	public-inbox-index orgmode

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git