From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [babel] Feature request: org-export-format-source-code-or-example and srcname Date: Wed, 02 Dec 2009 13:23:12 -0700 Message-ID: References: <51b0095d0912020941i4e461639m78b01316810c07c2@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFvjO-0006gS-SG for emacs-orgmode@gnu.org; Wed, 02 Dec 2009 15:23:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFvjK-0006an-9r for emacs-orgmode@gnu.org; Wed, 02 Dec 2009 15:23:22 -0500 Received: from [199.232.76.173] (port=53199 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFvjJ-0006ac-Ug for emacs-orgmode@gnu.org; Wed, 02 Dec 2009 15:23:17 -0500 Received: from mail-pw0-f47.google.com ([209.85.160.47]:52875) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NFvjJ-0000Qy-Jc for emacs-orgmode@gnu.org; Wed, 02 Dec 2009 15:23:17 -0500 Received: by pwi9 with SMTP id 9so446220pwi.26 for ; Wed, 02 Dec 2009 12:23:16 -0800 (PST) In-Reply-To: <51b0095d0912020941i4e461639m78b01316810c07c2@mail.gmail.com> (Nicolas Girard's message of "Wed, 2 Dec 2009 18:41:40 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Girard Cc: emacs-orgmode 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 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