From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: Bug: [babel] Order of definition of :var makes or breaks the results [8.2.5f (release_8.2.5f-545-g630096 @ /Users/rainerkrug/.emacs.d/org-mode/lisp/)] Date: Wed, 22 Jan 2014 20:55:52 +0100 Message-ID: <52E02248.2090208@krugs.de> References: Reply-To: Rainer@krugs.de Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W63uG-0007TE-Bn for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 14:56:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W63uB-0000I5-A6 for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 14:56:12 -0500 Received: from mail-wg0-f54.google.com ([74.125.82.54]:62204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W63uB-0000HJ-1l for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 14:56:07 -0500 Received: by mail-wg0-f54.google.com with SMTP id x13so743221wgg.33 for ; Wed, 22 Jan 2014 11:56:04 -0800 (PST) Received: from Rainers-MacBook-Pro-2.local ([2a01:e35:8baa:b070:b550:3b57:f916:dac0]) by mx.google.com with ESMTPSA id 12sm16982179wjm.10.2014.01.22.11.55.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 11:56:02 -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: emacs-orgmode@gnu.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Any confirmation of this bug? Rainer On 01/21/14, 15:17 , Rainer M Krug wrote: > Depending on the order in which variables are declared, the > definitions are correct or wrong. > > In the example below, if DUMMY is declared first and SPECIES and > SPECIES2 are declared via :var+ there are missing rownames and / > or colnames as well as mixups (see below). > > If DUMMY is declared *after the first* table (SPECIES) everything > works as expected. > > I don't know if it is the same in other languages. > > Example: > > #+PROPERTY: rownames yes #+PROPERTY: colnames yes #+PROPERTY: var > DUMMY="dummy" > > * Species names and iespece codes #+NAME: SPECIES | | > fullName | shortName | iespece | IFNName | color | > |---------+-----------------+-----------+---------+-----------------+-------| > > | fagus | Fagus sylvatica | fagus | 3 | fagus_sylvatica | red | > | quercus | Quercus robur | quercus | 4 | quercus_robur > | green | #+PROPERTY: var+ SPECIES=SPECIES > > > * And some more #+NAME: SPECIES2 | | fullName | > shortName | iespece | IFNName | color | > |---------+---------------+-----------+---------+---------------+-------| > > | no idea | ffff | | | | | > | quercus | Quercus robur | quercus | 4 | quercus_robur | > green | #+PROPERTY: var+ SPECIES2=SPECIES2 > > > * The code #+begin_src R :exports both :results output SPECIES > #+end_src > > #+RESULTS: : fullName shortName iespece > IFNName color : no idea Fagus sylvatica fagus 3 > fagus_sylvatica red : quercus Quercus robur quercus 4 > quercus_robur green > > > #+begin_src R :exports both :results output SPECIES2 #+end_src > > #+RESULTS: : X X.1 X.2 X.3 : > Quercus robur quercus 4 quercus_robur green > > > > 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. > ------------------------------------------------------------------------ > > > > > Emacs : GNU Emacs 24.3.1 (x86_64-apple-darwin13.0.0, NS > apple-appkit-1265.00) of 2013-12-13 on Rainers-MacBook-Pro-2.local > Package: Org-mode version 8.2.5f (release_8.2.5f-545-g630096 @ > /Users/rainerkrug/.emacs.d/org-mode/lisp/) > > current state: ============== (setq org-src-lang-modes > '(("plantuml" . plantuml) ("ocaml" . tuareg) ("elisp" . emacs-lisp) > ("ditaa" . artist) ("asymptote" . asy) ("dot" . fundamental) > ("sqlite" . sql) ("calc" . fundamental) ("C" . c) ("cpp" . c++) > ("C++" . c++) ("screen" . shell-script)) org-hide-leading-stars t > org-tab-first-hook '(org-hide-block-toggle-maybe > org-src-native-tab-command-maybe > org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) > org-speed-command-hook '(org-speed-command-default-hook > org-babel-speed-command-hook) org-ellipsis "〖 ✎ 〗" org-occur-hook > '(org-first-headline-recenter) org-src-tab-acts-natively t > org-metaup-hook '(org-babel-load-in-session-maybe) > org-html-format-drawer-function '(lambda (name contents) contents) > org-src-window-setup 'current-window > org-latex-format-inlinetask-function 'ignore > org-confirm-shell-link-function 'y-or-n-p > org-ascii-format-inlinetask-function > 'org-ascii-format-inlinetask-default > org-latex-format-headline-function > 'org-latex-format-headline-default-function org-startup-indented t > org-after-todo-state-change-hook '(org-clock-out-if-current) > org-latex-format-drawer-function '(lambda (name contents) > contents) org-odt-format-headline-function 'ignore > org-from-is-user-regexp "\\" org-src-mode-hook > '(org-src-babel-configure-edit-buffer > org-src-mode-configure-edit-buffer) org-agenda-before-write-hook > '(org-agenda-add-entry-text) org-babel-pre-tangle-hook > '(save-buffer) org-mode-hook '(#[nil "\300\301\302\303\304$\207" > [org-add-hook change-major-mode-hook org-show-block-all append > local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook > change-major-mode-hook org-babel-show-result-all append local] 5] > org-babel-result-hide-spec org-babel-hide-all-hashes) > org-ascii-format-drawer-function '(lambda (name contents width) > contents) org-odt-format-inlinetask-function 'ignore > org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point > org-babel-execute-safely-maybe) org-cycle-hook > '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers > org-cycle-hide-inline-tasks org-cycle-show-empty-lines > org-optimize-window-after-visibility-change) org-plantuml-jar-path > "/Users/rainerkrug/jar/plantuml.jar" org-latex-packages-alist '(("" > "color") ("" "listings")) org-ctrl-k-protect-subtree "ask" > org-babel-tangle-lang-exts '(("latex" . "tex") ("emacs-lisp" . > "el")) org-confirm-elisp-link-function 'yes-or-no-p > org-metadown-hook '(org-babel-pop-to-session-maybe) > org-odt-format-drawer-function '(lambda (name contents) contents) > org-latex-listings t org-show-siblings '((default) (isearch t) > (bookmark-jump . t)) org-html-format-headline-function 'ignore > org-structure-template-alist '(("le" "#+end_src \n\n#+begin_src > emacs-lisp" "\n\n") ("lua" "#+begin_src lua > \n ?\n#+end_src" "\n\n") ("r" "#+begin_src > R ?\n\n#+end_src" "\n\n") ("s" "#+BEGIN_SRC > ?\n\n#+END_SRC" "\n\n") ("e" > "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE" "\n?\n") > ("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE" "\n?\n") ("v" > "#+BEGIN_VERSE\n?\n#+END_VERSE" "\n?\n") ("V" > "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM" > "\n?\n") ("c" > "#+BEGIN_CENTER\n?\n#+END_CENTER" "
\n?\n
") ("l" > "#+BEGIN_LaTeX\n?\n#+END_LaTeX" " style=\"latex\">\n?\n") ("L" "#+LaTeX: " " style=\"latex\">?") ("h" "#+BEGIN_HTML\n?\n#+END_HTML" > "\n?\n") ("H" "#+HTML: " > "?") ("a" > "#+BEGIN_ASCII\n?\n#+END_ASCII" "") ("A" "#+ASCII: " "") ("i" > "#+INDEX: ?" "#+INDEX: ?") ("I" "#+INCLUDE: %file ?" " file=%file markup=\"?\">")) org-babel-load-languages '((R . t) > (latex . t) (sh . t) (plantuml . t) (emacs-lisp . t)) > org-src-preserve-indentation t org-babel-post-tangle-hook > '(org-babel-run-post-tangle-script org-babel-mark-file-as-tangled) > org-html-format-inlinetask-function 'ignore org-agenda-files > '("~/org") org-clock-out-hook > '(org-clock-remove-empty-clock-drawer) org-confirm-babel-evaluate > nil ) > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJS4CJIAAoJENvXNx4PUvmC9kkH/iNVT3tJlGwZF+j/VDiTvCqA e30wkp0UxntIu1vkKO1UuW9uJwwcI2UDKCl4bILbv1m4sxd84WnFxJz5mpw8ZR56 MZ5Qtv0G4T9AMVim3p1l9kYuRv6LH2oaB9jO5D4NAAid9qIl1zTClZvr9wW+kYrC yAUk9i5/FANPbQaf3rA0Cw6eh0gxDo6IzVjea4N0v/ot5/xZLglUEodibKXldbRI 2K4omKPAS/Bb4wj7UqbhIJYVdb43bXUO8PW631ZKDzaZQjvUivEfEos8GKpcQupE Xu6FC0Tom2p06SMr7Q1m1GMKXVQqzge/qiSq7zSQG6Aqqf/9r0/cl6xNzWZhD8k= =T6J7 -----END PGP SIGNATURE-----