From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66706: [PATCH] Automatic elisp dialect insertion Date: Wed, 25 Oct 2023 20:48:46 +0800 Message-ID: <87cyx227gx.fsf@yahoo.com> References: <17C83052-7946-45DE-B660-DA7EB82001B0@gmail.com> <83sf61mb54.fsf@gnu.org> <98CD592C-0E82-4795-8168-2B5E597FF7A7@gmail.com> <8334xzlvy9.fsf@gnu.org> <87pm131pq6.fsf@yahoo.com> <87h6mf1k43.fsf@yahoo.com> Reply-To: Po Lu 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="37202"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 66706@debbugs.gnu.org, Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , stefankangas@gmail.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 25 14:51:06 2023 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 1qvdLl-0009Tm-LA for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Oct 2023 14:51:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvdLP-00043C-LP; Wed, 25 Oct 2023 08:50:51 -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 1qvdKG-0003oQ-G6 for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 08:49:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvdKG-00074p-79 for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 08:49:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qvdKk-0006wO-8M for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 08:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Oct 2023 12:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66706 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66706-submit@debbugs.gnu.org id=B66706.169823817826634 (code B ref 66706); Wed, 25 Oct 2023 12:50:02 +0000 Original-Received: (at 66706) by debbugs.gnu.org; 25 Oct 2023 12:49:38 +0000 Original-Received: from localhost ([127.0.0.1]:57654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvdKL-0006vV-HZ for submit@debbugs.gnu.org; Wed, 25 Oct 2023 08:49:37 -0400 Original-Received: from sonic315-20.consmr.mail.ne1.yahoo.com ([66.163.190.146]:34236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvdKJ-0006vE-7a for 66706@debbugs.gnu.org; Wed, 25 Oct 2023 08:49:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1698238139; bh=TdK4PbMkS2wLZKNIVOIzVpWJYlo4x3K+KrbjsujAVmg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=TWmgHJ7ds18nSh6CHOynW/cXE2ERQUk8JGEMOZjXKbQmRhFlXncD/yrIh8x2fIRObYxaN+vFy8UJEtA7bbLHmmzZa1JlNPRp02bOcrDsxLh7CBzfEEZ51idOphQMQCQc+6z+msemGdRhCJ94yFb1doROia7xekfo6Ap6jUbkx4BuQhDXKd9eS4fTZu7cdYMrJs1P95H/xLJKzOPlFeWDRQ/EfqLCwDEs5SMZPvBeiQ3UXoi01tY7hybSY1z0Rt9gLukncqsdxdh1SFS+NS6P66FC/jKr9cOlhqMWuc77H6yuH0gyAfo54mygPO5jOuDl4aK2UQhLFbvob7ph11ix9A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1698238139; bh=Ejo4sUl8d9Ymu31+3prKRoX1edjr24jQWvsx5w/yrKU=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=lScUeFGT3ex6xwV74EXfhnCqlZkcXdbg5Y98KUPQ70/UBrYS4FTiEf73EEJNYc0IFuXratyUAtJ3J8ED8eaicTuWdNIyqEoszw+u95zOJMXXNhaC6dGOaSn1R7/DifN9XRJbx6ZJ0+twGWWAFUuto/kNsPHd4zBExDB+HRG6wN2ooo+SXtV4Zt3JUhI+B6xaC9KwbnuKBk/XbaNcbxcIksALYbaecw+YEqwYDFRFWYMCfLKRB4Kd3Z3J+JCHsetW+7nEyPWbXtdvxV2DD6ZvSsx/tUX9Ue+aYhzm34OBIQxO9Haoqjt/DVqIZcpwVlr+5LQVHdoNSayYj7Md4autBw== X-YMail-OSG: p4zmpe8VM1lDXp9c1r7126sYlIvSEBHQH.ZAFarIWoklxl1OPzxcRDMrLjKF8ah rII6yveh62RfDKBxhEQOgi19mW_voIE2D8N7OdBqAeyPxc66uQUeQb6o0BFqbe73TRjeIe7uIULz I4QflpflTJQ7N9l2FXY70XDtBNbiUNkQBz8Inq0.sDN_M3IMkCHok_I5wTkuwpoNl9AFrFG6ic3T QuNQY5Cb5VYW08uHeVhJkgrUA_MUmL45pMVaHWKSkNEP2y5s_CW5v2E12OScJvMDHShe8vL5erk0 rwVQ39ClmEX2XouEY8DNrf_eNbE._8xQQi4ZrcPAHpS7A6upWVN1i7Nl5PjGXuAnomHH6iCVUqRI 4n7wi6wcTRCuCIxRbNqvkFWWvOa7ot5cuApSzoZOHzBK_EFJPkQ78OeG6mv87Nki_49tTzxiETBN n3r5jayx4.es_kqj65IYz3McRs2D4X2ODX.biqmX1WURe4BvG8Z5hZwdVvyybmCe8hTZvSsRpxaO 6Olvsms8MlkwxwxENThNJyJ2DWS56dplOXtBSEmoIpFdtxp8wCzPW8D16MkhjkIosMYtU3t.Bb6M NVePgdk0uV28qsItxcuJ7Mk4Y.LynLdsdZzKvHTe53dRpgkM1AiPeVd_9Hm7vWSgdV5MhGAMo9S8 MdqqF396IYmrrIAUMQXmkJ3o_5RyNIjift6up.3.iDLHZxWKP3N8QieRAxt83Qqe9t7XiFk7IE7n LU74hG0GRtrGTZRl64F_hjGfTY1xXpWgQGBPcoy2IjuPRPwuTpYqGiHWFRspg.HjPav7uTP24uqd 5Bkit9IGPv245aDwYJKdtx_qYFnHWi_DQsd4UhrvbM X-Sonic-MF: X-Sonic-ID: 9680b3b9-4bed-495a-af27-8863ff19dd60 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.ne1.yahoo.com with HTTP; Wed, 25 Oct 2023 12:48:59 +0000 Original-Received: by hermes--production-sg3-57f7997989-mcz6s (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 66b9b9bb63c6f98b22eba41ef3e40d6b; Wed, 25 Oct 2023 12:48:51 +0000 (UTC) In-Reply-To: (Stefan Monnier's message of "Wed, 25 Oct 2023 07:48:19 -0400") X-Mailer: WebService/1.1.21797 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273165 Archived-At: Stefan Monnier writes: > There's no patronizing, here. Just experience. It *is* a source of > confusion. I've seen enough such examples during my time in SX where > people give a valid answer, followed by comments like: > > "doesn't work here" --Mr.Foo > "I assumed you have lexical-binding enabled, try enabling it and see > if it works" --Mr.Bar OK, and why is it such a reply does not suffice? And why would any measure short of initializing lexical-binding to t eliminate these people, when so many have failed in the past? > I don't doubt that our users have the capacity to solve those problems. > It's just that my sadism is already satisfied by all the other problems > we foist on them. Then please inure yourself to such trifling matters of theirs. Those who are ignorant of lexical binding will run afoul of it once, learn their lesson, and from that time forward routinely check whether it is enabled. You are not obliged to guarantee that no person stumbles across this pitfall, and we are long past the juncture after which the law of diminishing returns begins to assert itself in full force. Such "safeguards" as those proposed here will irk the informed and the ignorant alike, while the latter, which is to say those who elect not to read the documentation, take notice of the prominently decorated mode line lighter, or heed advice given to them on forums such as StackExchange, will continue not to enable lexical binding where it is due. As they have always done. I am not the only person empty of the =C3=A9lan for lexical binding that serves as the impetus for these increasingly heavy-handed measures, incidentally. Eli seems to agree with me. > I myself get bitten by the different dialects every once in a while, > sometimes even copying code within Emacs itself (typically taking > a chunk of code from a buffer and running it inside `M-:` or `M-x > ielm`). How will the automatic insertion of lexical binding cookies in new files affect M-: or IELM, both of which already execute lexically bound code?