Re: [O] 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/)]
-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 | | | | | | > | 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-
[O] 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/)]
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 | | | | | | | 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) (i