From: Rainer M Krug <Rainer@krugs.de>
To: emacs-orgmode@gnu.org
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 [thread overview]
Message-ID: <m2fvoh4dwy.fsf@krugs.de> (raw)
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 "\\<Rainer M Krug\\>"
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" "<src lang=\"R\">\n\n</src>")
("lua" "#+begin_src lua \n ?\n#+end_src" "<src lang=\"lua\">\n\n</src>")
("r" "#+begin_src R ?\n\n#+end_src" "<src lang=\"R\">\n\n</src>")
("s" "#+BEGIN_SRC ?\n\n#+END_SRC" "<src lang=\"?\">\n\n</src>")
("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE" "<example>\n?\n</example>")
("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE" "<quote>\n?\n</quote>")
("v" "#+BEGIN_VERSE\n?\n#+END_VERSE" "<verse>\n?\n</verse>")
("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM" "<verbatim>\n?\n</verbatim>")
("c" "#+BEGIN_CENTER\n?\n#+END_CENTER" "<center>\n?\n</center>")
("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX" "<literal style=\"latex\">\n?\n</literal>")
("L" "#+LaTeX: " "<literal style=\"latex\">?</literal>")
("h" "#+BEGIN_HTML\n?\n#+END_HTML" "<literal style=\"html\">\n?\n</literal>")
("H" "#+HTML: " "<literal style=\"html\">?</literal>") ("a" "#+BEGIN_ASCII\n?\n#+END_ASCII" "")
("A" "#+ASCII: " "") ("i" "#+INDEX: ?" "#+INDEX: ?")
("I" "#+INCLUDE: %file ?" "<include 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
next reply other threads:[~2014-01-21 14:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-21 14:17 Rainer M Krug [this message]
2014-01-22 19:55 ` 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/)] Rainer M Krug
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2fvoh4dwy.fsf@krugs.de \
--to=rainer@krugs.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.