From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Org babel does not work properly with included files Date: Thu, 05 May 2011 15:27:24 -0600 Message-ID: <87r58csurn.fsf@gmail.com> References: <4DBDFE55.7080303@sift.info> <4DBE1B3D.8080007@sift.info> <87aaf0vpgb.fsf@gmail.com> <4DC312CF.6050408@sift.info> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QI657-0006IW-Hl for emacs-orgmode@gnu.org; Thu, 05 May 2011 17:27:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QI656-0001LU-0D for emacs-orgmode@gnu.org; Thu, 05 May 2011 17:27:33 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:62947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QI655-0001LN-KZ for emacs-orgmode@gnu.org; Thu, 05 May 2011 17:27:31 -0400 Received: by pzk4 with SMTP id 4so1638204pzk.0 for ; Thu, 05 May 2011 14:27:30 -0700 (PDT) In-Reply-To: <4DC312CF.6050408@sift.info> (Robert Goldman's message of "Thu, 05 May 2011 16:12:47 -0500") 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: rpgoldman@sift.info Cc: Org Mode --=-=-= Content-Type: text/plain >> >> I'm not sure that the current behavior is a bug. Is it reasonable to >> place code block parameters into an included file? These parameters >> would not be successfully found during interactive evaluation, and could >> only plausibly be used during export as you anticipated. > > Aren't the code block parameters supposed to appear /with/ the code > block? So here's the use case: > > I have a file chapter.org. This contains a full draft of a chapter of > my manual. I finish it and circulate it for comments, then get it ready > for inclusion. > > Now I have manual.org and I want to include the main body of chapter.org > (typically there's some front matter I leave off). > > When I put the #include in manual.org, the source code snippets in > chapter.org, which used to work, no longer do. > > This doesn't seem like /such/ a crazy use case that it shouldn't work, > does it? > Oh, my apologies, apparently in scanning this email thread I mis-understood your use case. I've just tried to re-create the situation you've described above (including a file which contains code blocks). I was unable to reproduce your problem locally (the results of exporting both to html and tex are included). Could you modify the attached example sufficiently to demonstrate the problem you're experiencing? --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=example.tar.bz2 Content-Transfer-Encoding: base64 QlpoOTFBWSZTWXq3rfMACLB/jPyYAEp6f///vmff7v////oEAAAAyEhgC38AAAAAAAAAAAAAAAcN DRk0aNGmhkZDCAMgBkGmgAAZAyAcNDRk0aNGmhkZDCAMgBkGmgAAZAyAcNDRk0aNGmhkZDCAMgBk GmgAAZAyAcNDRk0aNGmhkZDCAMgBkGmgAAZAyAcNDRk0aNGmhkZDCAMgBkGmgAAZAyAFURBNNATR oBGmBAE0yGp4hojU9Q9ppE80NE1Mnqfz/ZH3v+vhPJyw5770aIpMxA/jLCIHVfzkkdMMPuOuy7rV 675mzbcjPGJHGhIRShFYiSfE1WQ3JFY1THYlWUqK2++yu2bZ9s+J/CTsSlJ0pQqSsfpw0QcaUFid C5VVYyFFWVVmsi8iiViOCiZQrEkRKUTKYlJZKyli2yszMxrmIY7M7YoiSDWiSEXtiUQ1pQl71ERF iUSiRIqoo2PleY+NH4JLSIxhR6z4dwqXfmxqvlVLj/R3FzSzPgUP1UfjGU83vZnHqTvOiFFfYzLv RDlORnhLqXEXKG4oVJ3UUN1IqtHS7ZFW05CUo1rF7KyIyFDIzPqS9J+xmRqRlRlWrkLP8zKU2rly WC2wuOJocRe2GsoymZeeMYs1SWZReWOlxMHC3lXW3jKanccLMXtxoXlq1yrC9wr0jI0KIjtMijMo l7BRKPtXtDYxYmlzLXAZXtWn1N4tMDcYrlGCxVqN1nVSSysEMxKEf0SH+myHE23EUJWeJsVXeRyt aTWS7GxU/WKKFzyn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+9McKI43UbSxxGdxLBSxo8Baix6HSP5ZHiWs uQzHPzbqgqjVtZTwC2EcXUcyT/Bih6EnN0ZHBnRmHmSiI7nt/DJn92VN5SvXRZKZRbYsVz/FHFTD AfckiLZJlsv7vv07bN2lHFp8nf3MdTD5toR/+LuSKcKEg9W9b5g= --=-=-= Content-Type: text/plain > > [btw, I am not entirely sure I know what "header parameters" are --- see http://orgmode.org/manual/Header-arguments.html > > are these the parameters that come from the #+begin_src line? If so, > shouldn't they definitely be read from the #+begin_src line? They > can't very well be read from manual.org, which doesn't contain the > #+begin_src line.] > These could appear with the code block, or as a property in an enclosing heading. Another example of a case where the original file is needed rather than the exported file would be the case of exporting a subtree which includes a block which references a variable defined elsewhere in the file. > > Sorry if I wasn't clear in my original message. > No problem, I believe I misread this email thread. Thanks -- Eric > > Best, > r > -- Eric Schulte http://cs.unm.edu/~eschulte/ --=-=-=--