From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#66706: [PATCH] Automatic elisp dialect insertion Date: Fri, 27 Oct 2023 09:24:19 +0200 Message-ID: <87fs1wil3w.fsf@web.de> References: <17C83052-7946-45DE-B660-DA7EB82001B0@gmail.com> <83sf61mb54.fsf@gnu.org> <98CD592C-0E82-4795-8168-2B5E597FF7A7@gmail.com> <8334xzlvy9.fsf@gnu.org> <83v8avjuv8.fsf@gnu.org> <87edhicjgi.fsf@web.de> <83zg05how1.fsf@gnu.org> <87pm10sqnw.fsf@web.de> <8334xwfuo1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11969"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: dmitry@gutov.dev, mattias.engdegard@gmail.com, 66706@debbugs.gnu.org, monnier@iro.umontreal.ca, stefankangas@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 27 09:25:52 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 1qwHE7-0002rU-W0 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Oct 2023 09:25:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwHDs-0007iQ-75; Fri, 27 Oct 2023 03:25:36 -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 1qwHDo-0007gN-OH for bug-gnu-emacs@gnu.org; Fri, 27 Oct 2023 03:25:34 -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 1qwHDn-0004H7-CM for bug-gnu-emacs@gnu.org; Fri, 27 Oct 2023 03:25:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qwHEI-0005dv-6U for bug-gnu-emacs@gnu.org; Fri, 27 Oct 2023 03:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Oct 2023 07:26: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.169839150221602 (code B ref 66706); Fri, 27 Oct 2023 07:26:02 +0000 Original-Received: (at 66706) by debbugs.gnu.org; 27 Oct 2023 07:25:02 +0000 Original-Received: from localhost ([127.0.0.1]:34998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwHDK-0005cL-D4 for submit@debbugs.gnu.org; Fri, 27 Oct 2023 03:25:02 -0400 Original-Received: from mout.web.de ([217.72.192.78]:43457) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwHDF-0005bh-Bj for 66706@debbugs.gnu.org; Fri, 27 Oct 2023 03:25:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1698391451; x=1698996251; i=michael_heerdegen@web.de; bh=Of4vabf3+RawrT2Qwsyf+7XVHuR6TVyqV1qevTtSLBc=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=dbuDJiHNifuANv6E/DAuD9Exaza2/tVojNgkDrN3Ho2Y+JaSz8hs8/cNfTCr15xX aZ1sGI1HdjCdr4QoOu0BolUP5zopuwPzkBEJxvU6BHVk0nNYRd4ls1SMeCz7hPTgU +QgoUyrfwo39AJaY4M+xoqSRvZBQPgY7toX24OhB3/Ay8wQgc8FOl6WiCWqURPqBc aS/pzb2/OOIS3n5po7qjoDVYLnx/JUnDZkBr8G7uaKTYJO09p6QtXe+pEIrVAug8D s716yVk46NukhE4t7c9XxB0d83/Atb4CKWwu4QNIoyZnJWMufEg4UHllkfB+lfD94 x2WKxXdS+/mk6Nwa4g== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([84.59.210.159]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MjxeE-1rKaP531iK-00kj1Y; Fri, 27 Oct 2023 09:24:11 +0200 In-Reply-To: <8334xwfuo1.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 27 Oct 2023 09:26:06 +0300") X-Provags-ID: V03:K1:q43qW+Ps4mA9lN1Xc6tmOgHR8Mcne4/SpVeO2rOHh6ZKA0gl3JG cFph4z2+dp2FtIpjFWr2WD2E+BcgriCeVl4YhtAcx58GD+cU4H47zRZX2DQXtn4u6ydTJUd 8sYBWynKYU1aTCR7E/EYN8+VV8vvc5Ofd5N+9ymBvmlNyHrRcHSAtS05GfNFWZa3cLEwYIO fz6Yev4WQt0r5saJXijlw== UI-OutboundReport: notjunk:1;M01:P0:HTrVZacZ7f0=;VfGfpQsnrDbI5K+iYoHAeICee3T 0CNRKA1aovT01MUN1GmPb2U4GSk7ctZkNryKlZgjhBa//kkhYiIwrGp35RD2uTCk6YcwViMeG Lym0b2rSn7MIqpXQbOXmrsNYnoAGDvD9M+r2AuNdP+4LUgTB66DkDcjPWYUVO1GlYx+qsXdZH zpBbRAKChted/xZ5EWlJWadJ7FSH1miQpLC5sABAbni/DeUsuCgoL82rH3FYJ89RGJTTavTid 6x/b37qnHqAHQ5yMpXRkkZ/fZk2HidosNb2dA/dYB7QL7QmbZNHlpSssbDCU7smUVcgXUBl5k E4iu1yOei2S/Nk1XA6Wbhok+g4FcrsrByNljN2smrnDQNZja5W3AVrscb2KzZBJkmBDBtfbho 9WouSfmzRjuX2qtyNM5laXde8eZ8DKGbgA2h3Wrt7njxYpuWKmAjCDzCACDM0SLOgYtcx6I/w rHh2qG11xfYNQlOIhk9HV6tXagziMDhS2nbdiRID0lczxdUrpvur7Aa3K4YfsJ5xCj3cA8byG XscOTxE88BsKfbDBVrrHCX+lEwlTYVBI5nDZxHhSaAJ6/Mk8ttm+2bYMqkClfTk/P/3/4x7gK 9YCffcGZ1kNnApUsV0iWncmPCWUkAssAuoaun323DNzb3sGA8xKlpgbk+KJ16ZDx+rRWTxPuW Eed2HbqTnBQixdqNdaWiVePdAlwnJRKD7/wgwJsxUsqsFaVkHVqVELM2hjhS4UmH78uA/Lsc7 gvyHJBVJIgAcNhq++4LSMIYjC7rYDq+UjU7Q0mm8Sd+dY5h+SVbIzdCyUeblBey40ur909cl 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:273344 Archived-At: Eli Zaretskii writes: > How many of init files do indeed require dynamic binding? And why? It was the default, and when I read what others mention ("look at the code is posted here and there"), I guess there are a lot. And exactly those users will have problems with the upgrade. If you look at the code that is posted in emacs-help, you see that some people use a coding style that heavily depends on dynamical binding. > > If a new Emacs version refuses to start because something in the init > files goes against some new Emacs feature, we have --debug-init and > other facilities to debug and fix those. I don't think that a debugger is that helpful for rewriting that stuff. > Why should lexical-binding be considered different from any other > backward-incompatible change that we sometimes do? As I said: it's unnecessary to break Emacs startup when we can just be nice and use the other dialect. We can still force users to rewrite their init file in nicer ways. > In any case, how will injecting the cookie help those users, exactly? > If people who write init files don't understand the implications of > lexical-binding, their Emacs will fail to start, something that you > think is a catastrophe. And if they do understand it, their init > files are already compatible with lexical-binding. If Emacs starts and it doesn't find a lexical-binding cookie in the init file, it might be written in the dynamically binding dialect. I suggest that Emacs then prompts the user: hey, your init file lacks that cookie, if you upgraded your Emacs recently, it is likely that I should interpret it as dynamically binding, although lexical-binding is the new default. If you just installed Emacs, you should use "lexical-binding". Use lexical binding for now (y-or-n)? And then you would be instructed to add a cookie for the init file. With a hint where to look up the relevant information about the two dialects. > Your point seems to be incompatible with our plan, which is to turn on > lexical-binding by default at some point. We don't want to have a > schism of two separate flavors of Lisp, we want only one. The current > situation is a transitional period, not the ideal. You seem to be > suggesting that we should keep this situation forever, and that is not > what we decided, AFAIU. No, I don't think you fully understand. I only want to help the users with the transition. Nice programs do that, they help you a bit with necessary changes to your config after major changes. I suggest this treatment only for the init file. And also only for a transitional period (I already said that though...). Michael.