emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* accessing source block header arguments from exporters
@ 2015-04-10 19:52 Robert Klein
  2015-04-10 22:17 ` Charles Berry
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Klein @ 2015-04-10 19:52 UTC (permalink / raw)
  To: emacs-orgmode

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

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

end of thread, other threads:[~2015-04-11 10:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10 19:52 accessing source block header arguments from exporters Robert Klein
2015-04-10 22:17 ` Charles Berry
2015-04-11 10:57   ` John Kitchin

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).