From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avdi Grimm Subject: Need info about code block header arguments in (HTML) export Date: Mon, 11 Aug 2014 10:58:16 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e01493e42236b4005005bcafb Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGr3c-0001jB-CP for emacs-orgmode@gnu.org; Mon, 11 Aug 2014 10:58:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGr3X-0004sy-3k for emacs-orgmode@gnu.org; Mon, 11 Aug 2014 10:58:44 -0400 Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]:56146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGr3W-0004sZ-Ix for emacs-orgmode@gnu.org; Mon, 11 Aug 2014 10:58:39 -0400 Received: by mail-la0-f53.google.com with SMTP id gl10so6701441lab.40 for ; Mon, 11 Aug 2014 07:58:36 -0700 (PDT) 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: emacs-orgmode Org-Mode --089e01493e42236b4005005bcafb Content-Type: text/plain; charset=UTF-8 Hi there, Org experts! 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: #+BEGIN_SRC ruby :tangle foo/bar.rb puts "hello, world" #+END_SRC ...the final HTML might look something like this:
foo/bar.rb
puts "Hello,
world"
    
However, I already do a lot of post-processing on the exported HTML, so I'm thinking that a simpler, more general solution would be sufficient:
puts "Hello,
world"
    
As you can see, in this version the header arguments are inserted, unchanged, into a new data-org-header-args attribute. This would give me enough information to munge the final HTML into the form I need. So my question is: can anyone give me pointers on how to accomplish this? Thanks! -- Avdi Grimm http://avdi.org --089e01493e42236b4005005bcafb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi there, Org experts!

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 c= ode listings. That is, given some Org source like this:

=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

...the final HTML might look= something like this:

=C2=A0 =C2=A0 <div class=3D"org-src-container"><= /div>
=C2=A0 =C2=A0 <div class=3D"src-path">foo/bar.rb&= lt;/div>

=C2=A0 =C2=A0 <pre class=3D"sr= c src-ruby">puts <span class=3D"org-string">"H= ello, world"</span>
=C2=A0 =C2=A0 </pre>
=C2=A0 =C2=A0 </div>
<= div>
However, I already do a lot of post-processing on the ex= ported HTML, so I'm thinking that a simpler, more general solution woul= d be sufficient:

=C2=A0 =C2=A0 <div class=3D"org-src-contai= ner" data-org-header-args=3D"ruby :tangle foo/bar.rb">
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 <pre class=3D"s= rc src-ruby">puts <span class=3D"org-string">"= Hello, world"</span>
=C2=A0 =C2=A0 </pre>
=C2=A0 =C2=A0 </div>
<= /div>

As you can see, in this version the header argumen= ts are inserted, unchanged, into a new data-org-header-args attribute. This= would give me enough information to munge the final HTML into the form I n= eed.

So my question is: can anyone give me pointers on how t= o accomplish this? Thanks!
--
Avdi Grimm
http://avdi.org

--089e01493e42236b4005005bcafb--