From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Williams Subject: Re: Problem exporting code Date: Sun, 20 Jan 2013 23:52:33 -0600 Message-ID: References: <87libnmdjx.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b34372c41773304d3c61194 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxAJB-0004ed-IX for emacs-orgmode@gnu.org; Mon, 21 Jan 2013 00:52:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TxAJ8-0001aW-FI for emacs-orgmode@gnu.org; Mon, 21 Jan 2013 00:52:37 -0500 Received: from mail-ee0-f43.google.com ([74.125.83.43]:54671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxAJ8-0001aO-8S for emacs-orgmode@gnu.org; Mon, 21 Jan 2013 00:52:34 -0500 Received: by mail-ee0-f43.google.com with SMTP id c50so2614916eek.30 for ; Sun, 20 Jan 2013 21:52:33 -0800 (PST) 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: emacs-orgmode@gnu.org --047d7b34372c41773304d3c61194 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Jan 20, 2013 at 10:57 PM, Ken Williams wrote: > > I'm grasping at straws too, not knowing my way around the elisp code very > well. =) > It looks like the function controlling this behavior is `org-export-format-source-code-or-example`, in org-exp.el: (if (string-match "]*\\)>\n*" rtn) (setq rtn (concat (if caption (concat "
" (format "" caption)) "") (replace-match (format "
\n" lang)
                                t t rtn)
                               (if caption "
" ""))))) So the
 tag gets inserted first, then later gets replaced by 
 ?

--047d7b34372c41773304d3c61194
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable




On Sun, Jan 20, 2013 at 10:57 PM, Ken Williams &l= t;kenahoo@gmail.com<= /a>> wrote:

I'm = grasping at straws too, not knowing my way around the elisp code very well.= =3D)

It looks like the f= unction controlling this behavior is `org-export-format-source-code-or-exam= ple`, in org-exp.el:

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 (if (string-match "<pre\\([^>]*\\)>\n*" rtn)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq rtn
=A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (concat
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(if caption<= /div>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0(concat
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 "<div class=3D\"org-src-container\&quo= t;>"
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 (format
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0"<label class=3D\"org-src-name\">%s</label&g= t;"
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0caption))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"")
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(replac= e-match
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 (format "<pre class=3D\"src src-%s\">\n" = lang)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 t t rtn)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(if caption = "</div>" "")))))

So the <pre> tag gets inserted first, then later gets replaced b= y <pre class=3D"src src-R"> ?
--047d7b34372c41773304d3c61194--