unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: rms@gnu.org, Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 20322@debbugs.gnu.org, dgutov@yandex.ru
Subject: bug#20322: 25.0.50; indent-tabs-mode should default to nil
Date: Wed, 15 Apr 2015 08:29:17 -0700 (PDT)	[thread overview]
Message-ID: <5aaab1b2-69f9-4c62-80ab-9d22d9767cdd@default> (raw)
In-Reply-To: <<E1YiD8o-000318-H5@fencepost.gnu.org>>

> Tabs make file smaller.  I just did an experiment.  In lread.c, M-x
> untabify changed 139702 characters into 155402 characters, which is
> 11% bigger.
> 
> For subr.el, it was smaller: 200817 characters became 209939, only
> 4.5% bigger.  However, files.el got 12% bigger.
> 
> If most of a git repository is text from various versions of files,
> the repository is also likely to get around 10% bigger without tabs,
> and now you're talking about 30 meg more.

That's a consideration, certainly.  But there are others - which is
why we have an option for this. ;-)  (FWIW, I've long turned off
`indent-tabs-mode', personally.)

Note that a (minor) problem for users can arise regardless of how a
user sets the option value: copying and pasting existing code from
a buffer where the option value was non-nil and where tab chars are
thus used for indentation.

When you paste a code snippet that you copied from Emacs (and perhaps
modified) into a help question reply (email, StackExchange, whatever)
- that is, you paste it into a non-Emacs environment - you can find
that the receiving environment does not handle tab chars the way you
might hope.

I find myself "bitten" by this from time to time, even though I've
pretty much learned the habit of using `untabify' first.  (E.g,
copy+yank to another buffer, untabify, then paste to the non-Emacs
application.)

Admittedly, this inconvenience is only minor.  But it is also not
obvious to some users what is going on (i.e., why they see what
they see).

FWIW, whether the default value gets changed or not is not important
to me, as a user.  I just wanted to mention this because I imagine
that there is more and more use of snippets taken from Emacs buffers
and pasted into other environments.  If you forget to use `untabify'
then you can find yourself reformatting the code in the destination
environment - a bother, even if a minor one.

And of course there are some users who might not ever become aware
of `untabify' and who share code in non-Emacs media in order to help
others.  It is a (minor) annoyance to have to reformat pasted code,
and some users might never figure out what is going on (tab chars
are invisible).

If the Emacs source code used only space chars for indenting then,
yes, that code would occupy more space.  But users copying and
pasting it outside of Emacs would not be surprised by the strange
indentation they sometimes get.

And there is lots of 3rd-party code that is based on or derived
from core Emacs code.  Users copying 3rd-party code can thus be
bitten by this gotcha also, even if the 3rd-party maintainer
turns off `indent-tabs-mode' - if s?he does not use `untabify'.

Something to think about perhaps, in any case.	

[It is good that (emacs) `Just Space' mentions `untabify' along
with `indent-tabs-mode'.  It might be good for the Elisp manual
too to mention `untabify' where it documents `indent-tabs-mode'.]





  parent reply	other threads:[~2015-04-15 15:29 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14  2:37 bug#20322: 25.0.50; indent-tabs-mode should default to nil Dmitry Gutov
2015-04-14  3:07 ` Stefan Monnier
2015-04-14 14:14   ` Dmitry Gutov
2015-04-14 15:25     ` Eli Zaretskii
2015-04-14 15:39       ` Dmitry Gutov
2015-04-14 15:59         ` Eli Zaretskii
2015-04-14 20:24           ` Dmitry Gutov
2015-04-14 21:43             ` Stefan Monnier
2015-04-14 22:17               ` Dmitry Gutov
2015-04-15  1:19                 ` Stefan Monnier
2015-04-15  2:08                   ` Dmitry Gutov
2015-04-15  4:19                     ` Stefan Monnier
2015-04-20 14:56                       ` Dmitry Gutov
2015-04-20 19:26                         ` Stefan Monnier
2015-04-20 22:09                           ` Dmitry Gutov
2015-04-21  1:25                             ` Stefan Monnier
2015-04-21 19:25                               ` Dmitry Gutov
2015-04-21 19:47                                 ` Eli Zaretskii
2015-04-22 15:02                                   ` Dmitry Gutov
2015-04-22 15:18                                     ` Eli Zaretskii
2015-04-22 15:23                                       ` Dmitry Gutov
2015-04-22 15:28                                         ` Eli Zaretskii
2015-04-22 15:49                                           ` Dmitry Gutov
2015-04-21 20:27                                 ` Stefan Monnier
2015-04-21 20:51                                   ` Dmitry Gutov
2015-04-22 13:56                                 ` Stefan Monnier
2015-04-22 14:59                                   ` Dmitry Gutov
2015-04-22 16:47                                     ` Stefan Monnier
2015-11-02 18:18                                     ` Dmitry Gutov
2015-11-02 20:37                                       ` John Wiegley
2015-11-02 21:03                                         ` Dmitry Gutov
2015-11-02 21:18                                           ` John Wiegley
2015-11-02 21:06                                         ` Eli Zaretskii
2015-11-02 21:29                                           ` John Wiegley
2015-11-02 23:31                                             ` Richard Stallman
2015-11-03  3:32                                             ` Eli Zaretskii
2015-11-02 23:31                                         ` Richard Stallman
2015-04-15 14:31                     ` Wolfgang Jenkner
2015-04-15 16:10             ` Eli Zaretskii
2015-04-17  2:48               ` Dmitry Gutov
2015-04-17  4:58                 ` Stefan Monnier
2015-04-17 13:14                   ` Dmitry Gutov
2015-04-17  7:26                 ` Eli Zaretskii
2015-04-17  8:11                   ` Eli Zaretskii
2015-04-17 14:17                   ` Dmitry Gutov
2015-04-17 14:36                     ` Eli Zaretskii
2015-04-17 15:55                       ` Dmitry Gutov
2015-04-17 16:23                         ` Eli Zaretskii
2015-04-17 18:12                     ` Stefan Monnier
2015-04-17 18:18                       ` Dmitry Gutov
2015-04-20 15:03                   ` Dmitry Gutov
2015-04-17  7:55                 ` Andreas Schwab
2015-04-17  8:12                   ` Eli Zaretskii
2015-04-17 10:55                   ` Dmitry Gutov
2015-12-26 14:27             ` Dmitry Gutov
2015-12-27  2:52               ` Richard Stallman
2015-12-27  3:21                 ` Dmitry Gutov
2015-12-27 15:50               ` Eli Zaretskii
2015-12-27 16:10                 ` Dmitry Gutov
2015-12-27 16:28                   ` Eli Zaretskii
2015-12-27 16:51                     ` Dmitry Gutov
2015-12-30  4:47               ` John Wiegley
2015-12-30 11:48                 ` Dmitry Gutov
2015-12-30 12:15                   ` Dmitry Gutov
2015-12-30 19:18                     ` John Wiegley
2015-12-31  0:24                       ` Dmitry Gutov
2015-12-31  1:17                         ` John Wiegley
2015-12-31  1:26                           ` Dmitry Gutov
2015-12-31  2:48                             ` John Wiegley
2015-12-31  6:30                       ` Richard Stallman
2015-04-14 17:15         ` Stefan Monnier
2015-04-14 18:08           ` Nicolas Petton
2015-04-14 20:33           ` Dmitry Gutov
2015-04-14 19:09     ` Achim Gratz
2015-04-14 21:58       ` Dmitry Gutov
2015-04-15  2:33   ` Richard Stallman
2015-04-15 11:18     ` Dmitry Gutov
2015-04-15 16:17       ` Eli Zaretskii
2015-04-15 23:03         ` Dmitry Gutov
     [not found]   ` <<E1YiD8o-000318-H5@fencepost.gnu.org>
2015-04-15 15:29     ` Drew Adams [this message]
2015-04-14 14:17 ` Eli Zaretskii
2015-04-14 14:40   ` Dmitry Gutov
2015-04-14 15:29     ` Eli Zaretskii
2015-04-14 15:48       ` Dmitry Gutov
2015-04-14 16:02         ` Eli Zaretskii
2015-04-17 17:22         ` Philipp Stephani
2015-04-18  2:55           ` Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5aaab1b2-69f9-4c62-80ab-9d22d9767cdd@default \
    --to=drew.adams@oracle.com \
    --cc=20322@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=rms@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 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).