From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.devel Subject: Re: 2a73673 Change how thread-first/thread-last indent the first argument Date: Tue, 05 Oct 2021 01:58:33 -0500 Message-ID: <87ee90vtye.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36350"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 05 08:59:39 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 1mXeQN-0009HV-3C for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Oct 2021 08:59:39 +0200 Original-Received: from localhost ([::1]:42414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXeQM-00042T-4X for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Oct 2021 02:59:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXePR-0002T9-2L for emacs-devel@gnu.org; Tue, 05 Oct 2021 02:58:41 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:50876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXePP-0007Nx-Iv for emacs-devel@gnu.org; Tue, 05 Oct 2021 02:58:40 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mXePN-00082d-V9 for emacs-devel@gnu.org; Tue, 05 Oct 2021 08:58:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) BAYES_00=-1.9, FAKE_REPLY_C=1.486, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:276300 Archived-At: Hi Lars, et al, In this commit, you changed the thread-last macro's indentation from (indent 1) to (indent 0). Could this be reverted, please? This change has two drawbacks: 1. The threaded form is no longer indented differently from the other forms, so it no longer stands out. In some code, this makes it harder to read. For example, in deffy.el (an example application in the taxy.el repo), this form is now much harder to read: (thread-last (make-fn :name "Deffy" :description (format "Definitions in %s:" (if files (string-join (mapcar #'file-relative-name files) ", ") (file-name-nondirectory (directory-file-name (project-root project))))) :take (taxy-make-take-function keys deffy-keys)) (taxy-fill forms) (taxy-sort* #'string< #'taxy-name) (taxy-sort #'string< #'def-name)) Whereas before, it looked like this: (thread-last (make-fn :name "Deffy" :description (format "Definitions in %s:" (if files (string-join (mapcar #'file-relative-name files) ", ") (file-name-nondirectory (directory-file-name (project-root project))))) :take (taxy-make-take-function keys deffy-keys)) (taxy-fill forms) (taxy-sort* #'string< #'taxy-name) (taxy-sort #'string< #'def-name)) Without the extra indentation for the first form, it's hard to see where the threaded form ends and the threaded-into forms begin. 2. The change in indentation results in "indentation churn" in every downstream package that uses thread-last or thread-first. For example, I use aggressive-indent-mode when editing Elisp packages, to ensure that they're always indented properly, and now all of these forms get reindented, and it makes extra diffs to scrutinize when committing other changes in Magit. Thanks for your consideration. Adam