Sometimes when I am typing in emacs, I type a space and emacs actually inserts a tab instead of the space. For example, while typing "Four score and seven years ago" emacs actually inserts this: "For score andseven yearsago". However, it only does this then the space falls on an 8 character boundary, at character position 7, 15, 23, etc. relative to the start of the line. Because of its positioning in the line, these tabs show up as only one space. However, if I copy/paste this line to another app, the tabs show up as 8 spaces; they are really tabs, not spaces.
Is there some way to shut off this behavior?
Note: I am on a mac and I'm using: GNU Emacs 26.3 (build 1, x86_64-apple-darwin19.0.0) of 2019-11-08
indent-tabs-mode
will be the ultimate reason why tabs are appearing in the buffer, that does not explain at all why typing a space would cause anything other than the insertion of a space. DoesC-h k SPC
tell you it's bound to anything different toself-insert-command
? Which major mode are you using? Does this happen if you start fromemacs -Q
? If not, something in your own config is behind this. It sounds like some kind of excessive automated re-indentation behaviour. – phils Aug 15 '20 at 00:11emacs -Q
. – Drew Aug 19 '20 at 21:08