From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Treat custom environment as verbatim on export Date: Sat, 23 May 2015 11:48:40 +0200 Message-ID: <87fv6ntyiv.fsf@pank.eu> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yw637-0001a6-BG for emacs-orgmode@gnu.org; Sat, 23 May 2015 05:49:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yw633-0008MK-Bx for emacs-orgmode@gnu.org; Sat, 23 May 2015 05:48:57 -0400 Received: from plane.gmane.org ([80.91.229.3]:47199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yw633-0008MB-50 for emacs-orgmode@gnu.org; Sat, 23 May 2015 05:48:53 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Yw630-0008ED-12 for emacs-orgmode@gnu.org; Sat, 23 May 2015 11:48:50 +0200 Received: from 142.red-88-21-140.staticip.rima-tde.net ([88.21.140.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 23 May 2015 11:48:50 +0200 Received: from rasmus by 142.red-88-21-140.staticip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 23 May 2015 11:48:50 +0200 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 Hi Jacob, Jacob Gerlach writes: > I want to use a one of several custom environments for some babel > results using, for example, ":wrap myverbatim" as a header argument. > (Since I have several possible environments, I think I need to use > :wrap rather than, say, replacing "verbatim" using an export filter). > > However, since this block isn't recognized as an actual verbatim > environment, markup gets processed in undesirable ways. I remember that you already set custom export for your source blocks. So how about just mirroring that? E.g. #+BEGIN_SRC sh :exports results :results value code echo "Hello_world" #+END_SRC #+RESULTS: #+BEGIN_SRC sh Hello_world #+END_SRC BTW: All headers are documented here: http://orgmode.org/manual/Specific-header-arguments.html > - Is there any way I've missed to specify verbatim export as an option > for an arbitrary block/environment? The thing is :wrap doesn't play nicely with :results, but I cannot specify how I expect them to behave. > - If not, I think that I need a derived exporter to achieve this, but > the `contents' of a special-block have already had markup transcoded > by the time the derived backend function sees them. What functions > would my derived backend need to replace to allow applying verbatim > formatting to block types of my choosing? It's a special block, so e.g. org-latex-special-block. But contents is already transcoded by the time in arrives to e.g. org-latex-special-block. To the extend this should be fixed, one way would be to allow a raw option to special blocks (also needed for e.g. #+{begin,end}_equation) and have babel insert it as needed. I don't know how easy this is. Rasmus -- I feel emotional landscapes they puzzle me