all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Disable indent-tabs-mode in org-src buffers if appropriate
@ 2017-07-26 14:37 Jonas Bernoulli
  2017-08-06  9:32 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Jonas Bernoulli @ 2017-07-26 14:37 UTC (permalink / raw)
  To: emacs-org list

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-06  9:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-26 14:37 Disable indent-tabs-mode in org-src buffers if appropriate Jonas Bernoulli
2017-08-06  9:32 ` Nicolas Goaziou

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.