emacs-orgmode
[Top][All Lists]
Advanced

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

[O] accessing source block header arguments from exporters


From: Robert Klein
Subject: [O] accessing source block header arguments from exporters
Date: Fri, 10 Apr 2015 21:52:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Hi,

is there a way, to read header arguments to source blocks in the
exporters org-<exporter>-src-block funktions?

E.g. is there a way to access :firstline in the example below?

#+begin_src c++ -n :firstline 23
   static struct
  {
      char                        *entity;
      unsigned char       equiv;
  } entities[] =
    {
      { "lt",           '<' } ,
      { "gt",           '>' } ,
      { "amp",          '&' } ,
      { "quot",         '"' } ,
      { "trade",        153 } , /* trade mark */
#+end_src

I didn't find it in the `element' structure.

However, if I use

#+begin_src c++ firstline=23
  // random C++
#+end_src

I could access :parameters from `element' and parse the string.
However I'm not sure if I'd break some babel stuff or not.

If I'm trying to implement a firstline feature -- source blocks with
new line numbering (-n) beginning at a given line number -- I'd prefer
to use :firstline, but I didn't find anything to suggest `:XXX ZZ'
header arguments to source blocks are available to the exporters.

Any advice?

Thank you very much
Robert



reply via email to

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