From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#57003: 28.1.90; Can local variables be loaded before loading major mode? Date: Mon, 08 Aug 2022 20:30:41 +0800 Message-ID: <87edxqzzm6.fsf@localhost> 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> <87bksv0ya6.fsf@gnus.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="31400"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57003@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 08 14:42:15 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 1oL25G-00082T-Ip for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Aug 2022 14:42:14 +0200 Original-Received: from localhost ([::1]:58988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oL25F-0006fK-Dv for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Aug 2022 08:42:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oL1tS-0004ne-FM for bug-gnu-emacs@gnu.org; Mon, 08 Aug 2022 08:30:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49655) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oL1tS-0005D8-5b for bug-gnu-emacs@gnu.org; Mon, 08 Aug 2022 08:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oL1tS-0000DA-19 for bug-gnu-emacs@gnu.org; Mon, 08 Aug 2022 08:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Aug 2022 12:30:01 +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.1659961786768 (code B ref 57003); Mon, 08 Aug 2022 12:30:01 +0000 Original-Received: (at 57003) by debbugs.gnu.org; 8 Aug 2022 12:29:46 +0000 Original-Received: from localhost ([127.0.0.1]:39404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oL1tC-0000CK-Hl for submit@debbugs.gnu.org; Mon, 08 Aug 2022 08:29:46 -0400 Original-Received: from mail-pj1-f42.google.com ([209.85.216.42]:38436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oL1tB-0000C8-5S for 57003@debbugs.gnu.org; Mon, 08 Aug 2022 08:29:45 -0400 Original-Received: by mail-pj1-f42.google.com with SMTP id q9-20020a17090a2dc900b001f58bcaca95so7602292pjm.3 for <57003@debbugs.gnu.org>; Mon, 08 Aug 2022 05:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=dbDqOodPCp3I0kOHFF9LIaxPExthsjL2zEdc6cebQ0U=; b=f4KKUstKKodEhylwkaB+je8JhHHTTYU+oS225er6N5iG+M64v2TNeFyVcsU7c1UhLf ydaSvBr2KPS8CcBUc+P/DKY39q4qrRn0XN8rIOowskxO+38WelQu77FYILwBzy8MVTmo o21UTWv2MmZ08LUtcofXOhetkM2UJx9xbznzNOCJ1DelJ0pVMkztfFOQs1yF3jgSpDc0 oa4I05ZA8DeQAouufF4wDfRFhikJO9YABppoGn4qGwrevU7G1ct3VLwHci6VRN7vMWls vcIOFowNzq+CAkAmHGgCypaH6fjMborAmu6lC98giBE41mWd+JQDoIDVUwY+I8Sq41aE v4lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=dbDqOodPCp3I0kOHFF9LIaxPExthsjL2zEdc6cebQ0U=; b=dhv+IMgiTrpUasDYfFmaPXdyadw7Cn3foiqDgO3lDPAOORlFwT+uohC8du/rVt+etO dDSq6EFZzb31p1FwMb+en2HuAFy1n/aOOAMtxh8Z2UuofsuEGwn0SmPjvU9rn2vAcsL0 urz2PfingxuykI96MMmGILHyLsKlG2aAFvrY17AigQyhz2cYkIXPdqy9pLdpqDniKsS0 nzokbTnGoMObqePBfP++Ve4cjSYY/qermyjLBZPgZWj2NHfbcB4xkpXhBJGfWvFkGtsn r42pSKwaSDe1AEWJcdkJEfTCaK4cZBOosicAc+dLBiamnOQ7agH3zEiDMGjYS5NmWhRU 2SSw== X-Gm-Message-State: ACgBeo3IQfmGK+jY/GGxJsAlqEE6GTIESDT5gbfj74RLQvKiS0HhWpjw 4hj8NJ6Xr0B9AX1rbgp5AbU= X-Google-Smtp-Source: AA6agR6IyFflOosi9JyR/ECItW8S8k7K4xYSeUaH+L0agzk07GnGS7S+vw/Wzp+I6eIBCGt5VQnHAA== X-Received: by 2002:a17:902:6ac5:b0:16d:23c9:4fbd with SMTP id i5-20020a1709026ac500b0016d23c94fbdmr18242036plt.143.1659961779158; Mon, 08 Aug 2022 05:29:39 -0700 (PDT) Original-Received: from localhost ([2409:8a70:2b5:4040:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id d18-20020a170902f15200b0016c40f8cb58sm8573906plb.81.2022.08.08.05.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Aug 2022 05:29:38 -0700 (PDT) In-Reply-To: <87bksv0ya6.fsf@gnus.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:239110 Archived-At: Lars Ingebrigtsen writes: >> 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. This is not strictly necessary to set them before the whole Org is loaded. In some cases, only part of Org has to be reloaded: font-locking setup; parser; folding state; etc (which is a normal scenario when done interactively). However, such reloading adds up to file opening time. It is much faster to set everything once and load Org compared to (1) load org; (2) load variable and reload org; (3) load another variable and reload org; and so on. + creating a dedicated minor mode for every variable is not maintainable. Having Emacs support early setting would be much easier. Best, Ihor