From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files Date: Sat, 12 Oct 2024 11:07:22 +0300 Message-ID: <86wmidycat.fsf@gnu.org> References: <86frpdzby8.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11205"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73609@debbugs.gnu.org To: Al Haji-Ali , John Wiegley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 12 10:08:25 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 1szXAl-0002jh-Aq for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Oct 2024 10:08:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szXAF-0000Xz-CK; Sat, 12 Oct 2024 04:07:51 -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 1szXAD-0000X7-BL for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2024 04:07:49 -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 1szXAD-00077q-2v for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2024 04:07:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=ERRLp8GuGGlU6RYMtADMCuYGE8QEXGz3eAFulua60BU=; b=vDH8TZdeEeH7dLh746iF8mLW2s086n6Qk5tpdf61sbOWNatOtxVKJFCbstmv+QMyfExLlvFOrzLs3mt508c6aAE24AyTyCGDNNAuZH4NIKvcg+uFJMWa0E7aIFBllyw0kEc0NUk8lSVa8Z37HkD9Humi6QL0QzKZhixkhCkpxy0eanCtwJcVidmdP+9ltZNf9U2tvV/rxgKd30IkfRp6NFmUT1+xyWeum2nKXrBmvhNEensroYFjwbgEWS1C8W0ou0QRugo6s91FPvczAQuUD3TrtYXwNYA4I4EUMINDTgwQcjVv34LriRjRjUGcOZJUHl3Su4GH7Gc53pPZK1JecQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1szXAQ-0004Ay-Gi for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2024 04:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Oct 2024 08:08:02 +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.172872046515996 (code B ref 73609); Sat, 12 Oct 2024 08:08:02 +0000 Original-Received: (at 73609) by debbugs.gnu.org; 12 Oct 2024 08:07:45 +0000 Original-Received: from localhost ([127.0.0.1]:36216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szXA8-00049w-R7 for submit@debbugs.gnu.org; Sat, 12 Oct 2024 04:07:45 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szXA6-00049i-L9 for 73609@debbugs.gnu.org; Sat, 12 Oct 2024 04:07:43 -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 1szX9n-00076c-7G; Sat, 12 Oct 2024 04:07:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ERRLp8GuGGlU6RYMtADMCuYGE8QEXGz3eAFulua60BU=; b=KeSU2BI5SvTE m89IcH/c0zli+nPRtd/Mp14zgRJE2GAa0n4dV1VlZ6mPzQ5At9/UhUkSdf7e3lM7jbuSB8cNjzHXx KIeLdET5NhmVmm/krCK4GMXYGZbCPvCZYpE+jIoXtUWO+s44R8MDYao/nc+T0YcaQsHEyqd8hZDjp QONCA8l9aMHklNo9GwfYX2kCsNftG9yeYmCHAq0E6FjA+VPCZG0DbZdSSBd8Gv5QP9eGB+hvFDHVt AFpFPzjzzH3fkqemyHAdabumJ70RpBH4Bi+nnku3MmXmtFgwfxtti+X1NcgLNmife4EWp0biLVBLe i22a4MRYmKvwNab5Y+GtHg==; In-Reply-To: (message from Al Haji-Ali on Fri, 11 Oct 2024 23:25:08 +0100) 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:293400 Archived-At: > From: Al Haji-Ali > Cc: 73609@debbugs.gnu.org > Date: Fri, 11 Oct 2024 23:25:08 +0100 > > > > > 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. > > 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. > > Here's how I am able to reproduce the issue: > > --8<---------------cut here---------------start------------->8--- > ;;; 1. Run emacs -Q > ;;; 2. Define the following function > > (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)))) > > ;;; 3. Call > (bug-73609 t) > > ;;; 4. Restart `emacs -Q` and redefine the function above > ;;; 5. Run > (bug-73609) > > ;; 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--- > > > I expect the final line to be > > ; AFTER value is t > > as I do not expect that loading `use-package` would change the value of the variable `org-log-reschedule`. John, any suggestions or ideas?