emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: example blocks remove initial whitespace
Date: Wed, 14 Aug 2013 07:43:00 +0200	[thread overview]
Message-ID: <864nas3k0r.fsf@somewhere.org> (raw)
In-Reply-To: CAJcAo8sVBXoYdxiiN8nZ3dhjKc_vvZ1oWRtPFH9nTv49m7T1Dw@mail.gmail.com

Hi Samuel,

Samuel Wales wrote:
> On 8/12/13, Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org> wrote:
>> Try the following:
>>
>>   ;; preserve spaces and `tab' characters in source code blocks
>>   (setq org-src-preserve-indentation t)
>
> That did not work for me.  Does that work for you?

With the minimal Emacs config file:

--8<---------------cut here---------------start------------->8---
;; .emacs-minimal.el

;; preserve spaces and `tab' characters in source code blocks
(setq org-src-preserve-indentation t)

(message "(info) Loading `%s'...done" load-file-name)

;;; .emacs-minimal.el ends here
--8<---------------cut here---------------end--------------->8---

and the minimal test file:

--8<---------------cut here---------------start------------->8---
Test.

#+BEGIN_EXAMPLE
                         PR
                 /////////\\\\\\\\\
#+END_EXAMPLE
--8<---------------cut here---------------end--------------->8---

I get the following:

--8<---------------cut here---------------start------------->8---
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Test.</title>
...
</head>
<body>

<div id="preamble">

</div>

<div id="content">
<h1 class="title">Test.</h1>




<pre class="example">                         PR
                 /////////\\\\\\\\\
</pre>
...
</html>
--8<---------------cut here---------------end--------------->8---

when exporting with the default Org bundled with GNU Emacs 24.2.91.1
(i386-mingw-nt6.2.9200) of 2012-12-15 on MS-W7-DANI, that is:

    Org-mode version 7.9.2+ (7.9.2+-GNU-Emacs-24-3 (commit 488eea) @
    c:/Program Files (x86)/emacs-24.2.91/lisp/org/)

Best regards,
  Seb

-- 
Sebastien Vauban

  reply	other threads:[~2013-08-14  5:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-11 22:39 example blocks remove initial whitespace Samuel Wales
2013-08-12  7:57 ` Sebastien Vauban
2013-08-12 17:46   ` Samuel Wales
2013-08-14  5:43     ` Sebastien Vauban [this message]
2013-08-14  6:27       ` Samuel Wales

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=864nas3k0r.fsf@somewhere.org \
    --to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).