* Two adjacent spaces and tabify
@ 2014-11-09 15:33 Alan Mackenzie
2014-11-09 16:29 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Alan Mackenzie @ 2014-11-09 15:33 UTC (permalink / raw)
To: emacs-devel
Hello, Emacs.
I have some elisp source on which tabify has been run. This is fine and
good, but in many places in comments (and even strings), two spaces have
been replaced by a tab. Even worse, in many other places, two spaces
have been replaced by tab, space.
With a tab-width of 8, one of these can be expected to occur every
fourth end of sentence, more or less. This is not good.
It is easy enough to configure tabify such that only spaces at the
beginning of a line are candidates for tabs, but that might wipe out
desired tabs (for example, in commented out code).
Does anybody already have a solution for this problem, or any good ideas
on how to fix the current state (or even how to stop it happening in the
first place)?
Thanks!
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Two adjacent spaces and tabify
2014-11-09 15:33 Two adjacent spaces and tabify Alan Mackenzie
@ 2014-11-09 16:29 ` Eli Zaretskii
2014-11-10 9:50 ` Sebastien Vauban
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2014-11-09 16:29 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: emacs-devel
> Date: Sun, 9 Nov 2014 15:33:07 +0000
> From: Alan Mackenzie <acm@muc.de>
>
> I have some elisp source on which tabify has been run. This is fine and
> good, but in many places in comments (and even strings), two spaces have
> been replaced by a tab. Even worse, in many other places, two spaces
> have been replaced by tab, space.
>
> With a tab-width of 8, one of these can be expected to occur every
> fourth end of sentence, more or less. This is not good.
>
> It is easy enough to configure tabify such that only spaces at the
> beginning of a line are candidates for tabs, but that might wipe out
> desired tabs (for example, in commented out code).
>
> Does anybody already have a solution for this problem, or any good ideas
> on how to fix the current state (or even how to stop it happening in the
> first place)?
Don't tabify. Instead, set indent-tabs-mode to non-nil, and
_reindent_ everything, e.g. with C-M-\.
Tabify is for text files and ASCII art, not for program sources.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Two adjacent spaces and tabify
2014-11-09 16:29 ` Eli Zaretskii
@ 2014-11-10 9:50 ` Sebastien Vauban
2014-11-10 10:53 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Sebastien Vauban @ 2014-11-10 9:50 UTC (permalink / raw)
To: emacs-devel-mXXj517/zsQ
Eli Zaretskii wrote:
> Don't tabify. Instead, set indent-tabs-mode to non-nil, and
> _reindent_ everything, e.g. with C-M-\.
Shouldn't that be set to be the default in Emacs?
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Two adjacent spaces and tabify
2014-11-10 9:50 ` Sebastien Vauban
@ 2014-11-10 10:53 ` Eli Zaretskii
2014-11-10 11:22 ` Sebastien Vauban
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2014-11-10 10:53 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: emacs-devel
> From: Sebastien Vauban <sva-news@mygooglest.com>
> Date: Mon, 10 Nov 2014 10:50:35 +0100
>
> Eli Zaretskii wrote:
> > Don't tabify. Instead, set indent-tabs-mode to non-nil, and
> > _reindent_ everything, e.g. with C-M-\.
>
> Shouldn't that be set to be the default in Emacs?
I'm not sure I understand what would you like to be the default. If
it indent-tabs-mode, then it's t by default.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Two adjacent spaces and tabify
2014-11-10 10:53 ` Eli Zaretskii
@ 2014-11-10 11:22 ` Sebastien Vauban
0 siblings, 0 replies; 5+ messages in thread
From: Sebastien Vauban @ 2014-11-10 11:22 UTC (permalink / raw)
To: emacs-devel-mXXj517/zsQ
Eli Zaretskii wrote:
>> From: Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
>> Date: Mon, 10 Nov 2014 10:50:35 +0100
>>
>> Eli Zaretskii wrote:
>> > Don't tabify. Instead, set indent-tabs-mode to non-nil, and
>> > _reindent_ everything, e.g. with C-M-\.
>>
>> Shouldn't that be set to be the default in Emacs?
>
> I'm not sure I understand what would you like to be the default. If
> it indent-tabs-mode, then it's t by default.
I've misread, sorry, as I'm on the side "Indentation never can insert
TABs".
If TABs are allowed, and even preferred in the Emacs source code a.o.,
the current default is admittedly the right one.
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-11-10 11:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-09 15:33 Two adjacent spaces and tabify Alan Mackenzie
2014-11-09 16:29 ` Eli Zaretskii
2014-11-10 9:50 ` Sebastien Vauban
2014-11-10 10:53 ` Eli Zaretskii
2014-11-10 11:22 ` Sebastien Vauban
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).