all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuri Khan <yuri.v.khan@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: tomas@tuxteam.de, Emacs developers <emacs-devel@gnu.org>
Subject: Re: What's the line length limit in the Emacs codebase?
Date: Sat, 26 Dec 2020 18:17:52 +0700	[thread overview]
Message-ID: <CAP_d_8WrNhTdw6OVbJNbSzM3LkqZUqD=4PP1uYW6_w0=5thokg@mail.gmail.com> (raw)
In-Reply-To: <87o8igzwaw.fsf@gmx.de>

On Sat, 26 Dec 2020 at 17:39, Michael Albinus <michael.albinus@gmx.de> wrote:

> > But sometimes (e.g. you have long string literals where
> > breaks don't make sense -- but there are other examples),
> > it is rather counterproductive to stick religiously to
> > that rule.
>
> In Lisp code, I break such long strings into substrings, wrapped by concat.
> Just for the better readability with 80 columns.

I’m used to doing the same, but some coding style guides present a
good reason to avoid doing that[1]:

    6.2: Strings that cause the line to go over 100 characters
    should not be written across multiple lines using string concatenation.

    > 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.



  reply	other threads:[~2020-12-26 11:17 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-23  9:58 What's the line length limit in the Emacs codebase? Philipp Stephani
2020-12-23 15:42 ` Eli Zaretskii
2020-12-23 16:55   ` Stefan Monnier
2020-12-23 21:21     ` Karl Fogel
2020-12-24  3:37       ` Eli Zaretskii
2020-12-25 17:11     ` Philipp Stephani
2020-12-25 17:43       ` Stefan Monnier
2020-12-26 11:02         ` Philipp Stephani
2020-12-26 16:30           ` Stefan Monnier
2020-12-27  5:38           ` Richard Stallman
2020-12-25 20:32       ` tomas
2020-12-26 10:38         ` Michael Albinus
2020-12-26 11:17           ` Yuri Khan [this message]
2020-12-26 11:22             ` Michael Albinus
2020-12-26 11:36               ` Yuri Khan
2020-12-26 12:21                 ` tomas
2020-12-26 18:31           ` Drew Adams
2020-12-26 11:12         ` Philipp Stephani
2020-12-25 17:10   ` Philipp Stephani
2020-12-25 19:04     ` Eli Zaretskii
2020-12-26 11:09       ` Philipp Stephani
2020-12-26 11:14         ` Eli Zaretskii
2020-12-26 10:24     ` Richard Stallman
2020-12-26 11:04       ` Philipp Stephani
2020-12-26 18:43         ` Drew Adams

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='CAP_d_8WrNhTdw6OVbJNbSzM3LkqZUqD=4PP1uYW6_w0=5thokg@mail.gmail.com' \
    --to=yuri.v.khan@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=tomas@tuxteam.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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.