From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#30994: bug#45857: 28.0.50; Not possible to set package-user-dir in early-init.el Date: Thu, 14 Jan 2021 16:02:30 -0500 Message-ID: References: <83o8hrbbv6.fsf@gnu.org> <83h7njb6a5.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="15071"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: ola.x.nilsson@axis.com, 45857@debbugs.gnu.org, 30994@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 14 22:03:12 2021 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 1l09lu-0003l9-FM for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 22:03:10 +0100 Original-Received: from localhost ([::1]:56884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l09lt-0007RM-HF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 16:03:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l09lm-0007R9-45 for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 16:03:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56121) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l09ll-00035M-T6 for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 16:03:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l09ll-0006iU-PY for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 16:03:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jan 2021 21:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30994 X-GNU-PR-Package: emacs Original-Received: via spool by 30994-submit@debbugs.gnu.org id=B30994.161065816425787 (code B ref 30994); Thu, 14 Jan 2021 21:03:01 +0000 Original-Received: (at 30994) by debbugs.gnu.org; 14 Jan 2021 21:02:44 +0000 Original-Received: from localhost ([127.0.0.1]:39432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l09lT-0006hp-4G for submit@debbugs.gnu.org; Thu, 14 Jan 2021 16:02:44 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:15130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l09lP-0006hX-BW; Thu, 14 Jan 2021 16:02:41 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C6DDB440F73; Thu, 14 Jan 2021 16:02:33 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id F26DE440F6E; Thu, 14 Jan 2021 16:02:31 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1610658151; bh=vxr3jwmcEZ88hQNld0L4jPhTSyTfvSAU0v4oVh+te6I=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=n/4gD5cZoD6gLocTuEp5IcTY2vp8xr1IiiHzxG9dBIXp1eudtERRKSFNYv9iAKher GkWqzjz+FcbcK0jtbhxUDUZkJ1TmzK2irstcy2XjhH7yXbNwLTxs1TcVJHH6kllTLG GtWWb3ke6JZKL7felAd86NShOZMqK8CMCreUmgxeoxGaTsTcl9N8k3c9aj7RVLCwqP 1eN1FWSlb5teE3NaXTVc4hx7rI44M/v502HLEup4m+Q54HsedI5CApyoWsp6RMJ6ng PUJYsELnIrppa4Dtk7mc6QOxbBzM7PlIzedjLywf57nxG45lVjDvDwNxkphufvsMtN Z8ZgJ2mqtgmqQ== Original-Received: from alfajor (unknown [45.72.224.181]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id AE3B61201CC; Thu, 14 Jan 2021 16:02:31 -0500 (EST) In-Reply-To: <83h7njb6a5.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 14 Jan 2021 22:41:22 +0200") 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:197964 Archived-At: > Thanks, I actually meant to have that in the sources in some prominent > place. Ah, OK, I'll do that. >> Currently we solve this by calling `custom-reevaluate-setting` twice for >> every one of those variables. But it means that we silently override >> any change made to those variables from `early-init.el`. >> >> As noted, the only var whose default value needs to be (re)computed >> after loading `early-init.el` is `blink-cursor-mode`. In theory there >> could be more, but I think we should aim to reduce rather than increase >> those cases. > > I think relying on a small number of such variables is not > future-proof enough. This case is a living proof: we decided > something 2 years ago, but changes we did since then require us now to > change that decision, which means we risk bumping into issues which we > wanted to avoid back then. That's a general problem with kludgey > solutions. Indeed. Other than eliminate the `blink-cursor-mode` special case, I can't see how to make it less kludgey. > I think we need some new infrastructure that would support the two > init files that are loaded in different stages of startup. > > Basically, some variables can only be usefully initialized after some > part(s) of startup have happened already. One way of dealing with > this is to have the variables record this information (e.g., in a > plist of their symbol) that would allow us evaluate each variable only > once, at the earliest opportunity where the prerequisites are > fulfilled. In theory I would agree, but: - We don't have any such system to record dependencies, so we'd have to design and implement it. A minimal version would simply duplicate `customize-initialize-delayed` into two different options depending on the stage at which we should initialize it, but that'd still be pretty ad-hoc. - The only need for this complexity is `blink-cursor-mode` and it's only needed because we currently handle `blink-cursor-mode` incorrectly. So, I'd rather fix the bug and avoid the complexity. >> E.g. the current way `blink-cursor-mode` is defined means that if I >> start `emacs -Q -nw` and later create a GUI frame, that frame won't >> have a blinking cursor. I think this is a bug (tho I can see that >> some people may consider it a feature if they (like me) dislike >> blinking cursors ;-0) > I think that's a separate issue. Agreed, which is why the patch I propose keeps this for later. Stefan