From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Hamidi Subject: Re: src blocks in texinfo export Date: Tue, 12 Feb 2013 23:09:12 +0100 Message-ID: <8738x1p4l3.fsf@gmail.com> References: <87liat35ny.fsf@sofia.zeitform.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5O2U-0001aR-LB for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 17:09:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5O2P-0002uu-CL for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 17:09:22 -0500 Received: from mail-bk0-f43.google.com ([209.85.214.43]:34121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5O2P-0002uD-50 for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 17:09:17 -0500 Received: by mail-bk0-f43.google.com with SMTP id jm19so266466bkc.30 for ; Tue, 12 Feb 2013 14:09:16 -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: Jonathan Leech-Pepin Cc: emacs-orgmode@gnu.org Hello Jonathan, > Using your patch as is would wrap the source blocks in both example and > verbatim blocks. If going with verbatim it would be better to remove all > references to @example/@end example. I don't understand where the problem lies with having a `@verbatim' within a `@example'. Could you maybe explain to me why this is problematic? Using both environments seems to achieve the goal of having an idented source block in the resulting info file without having to further process the source block before export. Consider exporting #+BEGIN_SRC sh function fails { echo "this causes an error with makeinfo" } #+END_SRC with only the verbatim environment: File: test.info, Node: Top, Up: (dir) Manual ****** function fails { echo "this causes an error with makeinfo" } and with verbatim in example: File: test.info, Node: Top, Up: (dir) Manual ****** function fails { echo "this causes an error with makeinfo" } > It should be possible to escape any braces or @ before inserting them into > the > example block to ensure there is no expansion. While it certainly is possible, it would also mean to properly escape *all* characters with a special meaning to TeX. I suppose that making text containing such characters visible in a document without having to escape them is what the verbatim environment is for. > The only differences in using @verbatim over escaping any characters in > @example are the following: > - Tabs are treated as tabs and not as single spaces > - The code block is not indented. Preserving whitespace seems like a good idea when displaying python source code or makefiles. Dario