emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Multiple header-args of same name in babel


From: Tiago Natel de Moura
Subject: [O] Multiple header-args of same name in babel
Date: Thu, 17 Mar 2016 15:58:28 -0300

Hello,

What's the best way to split long header arguments in multiple lines?

What I want to achieve is the same as the babel :var argument, but for other header (:imports).

For example, with :var I can do:

#+HEADER: :var a=1
#+HEADER: :var b=2
#+HEADER: :var c=3
#+BEGIN_SRC go
fmt.Printf("%d", a+b+c)
#+END_SRC

But it doesn't work for other headers and as I'd saw experimenting some code in ob-go, it's impossible without some changes in ob-core.el, because :var is handled differently there. When the function org-babel-execute:go is called, the params only have the first header assigned.

What I'm trying to solve is the following problem:

#+HEADER: :imports '("fmt" "math" "crypto" ... <very long list of imports here>)
#+BEGIN_SRC go
// some code
#+END_SRC

I wanna keep my source code with lines with 80 columns as possible...

Thanks.

--
[]'s
i4k

reply via email to

[Prev in Thread] Current Thread [Next in Thread]