emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.
Date: Tue, 22 Apr 2014 20:04:43 -0400	[thread overview]
Message-ID: <87d2g92au5.fsf@gmail.com> (raw)
In-Reply-To: <87bnvt2h6r.fsf@bzg.ath.cx>

Hi Bastien,

Thanks for your feedback.

2014ko apirilak 22an, Bastien-ek idatzi zuen:

[...]

>> #+name: one
>> #+begin_src R :results file graphics :file png
>> ...
>> #+end_src
>
> What happens when there is :file png with no #+name line?

This case will be treated as before the patch: output will go to the
“png” file.  (The :output-dir property, if present, will apply.)

> Does :output-dir accept absolute or relative paths?  I'm asking
> because you speak of "subdirectory", but both should be accepted
> IMHO.

I agree.  I think the current patch does this as long as :output-dir is
an absolute pathname, but I have not tested that case.  I will

>
> Maybe there are cases where the :file value does not take an extension
> but the user still want to write the output to this file?  How would
> your patch handle this?

At present, it doesn’t.

> Looks useful to me, but ":file png" looks wrong, with too much
> implicit.  We should find something less confusing.

One option would be to use :file-ext instead, to generate a :file
parameter.  I didn’t go this route because autogenerating :file from
other parameters seemed like too much magic.  But your points in the
other direction are good.

How does this sound as an algorithm:
1. if :file is present, behave exactly as we do now
2. if :file is absent but :file-ext and a #+name is present, generate a
   :file parameter from :output-dir, the #+name, and :file-ext.

Open questions:
1. should :file-ext without a #+name be a no-op, or an error?
2. should :output-dir apply to the :file case as well?

--
Aaron Ecay

  reply	other threads:[~2014-04-23  0:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 19:54 [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks Aaron Ecay
2014-04-22 21:22 ` Bastien
2014-04-23  0:04   ` Aaron Ecay [this message]
2014-04-23  1:35     ` Eric Schulte
2014-04-23 14:58       ` Bastien
2014-04-28  2:18       ` Aaron Ecay
2014-04-28  6:20         ` Achim Gratz
2014-04-29 13:25         ` Bastien
2014-05-04 13:55         ` Eric Schulte
2014-05-11 20:38           ` Aaron Ecay
2014-05-14 17:46             ` Achim Gratz
2014-05-15 10:05               ` Bastien
2014-05-16  3:28               ` Aaron Ecay
2014-05-17  6:20                 ` Achim Gratz
2014-04-23  6:27     ` Bastien
2014-04-23 11:07       ` Eric Schulte
2014-04-23 19:44     ` Achim Gratz

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=87d2g92au5.fsf@gmail.com \
    --to=aaronecay@gmail.com \
    --cc=bzg@gnu.org \
    --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).