Hi Nicolas, There have been a couple of requests for this functionality, and the main slowdown in not previously implementing this as part of the org-babel source block export was not having a good standard way to specify the srcname (or possibly header arguments) in HTML LaTeX and ASCII export. The LaTeX caption option you mentioned below looks like a good solution for users who are using the listings package.
A previous suggestion was to use macros which the user could overdefine to customize the behavior. I do not know much about org-mode export macros but this approach sounds promising to me. Thanks for providing more motivation for this development. If you have any more suggestions I'd be interested to hear them. Best -- Eric Nicolas Girard <nicolas.gir...@nerim.net> writes: > Hi, > when using the listings LaTeX package, it would be very useful if the > value of srcname was added to the output. For instance, > > #+srcname: my_code_chunk > #+begin_src latex :results latex :exports code :tangle no > \usepackage{fontspec,xunicode,xltxtra} > #+end_src > > would give: > > \lstset{language=TeX}[caption={my\_code\_chunk}] > \begin{lstlisting} > \usepackage{fontspec,xunicode,xltxtra} > \end{lstlisting} > > (note the added "[caption={my\_code\_chunk}]") > > Cheers, > Nicolas > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode