From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.bugs Subject: bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files Date: Sat, 12 Oct 2024 08:22:45 -0700 Message-ID: <3BD8C402-58DE-429C-8C90-744471B95007@gnu.org> References: <86frpdzby8.fsf@gnu.org> <86wmidycat.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) 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="16472"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73609@debbugs.gnu.org, Al Haji-Ali To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 12 17:24:10 2024 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 1szdyS-00049K-G7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Oct 2024 17:24:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szdy9-0007eW-R9; Sat, 12 Oct 2024 11:23:49 -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 1szdy7-0007e8-TB for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2024 11:23:47 -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 1szdy7-0000YN-KW for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2024 11:23:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:Date:In-Reply-To:From:Mime-Version:To:Subject; bh=yhUoMezbDNOarPSKJ1bYgmPPxaBUTttbpgVRDF42Gko=; b=tWkjC44le2EclaMgY2CAcyEPH05TWw4e4D2o/YQiVLpvCTLppNzETRN+3Mvil8J8wLWyd0b2HI8Y3Rq7bhoxwQ+T9GH2+dzzA0MpXMaQ7bzzZ5E/RpzkYaD9N+hxRyf4iPxPUNoZ/MdrzdsgAJO4a2RIyufwpWUHaiERyYOPeUdbAfRddtUTtsi19w64vs9Zn9iDGd1JmAkItOgedHfSgBTfGccmagYePFN1R/pDyq8ZDPOmG+9IOeW4mZqL5b8B/hFA5f36i8sOXNx0A//2dyWAJ728/5ASSJZw6DD5Hb3QXkweb+ZjHTbWSpC8zKmaRYndGqAhDSCcZtehE4kepQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1szdyL-0006P5-KB for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2024 11:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: John Wiegley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Oct 2024 15:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73609 X-GNU-PR-Package: emacs Original-Received: via spool by 73609-submit@debbugs.gnu.org id=B73609.172874662124537 (code B ref 73609); Sat, 12 Oct 2024 15:24:01 +0000 Original-Received: (at 73609) by debbugs.gnu.org; 12 Oct 2024 15:23:41 +0000 Original-Received: from localhost ([127.0.0.1]:48467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szdy1-0006Nc-08 for submit@debbugs.gnu.org; Sat, 12 Oct 2024 11:23:41 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szdxz-0006NG-C4 for 73609@debbugs.gnu.org; Sat, 12 Oct 2024 11:23:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1szdxf-0000V6-Ox; Sat, 12 Oct 2024 11:23:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=To:References:Date:In-Reply-To:From:Subject: Mime-Version; bh=yhUoMezbDNOarPSKJ1bYgmPPxaBUTttbpgVRDF42Gko=; b=JAceI2azLVCt zadJMZ63ACH57AjhRFcXWOspKg8rj9CgRrW30/8C90cUSi4K0PAS5ANQN3rNBatKa+z6NjL2NM6zJ I3XjlWKjA/2KByvVCVu21/pSOdSXY2sD0+qYzH9MWLljGpphnOgbJW+KMW6VhkyaZGl28nEOQ3z/K YpX3jyo2rrI7NzhycVr5u6m0Tf3GnEF0G4Bjpsi/8PU3MV9NRvHYtr14uh0vGh7Exi+gQBHF8BRxW hhi8cDWk8cMNh2Yvj0zyPjN18Gf12M6TQ5b+tn4J9pVk0DEyQtPF6guTRRO+q4TRw/L8L/46x6P6I ruhOL94Urqxg6eYW5q5AyQ==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdeguddgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurheptggguffhjgffvefgkfhfvffosehtqhhmtdhhtdej necuhfhrohhmpeflohhhnhcuhghivghglhgvhicuoehjohhhnhifsehgnhhurdhorhhgqe enucggtffrrghtthgvrhhnpefgleekgeejkeffvdefudfgueehhfffueegveefgffghfet tdegveeihfeifeffieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehjohhhnhifodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdei keejkedtleeggedqudejjeehfeekudeiqdhjohhhnhifpeepghhnuhdrohhrghesnhgvfi grrhhtihhsrghnshdrtghomhdpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphho uhhtpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtoheprggsughord hhrghjihdrrghlihesghhmrghilhdrtghomhdprhgtphhtthhopeejfeeitdelseguvggs sghughhsrdhgnhhurd X-ME-Proxy: Feedback-ID: ib64945b7:Fastmail In-Reply-To: <86wmidycat.fsf@gnu.org> X-Mailer: Apple Mail (2.3776.700.51) 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:293452 Archived-At: I don=E2=80=99t fully understand. The purpose of of `:custom (X Y)` is = exactly to customize X to the value Y using the value setting functions = of the customization framework. Is the user expecting that byte-compilation would cause the value to be = set without loading use-package? I need a bit more clarity. Also, a much simpler approach to assessing = what use-package is =E2=80=9Cdoing=E2=80=9D is to expand the macro, as = that should make the intended behavior obvious. John > On Oct 12, 2024, at 1:07=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: Al Haji-Ali >> Cc: 73609@debbugs.gnu.org >> Date: Fri, 11 Oct 2024 23:25:08 +0100 >>=20 >>=20 >>=20 >>> Can you try this with the latest emacs-30 branch of the Emacs Git >>> repository? I believe some changes were done to use-package there, >>> and they might fix your problem as well. >>=20 >> I just tried it on the main branch (version 31.0.50) and saw the same = behaviour. I also checked the part of the code that I think is the = reason and it remains the same. >>=20 >> Here's how I am able to reproduce the issue: >>=20 >> --8<---------------cut here---------------start------------->8--- >> ;;; 1. Run emacs -Q >> ;;; 2. Define the following function >>=20 >> (defun bug-73609 (&optional setup) >> (let ((filename (file-name-concat temporary-file-directory = "temp.el"))) >> (if setup >> (progn (write-region "(use-package = org\n:custom\n(org-log-reschedule 'note))" >> nil filename) >> (require 'use-package) >> (byte-compile-file filename)) >> (load (concat filename "c")) >> (message "START value is %S, use-package is%s loaded" >> org-log-reschedule >> (if (featurep 'use-package) >> "" >> " NOT")) >> (setq org-log-reschedule t) >> (message "BEFORE value is %S" org-log-reschedule) >> (define-advice enable-theme (:before (theme) enable-theme@debug) >> (message "Loading theme %S" theme)) >> (require 'use-package) >> (message "AFTER value is %S" org-log-reschedule)))) >>=20 >> ;;; 3. Call >> (bug-73609 t) >>=20 >> ;;; 4. Restart `emacs -Q` and redefine the function above >> ;;; 5. Run >> (bug-73609) >>=20 >> ;; The output is >> ; START value is note, use-package is NOT loaded >> ; BEFORE value is t >> ; Loading theme use-package >> ; Loading theme user >> ; AFTER value is note >> --8<---------------cut here---------------end--------------->8--- >>=20 >>=20 >> I expect the final line to be >>=20 >> ; AFTER value is t >>=20 >> as I do not expect that loading `use-package` would change the value = of the variable `org-log-reschedule`. >=20 > John, any suggestions or ideas?