All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dirk Wallenstein <halsmit@t-online.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Nanako Shiraishi <nanako3@lavabit.com>,
	Thomas Ackermann <th.acker@arcor.de>
Subject: Re: [PATCH] howto: Use all-space indentation in ASCII art
Date: Tue, 16 Jul 2013 20:01:58 +0200	[thread overview]
Message-ID: <20130716180158.GA7524@bottich> (raw)
In-Reply-To: <CAPc5daXZxkLOJwzaoSMZvJ87zYvns1MeYZU=RoEK=CQYP1qpag@mail.gmail.com>

On Tue, Jul 16, 2013 at 10:13:28AM -0700, Junio C Hamano wrote:
> > Why would you want to limit those files to be source for HTML only?
> >
> > The HTML after this patch is still fine.
> 
> Have you thought the reason why the formatted result _before_ the patch is good?
No, as I said, *.txt suffixes tell me there is text in there and not
source code.  But what is more important is that they are installed (by
Git) as is (obviously) into share/doc.  I'm happy to learn about the
conversion through these posts, but the installation is flawed.

> These *.txt files are asciidoc formatted source files. They are meant
> to be easy to read and edit without distracting mark-ups (unlike roff
> and html), but with one big precondition: your tab-width ought to be
> 8. That is how asciidoc expands the tab when producing the formatted
> output, and that is why the formatted result _before_ the patch is
> good.
asciidoc replaces the other spaces in the sketch with spaces in the
result.  Hard to believe it stops doing that if it is accidentally a
sequence of 8 spaces.  And spaces are invisible by design.  Whitespace
only distracts if it leads to a wrong result.
> 
> Expanding these tabs to all spaces do not buy us anything, other than
> source code bloat, and with one downside.
Correctness maybe, if you open them in an editor to read them.  Imagine
the code bloat when the installation procedure expands the tabs so that
the final installation is correct.

> It would give a false impression that it somehow is OK to open these
> *.txt files with a wrong tab-width setting, and even worse, edit them.
> You may even type a new tab yourself to indent by 4 places, and
> formatted result will be broken by such a person.
Luckily there are whitespace checks for mixed space and/or tab-indent.
The right approach would probably be to have no tabs indent in any of
these files.  I'm happy to assist ;)
> 
> It would signal that your tab-width setting is not suitable to
> view/edit these files if the elements in the illustration do not line
> up. View it as a bonus safety feature ;-)
gitattributes could solve that much more reliable if there wasn't any
tab indentation allowed.

In the end, this is installed as documentation with a requirement on the
tab-width of any reader application used.  The easiest and most foolproof
solution without introducing errors is to simply expand these tabs.
Again, the current installation is flawed.

-- 
Cheers,
  Dirk

  reply	other threads:[~2013-07-16 18:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-15 16:46 [PATCH] howto: Use all-space indentation in ASCII art Dirk Wallenstein
2013-07-15 22:00 ` Junio C Hamano
2013-07-16  8:24   ` Dirk Wallenstein
2013-07-16 17:13     ` Junio C Hamano
2013-07-16 18:01       ` Dirk Wallenstein [this message]
2013-07-31 16:54         ` [PATCH 0/2] Remove tabs from howto documents Dirk Wallenstein
2013-07-31 17:01           ` Fredrik Gustafsson
     [not found]         ` <cover.1375288760.git.halsmit@t-online.de>
2013-07-31 16:54           ` [PATCH 1/2] howto: Suppress indentation with tabs Dirk Wallenstein
     [not found]           ` <4d37bfa3326469ab5b7cdbf0018f7aa671c2d74a.1375288760.git.halsmit@t-online.de>
2013-07-31 16:54             ` [PATCH 2/2] howto: Eliminate all tabs Dirk Wallenstein
2013-07-31 17:03               ` Junio C Hamano
2013-07-31 17:34                 ` Dirk Wallenstein
2013-08-03 20:20                 ` Piotr Krukowiecki
     [not found]                 ` <CAA01CsqW1FWm8ExK7hypHp1_Jm0-kc1REQeuPYjbzU=aUQ+L9g@mail.gmail.com>
2013-08-05 15:32                   ` Junio C Hamano
2013-07-16 18:26     ` [PATCH] howto: Use all-space indentation in ASCII art Jonathan Nieder
2013-07-16 18:38       ` Dirk Wallenstein
2013-07-16 18:42       ` A Large Angry SCM

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=20130716180158.GA7524@bottich \
    --to=halsmit@t-online.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nanako3@lavabit.com \
    --cc=th.acker@arcor.de \
    /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.
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.