emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] buffer local org-src-preserve-indentation not respected


From: Nicolas Goaziou
Subject: Re: [O] buffer local org-src-preserve-indentation not respected
Date: Sat, 03 Dec 2016 23:58:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hello,

David Dynerman <address@hidden> writes:

> I'd like to report a bug. It seems that setting
> org-src-preserve-indentation to true doesn't work if it's set buffer
> local.
>
> To reproduce, save the following as an org file:
>
> #+BEGIN_SRC python :tangle preserve-indent.py
> class Foo:
>     bar = 5
> #+END_SRC
>
>
> Here is some interstitial text!
>
> #+BEGIN_SRC python :tangle preserve-indent.py
>     def __init__(self):
>         self.bar = 7
> #+END_SRC
>
> Then:
>
> 1) (setq org-src-preserve-indentation nil) and tangle the file. Open
> preserve-indent.py and note that def __init__ has no leading whitespace,
> which means python will not recognize it as a member of Foo
>
> 2) (setq org-src-preserve-indentation t) and tangle the file. Open
> preserve-indent.py and note that now def __init__ is properly
> indented. This is the expected behavior.
>
> 3) (setq org-src-perserve-indentation nil), then M-x
> make-variable-buffer-local and set org-src-preserve-indentation to
> t. Tangle the file and open preserve-indent.py. Note that def __init__
> is back to being not-indented. The expected behavior is that the
> indentation would be respected, as in #2.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]