emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: Treat custom environment as verbatim on export
Date: Sat, 23 May 2015 11:48:40 +0200	[thread overview]
Message-ID: <87fv6ntyiv.fsf@pank.eu> (raw)
In-Reply-To: CAA6UvuHzdeu=8OFtr0gLYs=1_Ze1Z4Syv6CfkC+8xqJ+QjK+Cw@mail.gmail.com

Hi Jacob,

Jacob Gerlach <jacobgerlach@gmail.com> 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

  reply	other threads:[~2015-05-23  9:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-23  3:09 Treat custom environment as verbatim on export Jacob Gerlach
2015-05-23  9:48 ` Rasmus [this message]
2015-05-24 15:29   ` Nicolas Goaziou
2015-05-24 17:29     ` Rasmus
2015-05-24 19:43     ` Charles C. Berry
2015-05-25 12:17       ` Jacob Gerlach
2015-05-23 16:32 ` Charles C. Berry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fv6ntyiv.fsf@pank.eu \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).