From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: Codifying some aspects of Elisp code style and improving pretty printer Date: Fri, 01 Oct 2021 16:26:46 +0200 Message-ID: <87a6js253t.fsf@gmail.com> References: <87o88bntv8.fsf@gmail.com> <87wnmyy29v.fsf@gmail.com> <871r56nlhd.fsf@gmail.com> <87v92hw7gq.fsf@gnus.org> 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="7669"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Bozhidar Batsov , akater , Emacs Devel To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 01 16:29:44 2021 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 1mWJXj-0001mf-9s for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Oct 2021 16:29:43 +0200 Original-Received: from localhost ([::1]:51462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWJXi-0007ge-7H for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Oct 2021 10:29:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWJUz-0003PL-Qd for emacs-devel@gnu.org; Fri, 01 Oct 2021 10:26:55 -0400 Original-Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:46972) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWJUw-0001Ed-KU for emacs-devel@gnu.org; Fri, 01 Oct 2021 10:26:53 -0400 Original-Received: by mail-wm1-x336.google.com with SMTP id o4-20020a05600c510400b0030d55d6449fso205744wms.5 for ; Fri, 01 Oct 2021 07:26:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=gL5tIVe3OKd3SPFZFXTjH2WmZPRjVJmKmRxe4Veeznw=; b=UNPWQ+7ppoj2ExU1GOmSaXxRggqXHb0TKGryEaQ6jJsVpT94l/uEm6veHymQBjy7ny 9QhPa/+lL86m/bppy7XqBGsb5phkFfs5Wzs9f+yzEAulNeTRTxrAAKl9affISj3aRkAe Jy+nAVNwJ6/VTs9S//xPvb1eS0jdPty7ESRqrPInk45Jyr9FpCrrAf+3rlcKz6PdhV9r XPrGuwtEyaUW1U9Ibb3yZ/ebq1oBTXzl3gfJuaC4WgRQ+/n5OzxyX/WYHnH6ozMu2hch tNirjaNzHORfKF6OnAar1x0B1SmEPg4ImRtiJTss1gfSUIVPTZpjla/foWhejMQ3CI9Q R9vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=gL5tIVe3OKd3SPFZFXTjH2WmZPRjVJmKmRxe4Veeznw=; b=sA8YsEm943l2S8V31xeGd5hL6lfO9Oty01AZICpO8Va/Ro8Hh4P/Gxhcnov32qOb6u kM0LJuLCjy+4AlRjUmqCJqIEPQbwEZiF4Sx1sRztXDdNPOiKWZBfOFzGbRNDsQCA/l8e GTyz/Mpj8JE7mrOHlk53zO/jSMlo2HxPytPQjP6HbH3KobG6amp3pERo866zHgt6vB0E p5s4hQCaufgwY3BaczYcXAOpDzwA30Vkcv5cfKLjcIjCdI5BYrFiGcIhbuWmvnujvR4H COwStVJC2n/ZP9JoKQFXsKgUj5Hx/Ey2MHeDDDjHIFEialWyh/XOX7uDzT7LWpfDVuW+ gkAA== X-Gm-Message-State: AOAM532S29twOlv4V5XJLSiP5FZKKznWQUmYGevPDWZj1+RcFb4B6qQK u3aGK0oL3WuzeFZC0eZlO8OOeB+AoRo= X-Google-Smtp-Source: ABdhPJwGZupS9u7omX+iiRdDhQd4cQ4RzQEgne4p05Xbu2vSBJzvaWRQjajcGCkVoAWC6vo/wBktUw== X-Received: by 2002:a05:600c:21c8:: with SMTP id x8mr4684101wmj.163.1633098408229; Fri, 01 Oct 2021 07:26:48 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id h18sm5838479wrs.75.2021.10.01.07.26.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 07:26:47 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: <87v92hw7gq.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 01 Oct 2021 09:05:25 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=rpluim@gmail.com; helo=mail-wm1-x336.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:275985 Archived-At: >>>>> On Fri, 01 Oct 2021 09:05:25 +0200, Lars Ingebrigtsen said: Lars> akater writes: >> But I don't think in Lisp this could be enforced in its entirety whi= ch >> is why I said that indentation mechanism should not attempt to enfor= ce >> this. It's very subjective. Often, I want to keep a long line and a >> couple of moments afterwards I decide that it's too long after all. Lars> A coding style that's not automatically enforced isn't very usefu= l, in Lars> my opinion. It just leads to even more arguing, with some people Lars> insisting that it should always be adhered to, and others arguing= that Lars> this is a special case where it shouldn't. Apropos, I believe the current recommendation is to do (mapconcat #'identity seqs " ") rather than (mapconcat 'identity seqs " ") ie function-quoting the argument to mapconcat, apply, mapc etc, but 1. The elisp manual doesn=CA=BCt say that in (info "(elisp) Mapping Functio= ns") 2. Emacs' code itself doesn=CA=BCt do that consistently (and we have the odd #'(lambda ...) as well 3. The byte compiler doesn=CA=BCt warn about it. I have a byte-compiler hack for [3] that could be used to fix [2], and [1] is easily changed. But do we want to? I believe it helps the byte-compiler generate better code, but don=CA=BCt know what the actual effect is. Lars> We (the maintainers) usually touch up code before committing to a= dhere Lars> to our opinions of how the code should look, and hope that submit= ters Lars> pick up on it after a while (so that we don't have to keep on doi= ng it). Yes, but sometimes 'run your code through this tool first' encourages people to conform, and saves you time. Robert --=20