emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Alex Fenton <alex@pressure.to>
Cc: emacs-orgmode@gnu.org
Subject: Re: Babel - :export-dir and :file-ext arguments cause all blocks to emit files
Date: Fri, 25 May 2018 01:13:26 +0200	[thread overview]
Message-ID: <87wovsprzd.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <3ac2f42a-8ff2-1464-fa36-451e2ef0eacd@pressure.to> (Alex Fenton's message of "Thu, 24 May 2018 23:50:30 +0200")

Hello,

Alex Fenton <alex@pressure.to> writes:

> As far I understand it, |:output-dir| and |:file-ext| that were
> intended to be used in the global document header, applying to all
> blocks.
>
> However, it seems to mean that all blocks regardless of their :results
> args then emit a file, and put their output as a [file:] link. It's
> not clear from the docs why this happens.
>
> Am I missing something, or does this mean that these arguments are
> useless unless a document happens only to emit graphics from blocks?
> At the moment, the blocks (R, as it happens) are meant to sometimes
> emit scalars, sometimes literal latex, sometimes tables to be
> formatted by orgs, and sometimes graphics. But all the non-graphics
> are at the moment being stuffed into (non-working) PDF files.
>
> Following a discussion and suggested, but not-working solution at:
> https://emacs.stackexchange.com/questions/41618/org-modes-output-dir-and-file-ext-arguments-cause-all-output-to-be-saved-to

I agree something is cheesy here.

According to `org-babel-execute-src-block', if :file is set (it can also
be forged from :file-ext and :output-dir according to
`org-babel-generate-file-param'), results become the filename.

Also, according to `org-babel-merge-params' both :file and :file-ext
trump :results value, i.e., they automatically imply "file" in :results.
and "results" in :exports.

At this point, I'm not sure about :export, but I think it should be the
other way for :results. IOW, :file and :file-ext should be taken into
consideration only when :results contains "file".

WDYT?

Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2018-05-24 23:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-24 21:50 Babel - :export-dir and :file-ext arguments cause all blocks to emit files Alex Fenton
2018-05-24 23:13 ` Nicolas Goaziou [this message]
2018-05-25  5:32   ` Alex Fenton
2018-05-25 13:47   ` Aaron Ecay
2018-05-25 19:52     ` Alex Fenton
2018-05-27 16:40       ` Aaron Ecay
2018-05-27 19:54         ` Nicolas Goaziou
2018-05-27 20:39           ` Aaron Ecay
2018-05-27 20:50             ` Nicolas Goaziou

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=87wovsprzd.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=alex@pressure.to \
    --cc=emacs-orgmode@gnu.org \
    /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).