From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay 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 Message-ID: <87d2g92au5.fsf@gmail.com> References: <1398196476-4773-1-git-send-email-aaronecay@gmail.com> <87bnvt2h6r.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WckgE-0002Bo-3l for emacs-orgmode@gnu.org; Tue, 22 Apr 2014 20:04:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WckgD-0001VC-6g for emacs-orgmode@gnu.org; Tue, 22 Apr 2014 20:04:50 -0400 In-Reply-To: <87bnvt2h6r.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org 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 =E2=80=9Cpng=E2=80=9D file. (The :output-dir property, if present, will ap= ply.) > 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=E2=80=99t. > 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=E2=80=99t 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