msnoigrs / ox-rst

reStructuredText Back-End for Org-Mode Export Engine
116 stars 18 forks source link

Sequence of 8 spaces is non-deterministically exported as tabulation #56

Open jonglezb opened 2 years ago

jonglezb commented 2 years ago

Example org input:

#+LANGUAGE: en
#+OPTIONS: ':t author:nil email:nil date:nil toc:nil

#+BEGIN_SRC python
def foo(x):
    if x % 2 == 0:
        return 42
    return 1337
#+END_SRC

Output:

.. code:: python

    def foo(x):
        if x % 2 == 0:
        return 42
        return 1337

Notice that there is a tab before return 42 in the output.

If I disable tabulations in my .emacs config file with (setq-default indent-tabs-mode nil), then the export works as expected, there is no tabulation.

The main issue I have is the non-determinism: depending on the local Emacs configuration, the export will be different, which is annoying when the output is committed in a git repository with several people working on it.