From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#44854: [PATCH] Add lexical-binding cookie to autoload files Date: Wed, 25 Nov 2020 16:07:19 -0500 Message-ID: References: <837dqatsjd.fsf@gnu.org> <83360ytqk3.fsf@gnu.org> <83wny9scmb.fsf@gnu.org> <83eekhs5sj.fsf@gnu.org> <83a6v5s3e3.fsf@gnu.org> <837dq9s12u.fsf@gnu.org> <83wny9qj0j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17628"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44854@debbugs.gnu.org To: Eli Zaretskii , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 25 22:08:31 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ki21f-0004T4-03 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Nov 2020 22:08:31 +0100 Original-Received: from localhost ([::1]:49502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ki21e-0001Xz-0S for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Nov 2020 16:08:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ki21D-00017P-7v for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2020 16:08:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53995) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ki21D-0007D6-0V for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2020 16:08:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ki21C-00010Q-SG for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2020 16:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Nov 2020 21:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44854 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 44854-submit@debbugs.gnu.org id=B44854.16063384483820 (code B ref 44854); Wed, 25 Nov 2020 21:08:02 +0000 Original-Received: (at 44854) by debbugs.gnu.org; 25 Nov 2020 21:07:28 +0000 Original-Received: from localhost ([127.0.0.1]:37307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ki20d-0000zW-Rm for submit@debbugs.gnu.org; Wed, 25 Nov 2020 16:07:28 -0500 Original-Received: from mail-ej1-f53.google.com ([209.85.218.53]:43504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ki20c-0000zD-2P for 44854@debbugs.gnu.org; Wed, 25 Nov 2020 16:07:26 -0500 Original-Received: by mail-ej1-f53.google.com with SMTP id k27so4959149ejs.10 for <44854@debbugs.gnu.org>; Wed, 25 Nov 2020 13:07:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=G1Ci7hkkmmldzApxOVYXMVGuVZk4qDUHd4ZQncX6o2w=; b=kPF/uRJnDdRmNjF5qlw2oJOnuQ3T1/JDoXMOb7Ungpu9co9eCThpoe8EapOBgpRr3n wa8caeogURjG/zqzBLUTmAU1O+3dYmpONELoktjdXzhxJhY94J/PMA3+Jbcfu8LDkri4 8/YBSBrRoXSA1KttZbtUqRFtUDNCoQzYzXPOfB1HLMY9v6XIcplUSFkpvwwBdCtqm7gH 6kMkeKWjRbyhaz6rk2/DlqoMdd4E2WlFRyJI+f7VawYKpBAW0cupuZEfbkmNYFA2JkpK ljFq6sniJyT/D2bJc/kVsphuColD6p0GrFZ8E2f0kD4riuYKn+ZDevCSYpHSZW25gKpp IGLA== X-Gm-Message-State: AOAM531CSxr5F6kPsQ+k7NxSpPsD0wBOOMCO4sAB9+pgSMVRW2dsIyE5 TmlGtlKTzHOfPmLPqDh+KJTSxKVUYBmUwkI2o9L03SV5 X-Google-Smtp-Source: ABdhPJwC5I4l1fo59Nvz6a56etQb/E0WWvItm1Wlu8iCWcCF9pCUwN5siSKAFTj6VQagSfny/KtK2ReH8f+hMe60eLU= X-Received: by 2002:a17:906:1918:: with SMTP id a24mr4738964eje.432.1606338440558; Wed, 25 Nov 2020 13:07:20 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 25 Nov 2020 16:07:20 -0500 In-Reply-To: <83wny9qj0j.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194247 Archived-At: Eli Zaretskii writes: >> I was not discussing specifically `loaddefs.el`. >> The reason to change it in `loaddefs.el` now rather than later is >> because I can't see any benefit to doing it later. > > That's not a reason good enough in my book, sorry. FWIW, I have been working towards this crude metric: find -iname "*.el" -exec egrep -L "lexical-binding: *t" {} \; | wc -l This gives some indicator for how ready we are to "flip the switch". An even better metric would of course be possible, for example by counting SLOC or making it ignore files with side-effect free statements. But it hasn't seemed worth the trouble. Also, the above metric can easily be converted to a TODO-list: find -iname "*.el" -exec egrep -L "lexical-binding: *t" {} \; | sort This is how I've been using it. I've been looking to make the number of files go down by adding the cookie to even insignificant files, as they stand in the way of seeing the files that actually need work.[1] May I ask why you are against it? If we agree that it should make no difference one way or the other, why not just do it? Footnotes: [1] This also doubles as a hack to make this task more fun: there is actual science saying that human beings enjoy seeing numbers increase or go down. Lars has been doing something similar with triaging bugs. :-) https://lars.ingebrigtsen.no/2020/10/26/5x10/