From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: Changing line widths in the Emacs source code Date: Mon, 14 Sep 2020 10:08:08 +1000 Message-ID: References: <87tuw1x016.fsf@gnus.org> <20200913142210.GA4285@ACM> <87d02pmsi7.fsf@t510.orion.oneofus.la> <87o8m9sadk.fsf@gkayaalp.com> <87mu1ts756.fsf@gkayaalp.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000fad4ea05af3ad47c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17151"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Mackenzie , Stefan Monnier , Emacs developers To: =?UTF-8?B?R8O2a3R1xJ8gS2F5YWFscA==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 14 02:09:08 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHc3Q-0004Lv-52 for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 02:09:08 +0200 Original-Received: from localhost ([::1]:50992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHc3P-0003R0-6V for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Sep 2020 20:09:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHc2h-0002bL-45 for emacs-devel@gnu.org; Sun, 13 Sep 2020 20:08:23 -0400 Original-Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]:35769) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHc2f-0004jN-1c for emacs-devel@gnu.org; Sun, 13 Sep 2020 20:08:22 -0400 Original-Received: by mail-oo1-xc2c.google.com with SMTP id k13so3616871oor.2 for ; Sun, 13 Sep 2020 17:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VrgdUYarKDBC1A5Nnjd2jmkbGpJPA0rasNnMY+LVyb0=; b=pckDks9IO4z3keDHJFOYqcji8e+Qseh2KBXKppcKUAuD25mBlpFBlAh4HQFjQWKF7v /nK5HB3wlmqLxNTkqglGZdeTMu4QRmV8qL9mqAiwlwvWGOK+tLM7f4H2/JHVTPfTL6SE wDnYXBhzDWjiTtDGas5T+G5mD+RaShJRBx1td9WdaDb5ZqD1nH8SJO+V1hvnl+YVsnvF qx34/vhXvD3B7F6Qs/XjEDzFdWS/24I0QpBlHtZq4pBYFDoI3bMyib5w2uJvtsqUsqMy RmuwWrN+20cKfUkk9mIm4vAZBgH5LzRGrwsBihhjIQO698nscTQyKTW0kpxsvQ9ZxPeV b6FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VrgdUYarKDBC1A5Nnjd2jmkbGpJPA0rasNnMY+LVyb0=; b=OBRjnvKH8DKDFxP42h7FsBha7Bvf6RZVzS8gR8DWUNuj4XLky8DxBYvwE4rABNW5yV 4bC9yRWUNum0EeA7yCWhLIiahYOgrNKkhqpsZfOeI5irhzzuLfUbR/2T0oV6P+DCTJFA hpYnpAdarJGtkDThnD1gXnsZNVJ3Yjqm3X+beHKBun2+HY9mBTvtJPNxQQjPv10EyQL/ P+DPEpl93gleVeczKWqjt4YXDeg8tzwd++IC0SqmPWSahAl5STFX14o7QhSWeg06LB2+ wMQQz9rhI/A7USDs9YOTEjjV3E+XzyO5doGc8UDXhB4KbdcfF7MAILlgf4LQHiQM3W/V ZnBA== X-Gm-Message-State: AOAM530dIj6TapFTUCMfFqVBfodvv6S3VCXtqBH+994s96CWxSQY/cT2 8TgE/Do/LaLOC+EPRyaGpYURHCsD9TBDi2qXS3s= X-Google-Smtp-Source: ABdhPJymdqHjwCCdWLrLl09xFeS7HSbsceZV7oBTNjR0TBi+XkH2ZpxHa/2I9Xz6dBESf5vfJjnk9hj3sn4zljskD3Y= X-Received: by 2002:a4a:c909:: with SMTP id v9mr8469080ooq.43.1600042099724; Sun, 13 Sep 2020 17:08:19 -0700 (PDT) In-Reply-To: <87mu1ts756.fsf@gkayaalp.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::c2c; envelope-from=theophilusx@gmail.com; helo=mail-oo1-xc2c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:255592 Archived-At: --000000000000fad4ea05af3ad47c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable As a vision impaired coder, I prefer the 80 column width as it allows me to have larger fonts and still see the whole line on a large monitor. However, a more important data point might be the impact wider lines would have for code examples and samples in blogs, ebooks and other formats. Such things are typically formatted for reading and are usually formatted for 80 characters (or less). With longer source code lines, either smaller fonts or re-formatting would be required. Probably the most important data points against increased size is the ability to display windows 'side by side' and the growth in mobile/laptop environments, which typically have much smaller screens than desktops. I am against this change. On Mon, 14 Sep 2020 at 07:24, G=C3=B6ktu=C4=9F Kayaalp = wrote: > On 2020-09-13 23:52 +03, Stefan Monnier wrote: > > So, ~8 columns of indentation, which leaves ~72 columns of actual text. > > Since most lines don't extend all the way to the 80th column, that mean= s > > most lines stick within the 55-60 optimum. > > Much less, actually: > > (let ((spaces '(0)) > (line-count 1)) > (with-current-buffer "org.el.gz" > (goto-char (point-min)) > (while (not (looking-at "\\'")) > (push > (- (line-end-position) > (save-excursion (back-to-indentation) (point))) > spaces) > (cl-incf line-count) > ;; beginning of next line > (goto-char (1+ (line-end-position))))) > (message "On average %f chars per line excluding indentation (%d lines)= " > (/ (apply #'+ spaces) (float line-count)) > line-count)) > > =3D> "On average 34.588839 chars per line excluding indentation (21235 > lines)" > > So around a comfy 35 chars of code per line. Also: > > (let ((spaces '(0)) > (line-count 1)) > (with-current-buffer "org.el.gz" > (goto-char (point-min)) > (while (not (looking-at "\\'")) > (push > (- (line-end-position) > (line-beginning-position)) > spaces) > (cl-incf line-count) > ;; beginning of next line > (goto-char (1+ (line-end-position))))) > (message "On average %f chars per line (%d lines)" > (/ (apply #'+ spaces) (float line-count)) > line-count)) > > =3D> "On average 37.766847 chars per line (21235 lines)" > > Your average line is 38 chars long, indentation included. > > If anybody wants to replicate this, this is from a build of Emacs from > "931b9f5953013c1e8844d0c723411b87ccfedb1a". > > -- > =C4=B0. G=C3=B6ktu=C4=9F Kayaalp / @cadadr / > pgp: 024C 30DD 597D 142B 49AC 40EB 465C D949 B101 2427 > > --=20 regards, Tim -- Tim Cross --000000000000fad4ea05af3ad47c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
As a vision impaired coder, I prefer the 80 column width a= s it allows me to have larger fonts and still see the whole line on a large= monitor. However, a more important data point might be the impact wider li= nes would have for code examples and samples in blogs, ebooks and other for= mats. Such things are typically formatted for reading and are usually forma= tted for 80 characters (or less). With longer source code lines, either sma= ller fonts or re-formatting would be required.=C2=A0

Pro= bably the most important data points against increased size is the ability = to display windows 'side by side' and the growth in mobile/laptop e= nvironments, which typically have much smaller screens than desktops.=C2=A0=

I am against this change.



On Mon, 14 Sep 2020 at 07:24, G=C3=B6ktu=C4=9F Kayaalp <self@gkayaalp.com> wrote:
=
On 2020-09-13 23:52 +03, = Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> So, ~8 columns of indentation, which leaves ~72 columns of actual text= .
> Since most lines don't extend all the way to the 80th column, that= means
> most lines stick within the 55-60 optimum.

Much less, actually:

(let ((spaces '(0))
=C2=A0 =C2=A0 =C2=A0 (line-count 1))
=C2=A0 (with-current-buffer "org.el.gz"
=C2=A0 =C2=A0 (goto-char (point-min))
=C2=A0 =C2=A0 (while (not (looking-at "\\'"))
=C2=A0 =C2=A0 =C2=A0 (push
=C2=A0 =C2=A0 =C2=A0 =C2=A0(- (line-end-position)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (save-excursion (back-to-indentation) (p= oint)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0spaces)
=C2=A0 =C2=A0 =C2=A0 (cl-incf line-count)
=C2=A0 =C2=A0 =C2=A0 ;; beginning of next line
=C2=A0 =C2=A0 =C2=A0 (goto-char (1+ (line-end-position)))))
=C2=A0 (message "On average %f chars per line excluding indentation (%= d lines)"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(/ (apply #'+ spaces) (float l= ine-count))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0line-count))

=3D> "On average 34.588839 chars per line excluding indentation (21= 235 lines)"

So around a comfy 35 chars of code per line.=C2=A0 Also:

(let ((spaces '(0))
=C2=A0 =C2=A0 =C2=A0 (line-count 1))
=C2=A0 (with-current-buffer "org.el.gz"
=C2=A0 =C2=A0 (goto-char (point-min))
=C2=A0 =C2=A0 (while (not (looking-at "\\'"))
=C2=A0 =C2=A0 =C2=A0 (push
=C2=A0 =C2=A0 =C2=A0 =C2=A0(- (line-end-position)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (line-beginning-position))
=C2=A0 =C2=A0 =C2=A0 =C2=A0spaces)
=C2=A0 =C2=A0 =C2=A0 (cl-incf line-count)
=C2=A0 =C2=A0 =C2=A0 ;; beginning of next line
=C2=A0 =C2=A0 =C2=A0 (goto-char (1+ (line-end-position)))))
=C2=A0 (message "On average %f chars per line (%d lines)"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(/ (apply #'+ spaces) (float l= ine-count))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0line-count))

=3D> "On average 37.766847 chars per line (21235 lines)"

Your average line is 38 chars long, indentation included.

If anybody wants to replicate this, this is from a build of Emacs from
"931b9f5953013c1e8844d0c723411b87ccfedb1a".

--
=C4=B0. G=C3=B6ktu=C4=9F Kayaalp / @cadadr / <https://www.gkayaalp.com/<= /a>>
pgp:=C2=A0 =C2=A0024C 30DD 597D 142B 49AC 40EB 465C D949 B101 2427



--
regards,

Tim

--
Tim Cross

--000000000000fad4ea05af3ad47c--