From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: Re: Need info about code block header arguments in (HTML) export Date: Tue, 12 Aug 2014 11:43:36 -0400 Message-ID: <11915c05b36aa2470acae70599b415bb@mail.rickster.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHEEf-0007Nq-RI for emacs-orgmode@gnu.org; Tue, 12 Aug 2014 11:43:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHEEb-0002vC-0Q for emacs-orgmode@gnu.org; Tue, 12 Aug 2014 11:43:41 -0400 Received: from mail.rickster.com ([204.62.15.78]:41829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHEEa-0002v5-TM for emacs-orgmode@gnu.org; Tue, 12 Aug 2014 11:43:36 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Avdi Grimm Cc: emacs-orgmode Org-Mode On 2014-08-11 10:58, Avdi Grimm wrote: > Hi there, Org experts! >=20 > I write books in org-mode, and one of the features I've really started > to need is to be able to automatically include filename information > when exporting source code listings. That is, given some Org source > like this: >=20 > =C2=A0 =C2=A0 #+BEGIN_SRC ruby :tangle foo/bar.rb > =C2=A0 =C2=A0 =C2=A0 puts "hello, world" > =C2=A0 =C2=A0 #+END_SRC >=20 > ...the final HTML might look something like this: >=20 > =C2=A0 =C2=A0
> =C2=A0 =C2=A0
foo/bar.rb
>=20 Currently, you can acheive similar html output by using the `#+CAPTION' header argument; #+CAPTION: foo/bar.pl #+BEGIN_SRC perl :exports code print "foo\n"; #+END_SRC which would generate this html: #+BEGIN_SRC html
print=20
"foo\n";
#+END_SRC I don't see a way to get the `:tangle' keyword during export, as the parser does not include that in list passed to the src-block export function. rick