From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: 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: Tue, 21 Jan 2014 15:17:49 +0100 Message-ID: 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]:43060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5c9V-0004rF-QL for emacs-orgmode@gnu.org; Tue, 21 Jan 2014 09:18:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5c9Q-00087z-5j for emacs-orgmode@gnu.org; Tue, 21 Jan 2014 09:18:05 -0500 Received: from mail-wg0-f46.google.com ([74.125.82.46]:63463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5c9P-00087n-Sb for emacs-orgmode@gnu.org; Tue, 21 Jan 2014 09:18:00 -0500 Received: by mail-wg0-f46.google.com with SMTP id x12so7902129wgg.1 for ; Tue, 21 Jan 2014 06:17:58 -0800 (PST) Received: from Rainers-MacBook-Pro-2.local (arn78-1-88-186-171-7.fbx.proxad.net. [88.186.171.7]) by mx.google.com with ESMTPSA id ju6sm8062479wjc.1.2014.01.21.06.17.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jan 2014 06:17:57 -0800 (PST) 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 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=3D"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=3DSPECIES * And some more #+NAME: SPECIES2 | | fullName | shortName | iespece | IFNName | color | |---------+---------------+-----------+---------+---------------+-------| | no idea | ffff | | | | | | quercus | Quercus robur | quercus | 4 | quercus_robur | green | #+PROPERTY: var+ SPECIES2=3DSPECIES2 * 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/raine= rkrug/.emacs.d/org-mode/lisp/) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq org-src-lang-modes '(("plantuml" . plantuml) ("ocaml" . tuareg) ("elisp" .= emacs-lisp) ("ditaa" . artist) ("asymptote" . asy) ("dot" . fundamental) ("sqlite" . sql) ("calc" . fund= amental) ("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-comman= d-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-co= mmand-hook) org-ellipsis "=E3=80=96 =E2=9C=8E =E3=80=97" 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-func= tion 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-confi= gure-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-maj= or-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-maj= or-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 o= rg-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" "<= 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" "\n?\n") ("L" "#+LaTeX: " "?") ("h" "#+BEGIN_HTML\n?\n#+END_HTML" "\n?\n") ("H" "#+HTML: " "= ?") ("a" "#+BEGIN_ASCII\n?\n#+END_ASCII" "") ("A" "#+ASCII: " "") ("i" "#+INDEX: ?" "#+I= NDEX: ?") ("I" "#+INCLUDE: %file ?" "")) org-babel-load-languages '((R . t) (latex . t) (sh . t) (plantuml . t) (em= acs-lisp . t)) org-src-preserve-indentation t org-babel-post-tangle-hook '(org-babel-run-post-tangle-script org-babel-ma= rk-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 ) --=20 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