From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Fenton Subject: Re: Babel - :export-dir and :file-ext arguments cause all blocks to emit files Date: Fri, 25 May 2018 07:32:33 +0200 Message-ID: <9756a22c-8c00-0239-fbf1-be11717020e9@pressure.to> References: <3ac2f42a-8ff2-1464-fa36-451e2ef0eacd@pressure.to> <87wovsprzd.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fM5LD-0006Yf-RP for emacs-orgmode@gnu.org; Fri, 25 May 2018 01:32:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fM5LA-0001Ok-NG for emacs-orgmode@gnu.org; Fri, 25 May 2018 01:32:39 -0400 Received: from darwin.servwise.com ([31.193.138.136]:58980) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fM5LA-0001NT-D7 for emacs-orgmode@gnu.org; Fri, 25 May 2018 01:32:36 -0400 Received: from p578d3681.dip0.t-ipconnect.de ([87.141.54.129]:50178 helo=[192.168.178.25]) by darwin.servwise.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1fM5L8-0002MO-4x for emacs-orgmode@gnu.org; Fri, 25 May 2018 05:32:34 +0000 In-Reply-To: <87wovsprzd.fsf@nicolasgoaziou.fr> Content-Language: en-GB 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" Cc: emacs-orgmode@gnu.org On 25/05/18 01:13, Nicolas Goaziou wrote: > Hello, > > Alex Fenton writes: > >> As far I understand it, |:output-dir| and |:file-ext| that were >> intended to be used in the global document header, applying to all >> blocks. >> >> However, it seems to mean that all blocks regardless of their :results >> args then emit a file, and put their output as a [file:] link. It's >> not clear from the docs why this happens. >> >> Am I missing something, or does this mean that these arguments are >> useless unless a document happens only to emit graphics from blocks? >> At the moment, the blocks (R, as it happens) are meant to sometimes >> emit scalars, sometimes literal latex, sometimes tables to be >> formatted by orgs, and sometimes graphics. But all the non-graphics >> are at the moment being stuffed into (non-working) PDF files. >> >> Following a discussion and suggested, but not-working solution at: >> https://emacs.stackexchange.com/questions/41618/org-modes-output-dir-and-file-ext-arguments-cause-all-output-to-be-saved-to > I agree something is cheesy here. > > According to `org-babel-execute-src-block', if :file is set (it can also > be forged from :file-ext and :output-dir according to > `org-babel-generate-file-param'), results become the filename. > > Also, according to `org-babel-merge-params' both :file and :file-ext > trump :results value, i.e., they automatically imply "file" in :results. > and "results" in :exports. > > At this point, I'm not sure about :export, but I think it should be the > other way for :results. IOW, :file and :file-ext should be taken into > consideration only when :results contains "file". > > WDYT? > > Regards, >