From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Derek Feichtinger <derek.feichtinger@psi.ch>
Cc: emacs-orgmode@gnu.org
Subject: Re: src block indentation causing problems due to tab/space mixing - proposed fix
Date: Sun, 19 Aug 2018 10:40:11 +0200 [thread overview]
Message-ID: <87bm9ywxzo.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87zhycu834.fsf@psi.ch> (Derek Feichtinger's message of "Fri, 27 Jul 2018 15:22:23 +0200")
Hello,
Derek Feichtinger <derek.feichtinger@psi.ch> writes:
> I think that the current way of indenting source blocks
> (with org-src-preserve-indentation is set to nil) is not ideal in regard
> to languages that dislike mixing of tabs and spaces.
For such languages, there is `org-src-preserve-indentation'...
>
> I'm currently switching to python3 and this forbids the mixing.
> Setting org-src-preserve-indentation to t would basically create
> problems with many of my older files,
You can set it locally, for every new Python block, with "-i" switch.
> and I also dislike the reduced readability resulting from the code
> block contents being aligned at column 0.
I cannot see any other way around.
> I just tested it also with some tangled files, and it seems to work
> nicely for my test cases. Still, I may have overlooked something, and
> there is a deeper reason for the original implementation.
Org removes indentation automatically, e.g., when editing a source block
or when exporting a document. If you indent lines in an indentation
preserved block, there is no more way to tell if the indentation is
added by Org -- and could be removed -- or required by the block. This
is why we also need to indent them from column 0.
Regards,
--
Nicolas Goaziou
prev parent reply other threads:[~2018-08-19 8:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-27 13:22 src block indentation causing problems due to tab/space mixing - proposed fix Derek Feichtinger
2018-08-19 8:40 ` Nicolas Goaziou [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=87bm9ywxzo.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=derek.feichtinger@psi.ch \
--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).