From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: missing lexical-binding cookie warning when loading .el files Date: Sat, 4 May 2024 11:47:58 +0200 Message-ID: <2EAAC2FC-5709-4671-A903-60B34DE47BC8@gmail.com> References: <50E29988-D354-4D10-990F-31828DBE6411@gmail.com> <865xvuixnl.fsf@gnu.org> <5EC17E4B-5690-4393-B674-13F90AFD207D@gmail.com> <874jbeb5vu.fsf@yahoo.com> <87zft69pln.fsf@yahoo.com> <87v83u9olw.fsf@yahoo.com> <86seyyghgt.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10416"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Po Lu , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 04 11:48:29 2024 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 1s3C0L-0002XU-2n for ged-emacs-devel@m.gmane-mx.org; Sat, 04 May 2024 11:48:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3Bzw-00022x-Gg; Sat, 04 May 2024 05:48:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3Bzv-00022M-Ax for emacs-devel@gnu.org; Sat, 04 May 2024 05:48:03 -0400 Original-Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3Bzt-00048Y-N6; Sat, 04 May 2024 05:48:03 -0400 Original-Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2e1a02af4a5so5584041fa.2; Sat, 04 May 2024 02:48:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714816079; x=1715420879; darn=gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=e1iFDVNU9mrGouYxUJe+pkzcnv9rziKyxm993Zz7kAw=; b=PmRF90x+OST5cS77FgDm2XRWNkEn+hJXfhjHGC5wVsBbinaoH3yOm+GIq/zhCswtNt FP7um1DjLziIjUkO+X5hSo52ZgRHAWKrtjq/savG8g5zfv2fGujpZgyJUf2fm9fLpu2O rbQ4P3S2bb8Wm35kg+BaKOGBYHctysvN0nYxRSNklSZ4dFvhJVrSv7ai76qqpK5Oej8D E0+Ck9l+yed2RfqXxKKKi6Ex82JK0KWxnjoREpoMdaoJJOMo8BR+uRNfnwcacHtWjQtl Pwo6bTiVxSpgSgLkDvaOIrUF+Iss70eRc5x0XC1arRF7GgGi21FmnT0zPW807cTjDxu7 bnhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714816079; x=1715420879; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=e1iFDVNU9mrGouYxUJe+pkzcnv9rziKyxm993Zz7kAw=; b=jb5G3IyriuNTW74UPHAiENulG77wA2ZUo+P+Pj3CHR/9Pv0EP4jGpQYwgXRb/yzOLx +lxkyA1vVGT7owryjGT0kMgAzc+6TQ9K2wqMKbRAMGj/jyj86cwg8tb2j3pX2Fb+8KL1 YcXY2ncgIMV6ycUlLizMV+EUIJlnKEqseUj4FBUT8M/YlOYgITt6Piyaufd/XB7YnESB 4Fx/6vWp2Makg/8kNt9zPEtMG6pcQqKTFlZe1CGAnjfKiAqAgUNujZHI3L4pwxkk930z CSNqLFgtHXBryv5QAus7H08YCcgUDP3KNsdxIsX80wC/OfUAs+E7W4+v8tWUY0vlSG+T MY/Q== X-Forwarded-Encrypted: i=1; AJvYcCUeeIOEvNT4PUYOjwlTFJHYIO1MkZWB/TrczGK27xZ26EGR5V2n1NVZyhL74eASAf7P+ZgffTnDfqRsnH7Zh3obK5zI X-Gm-Message-State: AOJu0YwIVHAWCgzIM02qarZkJDLZBHPjWw9feRKbHMJBQHdEGh4IOvFh qZjzqZzUDAcnRpz6UqToimgEfhzEvio1jrW/rnu0AG+rfPGH1HItHrKQzA== X-Google-Smtp-Source: AGHT+IHutCHw7i/+zj1XY2cUjMuAE86DwTf27jMyRo2/ieNSTcO/aZ5kQWLevoCkk619XvSAcsGBlA== X-Received: by 2002:a19:5219:0:b0:51c:b8ec:c46f with SMTP id m25-20020a195219000000b0051cb8ecc46fmr3107719lfb.22.1714816079170; Sat, 04 May 2024 02:47:59 -0700 (PDT) Original-Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id n6-20020ac242c6000000b0051b402a3809sm833778lfl.307.2024.05.04.02.47.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 May 2024 02:47:58 -0700 (PDT) In-Reply-To: <86seyyghgt.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.120.0.1.15) Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=mattias.engdegard@gmail.com; helo=mail-lj1-x22a.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.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:318734 Archived-At: 4 maj 2024 kl. 09.32 skrev Eli Zaretskii : > And abbrev_defs. >=20 > Basically, anything below user-emacs-directory, I think? Thanks for raising this concern. For now I settled on warning about *.el = and .emacs only, on the grounds that it would eliminate at least some of = the false positives. I do think it is appropriate to warn about the user init files because = they tend to gather a lot of actual Lisp code, not just data. (New = Emacs-generated init files should have a lexical cookie.) Not sure how common pure data-as-code files are in reality; most Lisp = data files aren't evaluated. Those that are are probably just sequences = of function calls with constant arguments and thus rarely affected by = lexical-binding. Now if data-as-code files turn out to be just too common and detecting = them systematically too difficult, then I'd rather get rid of the = warning altogether; it's not important enough to build an elaborate = suppression system for, much less have endless discussions about. It's quite common to see other actual code files under ~/.emacs.d/, but = maybe they are not worth warning about if it means too many false = positives? Some options: A. Add a suppression system. We could add the variable = `lisp-source-load-missing-lexical-binding-declaration-warning-suppression-= regexp-list`. B. Strong-arm package maintainers into writing a lexical cookie when = saving data-as-code. C. Don't warn about ~/.emacs.d/**/*.el, except init.el. Z. Remove the warning.