[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: |
Eric Schulte |
Subject: |
Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks. |
Date: |
Tue, 22 Apr 2014 21:35:16 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
>> 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.
>
This sounds like a great approach to me.
>
> Open questions:
> 1. should :file-ext without a #+name be a no-op, or an error?
One option might be to borrow naming behavior from the comment
functionality in ob-tangle which looks like the following (from line 426
in ob-tangle.el).
(let (...
(source-name
(intern (or (nth 4 info) ; explicit #+name:
(format "%s:%d" ; constructed from header and position
(or (ignore-errors (nth 4 (org-heading-components)))
"No heading")
block-counter))))
...))
>
> 2. should :output-dir apply to the :file case as well?
>
If you mean "should :output-dir be used as the base when :file is a
relative pathname" then I'd say "yes", and I think if this isn't the
current behavior then the current behavior should be changed.
Thanks for this nice patch,
Eric
>
> --
> Aaron Ecay
>
--
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D
- [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, 2014/04/22
- Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.,
Eric Schulte <=
- 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