all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* spaces before tabs (yuck!)
@ 2015-11-04  0:10 Hikaru Ichijyo
  2015-11-04  0:24 ` Kaushal Modi
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Hikaru Ichijyo @ 2015-11-04  0:10 UTC (permalink / raw)
  To: help-gnu-emacs

The question of tabs versus spaces is so notorious, it has its own
chapter in the Emacs manual.  Some people hate the confusion that tabs
cause them so much that they set indent-tabs-mode nil to make it so only
spaces are ever used, and there are no tabs anywhere.

I don't want to do that.  I just want to make it so Emacs will never
insert spaces unless the next character is either a visible/printable
one, or it is the end of the line.  In other words, no spaces before
tabs.

Recent versions of Nano actually highlight this in red by default:  If
Nano sees one or more spaces that are immediately followed by a tab, the
whitespace is shown in red reverse video.  It is considered undesirable
because the effect of such spaces is hard to predict.  If there are too
few of them to reach the next tab stop, they will do nothing (but waste
bytes).  If there are enough, they will push following tabs over.  It's
probably never a good thing.

Is there something I can set in my ~/.emacs globally to make Emacs
never, ever save space characters to a file if there is a tab character
immediately folowing it?  I can't think of a situation, either coding or
writing in human language, where I would ever want that.

-- 
He that would make his own liberty secure must guard even his enemy from
oppression; for if he violates this duty, he establishes a precedent
that will reach to himself.
					--Thomas Paine


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

end of thread, other threads:[~2015-11-04 17:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-04  0:10 spaces before tabs (yuck!) Hikaru Ichijyo
2015-11-04  0:24 ` Kaushal Modi
2015-11-04  2:34 ` Drew Adams
2015-11-04 15:54 ` Kendall Shaw
2015-11-04 16:14   ` Stefan Monnier
2015-11-04 17:21     ` Kendall Shaw

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.