From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: What's the line length limit in the Emacs codebase? Date: Sat, 26 Dec 2020 18:36:29 +0700 Message-ID: References: <83wnx8pm0e.fsf@gnu.org> <20201225203227.GA10689@tuxteam.de> <87o8igzwaw.fsf@gmx.de> <87eejczua4.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="402"; mail-complaints-to="usenet@ciao.gmane.io" Cc: tomas@tuxteam.de, Emacs developers To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 26 12:37:17 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 1kt7sr-000AbC-Mp for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Dec 2020 12:37:17 +0100 Original-Received: from localhost ([::1]:53450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kt7sq-0002Zb-OV for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Dec 2020 06:37:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kt7sK-0002Ap-1i for emacs-devel@gnu.org; Sat, 26 Dec 2020 06:36:44 -0500 Original-Received: from mail-ua1-x931.google.com ([2607:f8b0:4864:20::931]:33055) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kt7sI-0001Xv-9U for emacs-devel@gnu.org; Sat, 26 Dec 2020 06:36:43 -0500 Original-Received: by mail-ua1-x931.google.com with SMTP id f29so1948588uab.0 for ; Sat, 26 Dec 2020 03:36:41 -0800 (PST) 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:content-transfer-encoding; bh=e+JESBSvN4h0kVlQQsrLu8bpnBmFsYGOnb3zXm/lVWE=; b=sXMbh663v6DnG8hGTN7XftcnmJ/luuvEYwJ0Di2EeqXCtS3oTyr+4h/qJ3spvZONMQ XD2tpgnHneCkfvNaOF1DTgyV1h2ph336BxOCd7BFx7kLkASLB/pyCh0PQJ/DBvNKCj+e 48eTQ555DFFFZmeqQJ9h+DyApqpL8RXgHI+zNnGx136Ndm5C7xKyxadIqvmi6SfEZEnE Q7+/zJyVVrNfFFcowjsuSohW7qxFA7758x+ms7Fa7HWVsiKba5E6opMU5cHB/AHBY+dG 3rzU8aF2t0zUPGzX8CTQdKu54E1PXrpPrdOHvKNxHUo+Y81UYm1ZBZVQv4O3hVYV6Izb BNAA== 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:content-transfer-encoding; bh=e+JESBSvN4h0kVlQQsrLu8bpnBmFsYGOnb3zXm/lVWE=; b=KalJPIvt3DOpmhAmpxbMKst/M8AKjFumlJh8lsfoZ/IY+vP3WA67v1lOexvXOgGX/Y EKiiLGaEusnDuCGnL89T1aCx2l8Gf6PF27RFLdVEKHPwPc3i5UscpEtlUnvcUFLbSFPP EBtLaaq+RuzoQf8VeczHK6rjRCpYdrf8kV7mxWOSVXtmtcuwn0hqeRc3KEbkD+wbJI/r 0gaN9ofddS/ySphe6tFP6lZGdhZdpaJ+wYb5Gcg9KGFe5LafVrojBPcrn0g2HcZG2z7S 1brS7yADNCj2vx1USZ4uPay8Wul87SKYq7mQC6jiHD1msFA+qoUD8Ac3JzaW41EsktNI 262w== X-Gm-Message-State: AOAM530gSUM+IH7ox2eKwL7iNYW3jQo6mxlYphsqg7CO1LoymrQCiGmD lKc89c1coszscB6xUw6jpqJcyV817g26n6eT/OI= X-Google-Smtp-Source: ABdhPJzOf7UOG8/OEeiOfq/6KEAZwMozk1VoZRd2XIIfiDTQhpGdnuEklxYuXGs1EJfOgoQrAZzCj9l6I9wkWeOwA1c= X-Received: by 2002:ab0:2010:: with SMTP id v16mr23900740uak.24.1608982600474; Sat, 26 Dec 2020 03:36:40 -0800 (PST) In-Reply-To: <87eejczua4.fsf@gmx.de> Received-SPF: pass client-ip=2607:f8b0:4864:20::931; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x931.google.com 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, 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:261847 Archived-At: On Sat, 26 Dec 2020 at 18:22, Michael Albinus wrot= e: > > 6.2: Strings that cause the line to go over 100 characters > > should not be written across multiple lines using string concatenat= ion. > > > > > Why? Broken strings are painful to work with > > > and make code less searchable. > > > > [1]: https://github.com/airbnb/javascript#strings--line-length > > > > I have actually found myself trying to grep for an error message ang > > failing to find it in code at first try because it was line-broken at > > a non-obvious point. > > Yes, it is always a trade-off. However, I'm failing to find error > messages in the code much more often because they are produced by > format, which could be banned for the same reason. When you see an error message, most of the time, it=E2=80=99s easy to see which parts are constant text and which are substituted variable text. Whereas line breaks could be anywhere. When I break string literals to fit line length limits, I go for any embedded \n first, then sentence boundaries, and only if that does not bring the parts within limits, then phrase boundaries and intra-sentence punctuation. This way, any run of text that contains no punctuation or variable info has a high probability to be unbroken in code.