From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Bug: Org Bable: Set R-specific buffer-wide graphics headers == no R src block eval [8.2.10 (8.2.10-1-g8b63dc-elpa @ /home/user/.emacs.d/elpa/org-20141027/)] Date: Sun, 2 Nov 2014 16:50:24 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xl3yf-00010B-6h for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 17:50:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xl3yd-0007uh-51 for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 17:50:29 -0500 Received: from mail-la0-x231.google.com ([2a00:1450:4010:c03::231]:45123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xl3yc-0007tw-Ib for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 17:50:27 -0500 Received: by mail-la0-f49.google.com with SMTP id ge10so8719451lab.36 for ; Sun, 02 Nov 2014 14:50:24 -0800 (PST) In-Reply-To: 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: myq larson Cc: emacs-orgmode On Fri, Oct 31, 2014 at 11:50 PM, myq larson wrote: > Remember to cover the basics, that is, what you expected to happen and > what in fact did happen. You don't know how to make a good report? See > > http://orgmode.org/manual/Feedback.html#Feedback > > Your bug report will be posted to the Org-mode mailing list. > ------------------------------------------------------------------------ > > The documentation suggests that the following should be possible: Could you link to the /specific/ documentation where you saw this? Since Org uses a manual as well as a ton of stuff in Worg, I find it helpful to look at the actual bit of code/explanation you were looking at. For example, the manual leads me to *somewhat* agree that the following should be possible (more on that later): - http://orgmode.org/manual/Header-arguments-in-Org-mode-properties.html > ,---- > | #+PROPERTY: header-args:R :exports results > | #+PROPERTY: header-args :results output graphics > | #+PROPERTY: header-args:R :width 400 > | > | #+BEGIN_SRC R :file /tmp/bug.png > | plot(rnorm(100)); > | #+END_SRC > `---- > > But the third line (`#+PROPERTY: header-args:R :width 400') silently > prevents /all/ R blocks from being evaluated. Changing the document to > the following works: I think your interpretation may be incorrect. Why do you think the blocks are not being evaluated? >From fiddling around myself, I believe the true cause is that the buffer can accept only *one* of each of these properties. My guess is that you're setting a variable somewhere, and adding two =header-args:R= simply overwrites the variable with the contents of the second vs. appending it. I could be wrong. > ,---- > | #+PROPERTY: header-args:R :exports results > | #+PROPERTY: header-args :results output graphics > | > | #+BEGIN_SRC R :width 400 :file /tmp/bug.png > | plot(rnorm(100)); > | #+END_SRC > `---- > > but doing so means that buffer-wide, /language-specific/ header defaults can not > be set to maintain consistency (at least for R) which is unfortunate. It > seems that buffer-wide headers can be set for /specific languages/, but > not language-specific headers? Maybe I haven't read enough of the > documentation yet, but it seems like that should be possible. Here was my experiment: Generates bug.png, exports into PDF, and size responds to changing 800 <-> 400 #+PROPERTY: header-args:R :width 800 :exports results #+PROPERTY: header-args :results output graphics Generates bug.png, exports into PDF, but size is not affected by :width arg #+PROPERTY: header-args:R :width 800 #+PROPERTY: header-args :results output graphics #+PROPERTY: header-args:R :exports results Generates bug.png, does *not* export to PDF, but you can verify that the size changes by viewing bug.png after using different :width settings: #+PROPERTY: header-args:R :exports results #+PROPERTY: header-args :results output graphics #+PROPERTY: header-args:R :width 800 So, my conclusion was that only the second property gets applied. If your conclusion that the block wasn't being executed was due to the plot not appearing in your resultant document, then we're on the same page. If you didn't even get a bug.png file with any of the combinations above... then maybe we have different issues. M-x org-version Org-mode version 8.3beta (release_8.3beta-483-g58bb3a @ /home/jwhendy/.elisp/org.git/lisp/) It's up to someone else regarding whether or not the #+property behavior is desired. I wondered what two subsequent #+options lines would do, for example, and they appear to be cumulative. For example: #+options: toc:nil #+options: num:nil Yielded both results even though the default contains both. An analog would have been for my document to retain a toc but with no section numbers. So, *something's* different between how these behave. Best regards, John > Thank you very much for this wonderful code/format/project. It's very useful!