Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-05-16 Thread Achim Gratz
Aaron Ecay writes: > Fixed. (It actually required changes to the code, not the tests, since > my commit made org-babel-graphical-output-file stricter). OK. > Good catch (especially since I recently pushed a patch changing some > errors to user-errors *blush*). Fixed. Code review works. :-) R

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-05-15 Thread Aaron Ecay
Hi Achim, 2014ko maiatzak 14an, Achim Gratz-ek idatzi zuen: > That breaks the tests for Octave and Maxima; since you're intentionally > not keeping backwards compatibility here this should be fixed in the > tests, I'd think. Fixed. (It actually required changes to the code, not the tests, since

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-05-15 Thread Bastien
Hi, Achim Gratz writes: > That breaks the tests for Octave and Maxima; since you're intentionally > not keeping backwards compatibility here this should be fixed in the > tests, I'd think. Agreed. Aaron, can you take care of this? > Also, I'd think you should be using "user-error" instead of

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-05-14 Thread Achim Gratz
Aaron Ecay writes: > Thanks again for the feedback. I just pushed the revised patch to master. > >>> I think I would prefer the code in this patch to do nothing in this case >>> (not create a :file value), but for language-specific code that needs a >>> :file to raise an error to prompt the user t

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-05-11 Thread Aaron Ecay
Hi Eric, Bastien, Achim, et al., Thanks again for the feedback. I just pushed the revised patch to master. 2014ko maiatzak 4an, Eric Schulte-ek idatzi zuen: [...] >>> One option might be to borrow naming behavior from the comment >>> functionality in ob-tangle which looks like the following (f

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-05-04 Thread Eric Schulte
Hi Aaron, Thanks for this patch, and especially for including documentation. It looks good to me, and it (largely [1]) passes all tests. Aaron Ecay writes: > Hi Eric, Bastien, Achim, > > Thanks so much for the feedback. I’ve adopted the :file-ext approach > suggested by Bastien, leaving the p

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-04-29 Thread Bastien
Hi Aaron, Aaron Ecay writes: > Thanks so much for the feedback. I’ve adopted the :file-ext approach > suggested by Bastien, leaving the previous default behavior in place for > blocks with a :file argument. Looks good -- please apply in master. Thanks! PS: I assume you have commit and push a

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-04-27 Thread Achim Gratz
Aaron Ecay writes: > Thanks so much for the feedback. I’ve adopted the :file-ext approach > suggested by Bastien, leaving the previous default behavior in place for > blocks with a :file argument. THanks for taking care, I'll not have time to look at this for the remainder of the week, though…

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-04-27 Thread Aaron Ecay
Hi Eric, Bastien, Achim, Thanks so much for the feedback. I’ve adopted the :file-ext approach suggested by Bastien, leaving the previous default behavior in place for blocks with a :file argument. 2014ko apirilak 22an, Eric Schulte-ek idatzi zuen: [...] > One option might be to borrow naming

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-04-23 Thread Achim Gratz
Aaron Ecay writes: > 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. 3. If both :file and :file-ext are present, :f

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-04-23 Thread Bastien
Hi, Eric Schulte writes: > 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). Indeed, it's safer than just using the buffer file name. Aaron, please go ahead with the patch when you want,

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-04-23 Thread Eric Schulte
Bastien writes: > Hi Aaron, > > Aaron Ecay writes: > >> 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. > > I

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-04-23 Thread Eric Schulte
>> 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 mu

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-04-22 Thread Bastien
Hi Aaron, Aaron Ecay writes: > 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. I suggest this one: 1. if :file

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-04-22 Thread Aaron Ecay
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 wil

Re: [O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-04-22 Thread Bastien
Hi Aaron, thanks for the patch. Aaron Ecay writes: > #+name: one > #+begin_src R :results file graphics :file png > ... > #+end_src What happens when there is :file png with no #+name line? > The benefit comes from the reduced duplication of information in the > file. It also becomes possi

[O] [RFC] [PATCH] ob-core.el: allow the auto-generation of output file names for src blocks.

2014-04-22 Thread Aaron Ecay
* lisp/ob-core.el (org-babel-generate-file-param): New function. (org-babel-get-src-block-info): Use it. --- lisp/ob-core.el | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) This patch allows the autogeneration of result file names from source block names.