[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output fi
From: |
Aaron Ecay |
Subject: |
Re: [O] [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 |
User-agent: |
Notmuch/0.17+160~g03680d1 (http://notmuchmail.org) Emacs/24.4.50.2 (x86_64-unknown-linux-gnu) |
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
- [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks., Aaron Ecay, 2014/04/22
- Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks., Bastien, 2014/04/22
- Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.,
Aaron Ecay <=
- Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks., Eric Schulte, 2014/04/23
- Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks., Bastien, 2014/04/23
- Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks., Aaron Ecay, 2014/04/27
- Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks., Achim Gratz, 2014/04/28
- Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks., Bastien, 2014/04/29
- Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks., Achim Gratz, 2014/04/23