From: Hikaru Ichijyo <ichijyo@macross.sdf.jp>
To: help-gnu-emacs@gnu.org
Subject: spaces before tabs (yuck!)
Date: Tue, 03 Nov 2015 18:10:39 -0600 [thread overview]
Message-ID: <8xxh9l2ei9s.fsf@village.keycorner.org> (raw)
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
next reply other threads:[~2015-11-04 0:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 0:10 Hikaru Ichijyo [this message]
2015-11-04 0:24 ` spaces before tabs (yuck!) 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8xxh9l2ei9s.fsf@village.keycorner.org \
--to=ichijyo@macross.sdf.jp \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.