ox-rst icon indicating copy to clipboard operation
ox-rst copied to clipboard

Sequence of 8 spaces is non-deterministically exported as tabulation

Open jonglezb opened this issue 2 years ago • 0 comments

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.

jonglezb avatar May 23 '22 09:05 jonglezb