From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#57003: 28.1.90; Can local variables be loaded before loading major mode? Date: Mon, 08 Aug 2022 13:28:49 +0200 Message-ID: <87bksv0ya6.fsf@gnus.org> References: <87czdeoqy7.fsf@localhost> <87v8r54j3h.fsf@gnus.org> <875yj5xzou.fsf@localhost> <875yj443zy.fsf@gnus.org> <874jyo6vd6.fsf@localhost> <87k07k18ro.fsf@gnus.org> <871qts6tzy.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39007"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 57003@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 08 13:30:47 2022 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 1oL0y7-0009z1-2v for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Aug 2022 13:30:47 +0200 Original-Received: from localhost ([::1]:56822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oL0y5-0003zf-8w for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Aug 2022 07:30:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oL0xP-0003zF-2D for bug-gnu-emacs@gnu.org; Mon, 08 Aug 2022 07:30:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49617) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oL0xO-0003Kb-Fi for bug-gnu-emacs@gnu.org; Mon, 08 Aug 2022 07:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oL0xO-0002rv-7r for bug-gnu-emacs@gnu.org; Mon, 08 Aug 2022 07:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Aug 2022 11:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57003 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57003-submit@debbugs.gnu.org id=B57003.165995814310932 (code B ref 57003); Mon, 08 Aug 2022 11:30:02 +0000 Original-Received: (at 57003) by debbugs.gnu.org; 8 Aug 2022 11:29:03 +0000 Original-Received: from localhost ([127.0.0.1]:39366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oL0wR-0002qG-5k for submit@debbugs.gnu.org; Mon, 08 Aug 2022 07:29:03 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:39000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oL0wN-0002pk-PS for 57003@debbugs.gnu.org; Mon, 08 Aug 2022 07:29:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=D33FBnyFdCL4jA0lk7d6yVmcx5Ho8V5wDblS6XC02JE=; b=m5ksjamYvkQgqZhtHDgeH+NRZQ mteZ39Qz7ioTDMpczd7gLUPvHYl2ky79Tt3lJoMeBvsZIOvccoBNQkhCcbwA3dvcpPLFgWv9KQb/z woBtyDyVf22vrsM9BoaxAw+5SyG9fx2HwiHUbufC9qXe83r2uS7UxirA+pszajV4ABn0=; Original-Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oL0wE-0008VF-3b; Mon, 08 Aug 2022 13:28:53 +0200 In-Reply-To: <871qts6tzy.fsf@localhost> (Ihor Radchenko's message of "Sun, 07 Aug 2022 21:52:33 +0800") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEX0bKf2R5HqQojO tp708uc/QEbDs13EVm7///+cm4WMAAAAAWJLR0QIht6VegAAAAd0SU1FB+YICAsVIY6EKLoAAAGd SURBVDjLddNRjuMgDADQRHOBoTeY+dnflUzIAezJHCDjcAAa8jtSm3L9NZQ0kHaRqkq82gbXNI06 KVkAoJGn2ZIs45VqlDp9JDB6YNdxCSpDx7eZdQQj0LQbOGbL/LNFlDDdVh5fRVhJVcLHA8LK03Oq RWBmu0H7ONXMLBHxWIdUssnyuWRoNwDZv2XIqXYIG7RFSyKseK/hyxogJ2Lk7nxsIqCxltYhnapK RSDX7u/drUDrNfZjg78FdD8bVDU07VCmMhf4ykBN9deOFAFBQFWpRvq+yiZmaAsYInzpI0wazzGV JlRVSyygll8/AXGcuVT9DlsqHW8iS8MhQvfr5Aj7sz5G9M45TVKIoADjBVIqyQTFBY2M7hlfgPch uNSna4Y8V362IaanWKKCJViMMFCG/D5CkKmVi/TLhcCU4IabJAd2M4Av4JIKS8P84ipIV6DQ2cVh Ce9pH8fOei0PYr9HApxHaaWM27IfN0HHFtJDO0TAmgCNX/YmCmA/mimC9301JU0Iv+ENqA8hFPBY p/z9BOol/Cng8z8R/wC8cNOST/ttAgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wOC0wOFQxMToy MTozMiswMDowMLZZ0X4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDgtMDhUMTE6MjE6MzIrMDA6 MDDHBGnCAAAAAElFTkSuQmCC X-Now-Playing: Et Cetera's _Deutsche Elektronische Music 4 (2)_: "Mellodrama 2a" 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:239107 Archived-At: Ihor Radchenko writes: > 1. Having a need to do the eval is not expected by users. > 2. Allowing eval is not safe compared to setting variables. Your > suggestion about `safe-local-eval-forms' will not work well because > even in your example it is not just about running > (org-startup-folded-mode); org-startup-folded has 7 allowed values - > marking each (org-startup-folded-mode value) form as safe sounds > awkward. I'd forgotten that you can just enable minor modes without any of that. You can just say ((org-mode . ((mode . org-startup-folded-mode)))) Or of there are different types: ((org-mode . ((org-startup-type . foo) (mode . org-startup-folded-mode)))) > 3. org-startup-folded is just an example. We have numerous variables > like this. I can recall at least several dozens without looking into > source code. Creating a minor mode for each and every single possible > variable like this is not maintainable. We will certainly forget > creating dedicated modes when adding similar variables in future. There's dozens of variables that have to be set before `org-mode' is called? That sounds like an fragile design.