emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Passing values by reference to src-blocks
@ 2014-06-25  1:26 Thorsten Jolitz
  2014-06-25  3:01 ` Eric Schulte
  2014-06-25  3:12 ` Thorsten Jolitz
  0 siblings, 2 replies; 4+ messages in thread
From: Thorsten Jolitz @ 2014-06-25  1:26 UTC (permalink / raw)
  To: emacs-orgmode


Hi List, 

this does not work, although I would think it should (at least if there
is no typo or so):

,----
| #+name: project-root
| #+header: :var buf-file=(buffer-file-name)
| #+begin_src emacs-lisp
| (file-name-directory
|  (directory-file-name
|   (file-name-directory buf-file)))
| #+end_src
`----

#+results: project-root
: /home/tj/News/drafts/

,----
| #+name: project-name
| #+header: :exports none
| #+header: :var root-dir=project-root(buf-file=(buffer-file-name))
| #+begin_src emacs-lisp
|   (mapconcat
|    'capitalize
|    (split-string
|     (file-name-nondirectory root-dir)
|     "-" 'OMIT-NULLS)
|    " ")
| #+end_src
`----

#+results: project-name

Wrong usage of :var or limitations of header arguments?

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-25  3:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-25  1:26 Passing values by reference to src-blocks Thorsten Jolitz
2014-06-25  3:01 ` Eric Schulte
2014-06-25  3:38   ` Thorsten Jolitz
2014-06-25  3:12 ` Thorsten Jolitz

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).