[PATCH 1 of 3 stable] obsolete: fix language and grammer in module docstring

Martin Geisler martin at geisler.net
Mon Apr 21 07:07:01 CDT 2014


Mads Kiilerich <mads at kiilerich.com> writes:

Hi Mads,

This is not super important and I agree that too much rewrapping
generates noise.

> On 04/21/2014 12:12 PM, Martin Geisler wrote:
>> I can resend with that fixed if you like? I would also like to wrap
>> the strings at a consistent width (72 chars is default in Emacs), but
>> I'm unsure if we want this on stable?
>
> It do not seem to be a good idea to wrap it to 72 chars just because
> that is the default in one of the many editors people use for editing
> the source code.

The default is not completely random. I believe the idea behind wrapping
lines a little earlier than 80 characters is that it gives you a buffer
for when the text is used in other contexts: our code often appears in
diffs on this list and these diffs are then quoted further in followup
replies.

Here, such a "buffer" can allow you to edit a line without having to
reflow the subsequent lines. So if you replace "foo" with "foobar" the
line lenght might still be within 80 characters.

> CodingStyle only mentions the 80 character limit. Reformatting to
> other conventions will just add unnecessary noise - especially when
> the next guy come by and want to wrap to 80 characters and has good
> arguments why that would be better.

In my experience, it's mostly people who use Emacs who even think about
reformatting text line that. My guess is that it's because it's so easy
and well-supported in Emacs. In my previous job, Sublime Text was quite
popular. When I asked people how it rewrapped text they looked at me
with puzzled look. Sublime Text actually supports reflowing of text, and
the keyboard shortcut is even the same as in Emacs: "Alt + q" or "M-q"
as Emacs people calls it. However, the results were pretty disasterous:
the editor also happily rewrapped the Python code :)

From a little bit of googling, I wasn't able to make Vim fare much
better. I tried with "gq}". That's probably just because I'm not a Vim
super user.

-- 
Martin Geisler

http://google.com/+MartinGeisler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20140421/846b1a41/attachment.pgp>


More information about the Mercurial-devel mailing list