emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tiago Natel de Moura <tiago4orion@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Multiple header-args of same name in babel
Date: Thu, 17 Mar 2016 15:58:28 -0300	[thread overview]
Message-ID: <CAEEYhF2KNfVSzdMv0Ltv63UrqwvjCn1rWDOD_LAkNKk11PPDSA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 863 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1383 bytes --]

                 reply	other threads:[~2016-03-17 18:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEEYhF2KNfVSzdMv0Ltv63UrqwvjCn1rWDOD_LAkNKk11PPDSA@mail.gmail.com \
    --to=tiago4orion@gmail.com \
    --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 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).