From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [babel] Bug in output PDF with source blocks of unknown language Date: Wed, 13 Jan 2010 09:21:23 -0700 Message-ID: <87iqb67z7g.fsf@gmail.com> References: <87y6k2kn4e.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NV5yQ-0002b0-0x for emacs-orgmode@gnu.org; Wed, 13 Jan 2010 11:21:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NV5yK-0002XA-Ld for emacs-orgmode@gnu.org; Wed, 13 Jan 2010 11:21:33 -0500 Received: from [199.232.76.173] (port=56751 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV5yK-0002X4-Ft for emacs-orgmode@gnu.org; Wed, 13 Jan 2010 11:21:28 -0500 Received: from mail-pz0-f181.google.com ([209.85.222.181]:56155) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NV5yK-0004aq-2j for emacs-orgmode@gnu.org; Wed, 13 Jan 2010 11:21:28 -0500 Received: by pzk11 with SMTP id 11so13978542pzk.14 for ; Wed, 13 Jan 2010 08:21:26 -0800 (PST) In-Reply-To: <87y6k2kn4e.fsf@mundaneum.com> (=?utf-8?Q?=22S=C3=A9bastien?= Vauban"'s message of "Wed, 13 Jan 2010 17:04:01 +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: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: emacs-orgmode@gnu.org Hi S=C3=A9bastien, S=C3=A9bastien Vauban writes: [...] > * Bug > > You see that when the language is unknown to Org-babel (=3DDelphi=3D in= this > example), it gets ignored during export, and gets replaced by the previ= ous > code block!! > > So, the current workaround is to take whatever other language know to B= abel > (here: =3Dperl=3D) for the export to (at least) output the right code i= n the > generated document (even if not correctly highlighted). > Oh, that certainly is a problem! Thanks for reporting I'll take a look. For reference it's being tracked as a bug on our development page here http://eschulte.github.com/babel-dev/TODO-on-export-babel-overwrites-unreco= gnized-source-blocks.html > > * Other problem > > The selected language must also be known by =3Dlistings=3D... Hence, = =3DR=3D cannot > be chosen for language; generating otherwise an error when compiling the > LaTeX document. > This should be an easier fix. It is possible to add listings alias by adding an entry to the `org-src-lang-modes' variable. ,----[org-src-lang-modes] | org-src-lang-modes is a variable defined in `org-src.el'. | Its value is=20 | (("ocaml" . tuareg) | ("elisp" . emacs-lisp) | ("ditaa" . artist) | ("asymptote" . asy) | ("dot" . fundamental)) |=20 |=20 | Documentation: | Alist mapping languages to their major mode. | The key is the language name, the value is the string that should | be inserted as the name of the major mode. For many languages this is | simple, but for language where this is not the case, this variable | provides a way to simplify things on the user side. | For example, there is no ocaml-mode in Emacs, but the mode to use is | `tuareg-mode'. |=20 | You can customize this variable. `---- Best -- Eric > > Best regards, > Seb > > PS- I'll answer your posts shortly (Noweb vs Babel, and incompatibility w= ith > Org-special-blocks). Have had no time up to now... I look forward to your reply when you do have time (no rush) -- notice I've made a slight change to the look of the source names when exported to LaTeX.