emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Disable indent-tabs-mode in org-src buffers if appropriate


From: Jonas Bernoulli
Subject: [O] Disable indent-tabs-mode in org-src buffers if appropriate
Date: Wed, 26 Jul 2017 16:37:17 +0200
User-agent: mu4e 0.9.19; emacs 25.2.1

Me again,

For the most part Org now honors the file-local value of
`indent-tabs-mode' as set in an Org file.  When that value is `nil' and
a buffer used to edit a source block from that file contains lines that
begin with tabs, then those tabs are being replaced with spaces before
the text is written back into the Org file.

So far so good.  Unfortunately inside the buffer used to edit the source
block `indent-tabs-mode' is not disabled when appropriate.  That doesn't
matter that much since it is just a transient buffer, but it is still
distracting.

I suggest that you fix that by adding the following at the appropriate
place in `org-src--edit-element':

  (when (= source-tab-width 0)
    (setq indent-tabs-mode nil))

Thanks,
Jonas



reply via email to

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