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: Sun, 11 May 2014 16:38:15 -0400 Message-ID: <87tx8wnje4.fsf@gmail.com> References: <1398196476-4773-1-git-send-email-aaronecay@gmail.com> <87bnvt2h6r.fsf@bzg.ath.cx> <87d2g92au5.fsf@gmail.com> <8738h49u2g.fsf@gmail.com> <8761lugqyi.fsf@gmail.com> <87ha55a5tb.fsf@gmail.com> 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]:48988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjaUt-0004xJ-4J for emacs-orgmode@gnu.org; Sun, 11 May 2014 16:37:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjaUk-00060Y-2I for emacs-orgmode@gnu.org; Sun, 11 May 2014 16:37:23 -0400 Received: from mail-qc0-x22e.google.com ([2607:f8b0:400d:c01::22e]:47810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjaUj-00060U-Tk for emacs-orgmode@gnu.org; Sun, 11 May 2014 16:37:13 -0400 Received: by mail-qc0-f174.google.com with SMTP id x13so6944573qcv.33 for ; Sun, 11 May 2014 13:37:13 -0700 (PDT) In-Reply-To: <87ha55a5tb.fsf@gmail.com> 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: Eric Schulte Cc: emacs-orgmode@gnu.org 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 (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)))) >>> ...)) >> >> I=E2=80=99m not sure I like this approach. It relies on counting source >> blocks, so an addition/deletion of a block could change the index. >> I=E2=80=99m worried that this can lead to the accumulation of many output >> files: heading:1.ext, heading:2.ext, ... all with no clear indication >> of what block they were spawned by. It would also be possible for >> the result links in the buffer to become inconsistent with the actual >> block:auto-generated name mapping. >> >> 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 to add a name. >> > > Fair enough, especially given that this default will be applied to *all* > code blocks, this seems like a reasonable approach. I went ahead with my suggested approach here. [...] >> Achim raises a backwards compatibility concern. I am not sure how >> serious it is: the default settings (no :output-dir) are backwards >> compatible, and if users set that arg we ought to just give them what >> they ask for. >> >> Nonetheless, the new version of the patch conservatively obeys Achim=E2= =80=99s >> suggestion. I can change this to your suggestion, if that is the >> consensus. >> > > Please do make this change, I'd then be happy to apply the resulting > patch. Done, as you and Bastien suggested. Thanks, -- Aaron Ecay