emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: Andreas Leha <andreas.leha@med.uni-goettingen.de>,
	emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Preservation of white space in babel blocks, exporting to PDF
Date: Sun, 2 Feb 2014 09:59:05 -0600	[thread overview]
Message-ID: <CA+M2ft8_UzBAt0z2E+t6ePZf3anRYD0kk_AZCJkuw7bnf6+Pqw@mail.gmail.com> (raw)
In-Reply-To: <87vbwxq4wu.fsf@gmail.com>

On Sun, Feb 2, 2014 at 2:45 AM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Hello,
>
> John Hendy <jw.hendy@gmail.com> writes:
>
>> Thus, I take it that the default org setting is non-nil?
>
> Actually this is an Emacs variable, and it is indeed non-nil.

Gotcha. So if it interferes with org-src-preserve-indentation, that's
good to know. I'm assuming that was the change you recently pushed per
the last note.

>
>> I am a bit frustrated by trying to be as clear as I could about the
>> situation with reproducible examples, and then finding out the behavior was
>> apparently obvious, but due to a variable I didn't know existed...
>
> The behaviour is not obvious.

Sorry, what I meant is that at no point in our dialog did you seem
surprised by my outcomes. First, you simply said you couldn't
reproduce. Then you said the issue was because I was /using/ tabs (vs.
spaces). When I disagreed, you clarified that saying I was /using/
tabs had really meant I had indent-tabs-mode set to non-nil. From my
non-mastery of Org/emacs perspective, it appeared you knew what was
going on, but revealed it in layers to me.

>> I'll try a fresh pull tomorrow as well as looking at indent-tabs-mode.
>
> This should hopefully work. It should also work if you don't change this
> variable but set `org-src-preserve-indentation' to a non-nil value,
> since I fixed that.
>
> Note that you can set this variable on a per-block basis with "-i" flag:
>
>   #+BEGIN_SRC python -i
>   ...
>   #+END_SRC
>

Awesome. Tried both methods, both of which work exactly as I'd have hoped!
- Putting =(setq org-src-preserve-indentation t)= in .emacs
- No setting for the above variable, but using =-i= in the src block

Thanks so much! This has perplexed me for a really long time, but I've
never looked into it. I'm giving my first more "major" talk at a local
event (talking about R + geo-spatial data as well as Shiny interactive
web-apps), and wanted my code to look nice and pretty. Many thanks for
enabling that!!

I'll be on the lookout for somewhere on Worg where I can add the new
documentation if you haven't done so already.


Best regards,
John

>
> Regards,
>
> --
> Nicolas Goaziou

      reply	other threads:[~2014-02-02 16:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31  5:58 Preservation of white space in babel blocks, exporting to PDF John Hendy
2014-01-31  8:09 ` Nicolas Goaziou
2014-01-31 22:16   ` John Hendy
2014-01-31 22:25     ` Nicolas Goaziou
2014-01-31 22:46       ` John Hendy
2014-01-31 23:04         ` Nicolas Goaziou
2014-01-31 23:16           ` John Hendy
2014-01-31 23:25             ` Andreas Leha
2014-02-01  4:08               ` John Hendy
2014-02-01  8:28                 ` Nicolas Goaziou
2014-02-01 17:54                   ` John Hendy
2014-02-01 20:27                     ` Nicolas Goaziou
2014-02-01 21:02                       ` Nicolas Goaziou
2014-02-02  1:33                       ` John Hendy
2014-02-02  8:45                         ` Nicolas Goaziou
2014-02-02 15:59                           ` John Hendy [this message]

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=CA+M2ft8_UzBAt0z2E+t6ePZf3anRYD0kk_AZCJkuw7bnf6+Pqw@mail.gmail.com \
    --to=jw.hendy@gmail.com \
    --cc=andreas.leha@med.uni-goettingen.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /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).