From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Passing values by reference to src-blocks Date: Wed, 25 Jun 2014 03:26:04 +0200 Message-ID: <87wqc5srtf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzbys-0002UP-Rq for emacs-orgmode@gnu.org; Tue, 24 Jun 2014 21:26:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wzbyl-0004v7-4G for emacs-orgmode@gnu.org; Tue, 24 Jun 2014 21:26:34 -0400 Received: from plane.gmane.org ([80.91.229.3]:57155) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzbyk-0004uj-Ou for emacs-orgmode@gnu.org; Tue, 24 Jun 2014 21:26:27 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Wzbyi-00033b-Hu for emacs-orgmode@gnu.org; Wed, 25 Jun 2014 03:26:24 +0200 Received: from e178188029.adsl.alicedsl.de ([85.178.188.29]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Jun 2014 03:26:24 +0200 Received: from tjolitz by e178188029.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Jun 2014 03:26:24 +0200 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 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