From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dario Hamidi" Subject: src blocks in texinfo export Date: Tue, 12 Feb 2013 16:36:49 +0100 Message-ID: <87liat35ny.fsf@sofia.zeitform.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5Hur-0002NX-Ty for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 10:37:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5Hum-0005ME-3Y for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 10:37:05 -0500 Received: from mail-ea0-f171.google.com ([209.85.215.171]:44612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5Hul-0005Lv-U4 for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 10:37:00 -0500 Received: by mail-ea0-f171.google.com with SMTP id c13so93280eaa.2 for ; Tue, 12 Feb 2013 07:36:59 -0800 (PST) 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 --=-=-= Content-Type: text/plain Hello, I discovered a problem when exporting source blocks containing braces to texinfo using `ox-texinfo'. The texinfo exporter wraps source blocks into a `example' environment, which takes care of source block indentation but doesn't allow any braces to occur in the contained text, since braces have a special meaning in TeX. After reading the `texinfo' manual, it became clear that literal examples should be exported also in a `verbatim' environment. A patch making this change to the exporter is attached. Dario --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=ox-texinfo.el.patch diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 8bc3520..211bf01 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -1409,7 +1409,7 @@ contextual information." (org-export-format-code-default src-block info))) ;; Case 2. Other blocks (t - (format "@example\n%s@end example" + (format "@example\n@verbatim\n%s@end verbatim\n@end example" (org-export-format-code-default src-block info)))))) ;;; Statistics Cookie --=-=-=--