There seems to be a slight difference in how emacs, with whitespace-mode enabled, displays tabs compared to e.g. terminals: When a tab would lead to only one (visual) space being displayed before the next tab stop, it seems like emacs skips to the next tab stop instead.
This can best be illustrated with an example. In the following text, if there is a single tab character between the last digit and the "t", both emacs and the terminal display the text identically at a tab width of 8:
123456 t xxxxxxxxx But if I add just one digit, effectively shrinking the space for the tab to one character, terminals still place the letter "t" as before:
1234567 t xxxxxxxxx But emacs "skips" to the next tab stop, and effectively inserts 8+1 spaces for display:
1234567 t xxxxxxxxx It's like emacs somehow wants there to always be at least two spaces for every tab stop when displaying.
I particularly notice this issue when editing assembly files, where a tab width of 4 is common, and the frequent mix of 3 character and 4 character assembly instructions really wreaks havoc on the formatting.
Where does this difference come from, and can I change it (buffer-locally)?
emacs -Qor with my configuration, either in a GUI or in a terminal. Please share precise instructions to reproduce this (Emacs version, OS, interface, any steps to take beyond typing inemacs -Q).whitespace-mode. It's also mentioned in the comments in the definition ofwhitespace-display-mappings. Can you confirm if you are using it?emacs -Qas Gilles suggested: the OP could have tested withemacs -Qandemacs -qto verify that the problem does not occur in that case, and then bisected the init file to find the culprit.