From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 03 01:50:13 2024 Received: (at submit) by debbugs.gnu.org; 3 Oct 2024 05:50:13 +0000 Received: from localhost ([127.0.0.1]:59732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swEj6-0004lr-ML for submit@debbugs.gnu.org; Thu, 03 Oct 2024 01:50:13 -0400 Received: from lists.gnu.org ([209.51.188.17]:58712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swEj4-0004ih-Fc for submit@debbugs.gnu.org; Thu, 03 Oct 2024 01:50:11 -0400 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 1swEj2-0004M4-Pu for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2024 01:50:08 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swEj1-0008Lo-5g for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2024 01:50:08 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a8a837cec81so36770966b.2 for ; Wed, 02 Oct 2024 22:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727934604; x=1728539404; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=hPKQNHjj1J2FBqHo6hlITWiWFRedSNKZZOqZuipmZ30=; b=OSLsl97W7w30xZKcMY5sBDALrRlHpTLpqUqofED+cgnXWXsUdH7RYscB0Fi0lNW4W9 QviCme8X5FwUOeuHB4CVT2X/bEZxEBIcrbYKWbLEufmvsu1fqo5ykx/qXIhrl5GhlBXu mOHiuD3iFp/kt/6Mdjf9j2D8puvlNAf2HX80aNLY98JBpTQKRjV4wz/R8Q35RKFtCQaS 7YkuBEYwip6bFPtCMVbTxqU4++oJHAh6gbZJ+ZALm4cfSAa1K3gOk59ThOR9vJgh5tDc +nXq/piLIeUQdlFrtnU1Y8OXT0rbZQQp5lZjDubPCz6qIe4xd7iJpITCqWbxDXiJv8YT Hurw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727934604; x=1728539404; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hPKQNHjj1J2FBqHo6hlITWiWFRedSNKZZOqZuipmZ30=; b=e4Kv2WuJeRDqhxkV5joOTEANvA4Z8fGe2tS5mEZMJgD9IzzqszGTywo3x8K5yEvOQP D7BJ9WABkwfxbunNZFSbaiBLiWTCeYpw5suJk9uRvesnSBZ+fUmH2mEV3xL7wFXj+h4R zCRZdZNmWfJGSxFVX2j4fiHAAstpFD5yfLAbxwCJB5JGJeCD9p2ZcZiUJTodulUJ+k8s SktSc5QLhVnkYu5Bg9XUooA4nA1VJoKvn1r/9HhQ85SnPHkVulv6PwkpmsEG/6dl9zbb JgQvecePx7Ycp0Ofe4XfrVeHXlNcD0xu6XvNzHhZlDlT4ED1+DgNVzvDRCKATCa5zgKs GXIA== X-Gm-Message-State: AOJu0YxOOcJFrpxYPlolgamg8kzsrAgB1XX3AluOZ4M9k2LKrx1i8Ffu isnn+6Y4P9nufPfoiyJ8ViJ+HzsbxLPlD96jqq1pq0l+ss34lcvViYh8BA== X-Google-Smtp-Source: AGHT+IG/3YAtgm8MEnHAHjsqMQMU4XUKS0IK+/+0kd1JgebB0gdqve6j2oWwXRsjYRXxDZD+MQ1Zdg== X-Received: by 2002:a05:6402:430e:b0:5c8:7bbd:1c4f with SMTP id 4fb4d7f45d1cf-5c8b18b7a8amr4914957a12.7.1727934603573; Wed, 02 Oct 2024 22:50:03 -0700 (PDT) Received: from localhost (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c8ca3de7b6sm312556a12.27.2024.10.02.22.50.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 22:50:02 -0700 (PDT) From: Al Haji-Ali To: bug-gnu-emacs@gnu.org Subject: 29.1; use-package overwrites custom variables in byte-compiled files Date: Thu, 03 Oct 2024 06:47:51 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=abdo.haji.ali@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) In my config file, I have a use-package statement like this ,---- | (use-package org | :custom | (org-log-reschedule nil)) `---- If I byte-compile my config file, run Emacs and run: ,---- | (message "START value is %S" org-log-reschedule) | (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) `---- I get the messages: ,---- | START value is nil | BEFORE value is t | Loading theme `use-package` | AFTER value is nil `---- I believe that is because, in my byte-compiled config, `use-package` is no longer required since all `use-package` statements are expanded. This means that `use-package-core` is also no longer required and in that file, a naked (enable-theme 'use-package) statement, which resets all custom random variables, is always executed. This is exactly what happens when I eventually require `use-package`. I can fix this by simply always requiring `use-package` in my config so that the enable-theme statement in `use-package-core` is executed before I modify any variables. Alternatively, this small patch seems to fix the root cause of the issue. --8<---------------cut here---------------start------------->8--- diff --git a/use-package-core.el b/use-package-core.el index bb523f6..5b1a414 100644 --- a/use-package-core.el +++ b/use-package-core.el @@ -38,7 +38,8 @@ ;; Necessary in order to avoid having those variables saved by custom.el. (deftheme use-package)) -(enable-theme 'use-package) +(unless (memq 'use-package custom-known-themes) + (enable-theme 'use-package)) ;; Remove the synthetic use-package theme from the enabled themes, so ;; iterating over them to "disable all themes" won't disable it. (setq custom-enabled-themes (remq 'use-package custom-enabled-themes)) --8<---------------cut here---------------end--------------->8--- -- Al From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 03 07:02:35 2024 Received: (at 73609) by debbugs.gnu.org; 3 Oct 2024 11:02:35 +0000 Received: from localhost ([127.0.0.1]:60122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swJbO-0004X6-Sa for submit@debbugs.gnu.org; Thu, 03 Oct 2024 07:02:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swJbN-0004Wu-Qn for 73609@debbugs.gnu.org; Thu, 03 Oct 2024 07:02:34 -0400 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 1swJbG-00045G-Qg; Thu, 03 Oct 2024 07:02:26 -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=XeYXPZPDIpQOvPwGvkAIir8eKzpNbmUi9+5s3876Qis=; b=rFo076Xr/U0S N5Fvx6RIfVRDSen7p8niPBc3QgAseRsnOaCJD8iuDag8/7w6gE01ovVaXV7Bb/rjIJi3JBYhhUgNm mBNqqeXcCpSJItVF+/dJtYd4RO0DB/yp8YRqRjlHmJ4PbjiDAyJ0B5JQ+sLWxcKT9R6G+rHrH/M3w ay47aRNMNGlto9zZ9sg3Zqfc1rQ1+bIgbYTs0ZcacuCV+isRpvRFQpCmSEmGOGvL04ddluHS72g1n 0nawqrEbuYwNXrVHXEArZj5JDqT7HDOZkEHb7NVRvryvFsOYG9NzatDARATM4Jh6BLhH0bk5bRLjm 3yVlXxQgrE86CsR1sZBIIw==; Date: Thu, 03 Oct 2024 14:02:23 +0300 Message-Id: <86frpdzby8.fsf@gnu.org> From: Eli Zaretskii To: Al Haji-Ali In-Reply-To: (message from Al Haji-Ali on Thu, 03 Oct 2024 06:47:51 +0100) Subject: Re: bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73609 Cc: 73609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Al Haji-Ali > Date: Thu, 03 Oct 2024 06:47:51 +0100 > > > In my config file, I have a use-package statement like this > > ,---- > | (use-package org > | :custom > | (org-log-reschedule nil)) > `---- > > If I byte-compile my config file, run Emacs and run: > > ,---- > | (message "START value is %S" org-log-reschedule) > | (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) > `---- > > I get the messages: > ,---- > | START value is nil > | BEFORE value is t > | Loading theme `use-package` > | AFTER value is nil > `---- > > I believe that is because, in my byte-compiled config, `use-package` is no longer required since all `use-package` statements are expanded. This means that `use-package-core` is also no longer required and in that file, a naked (enable-theme 'use-package) statement, which resets all custom random variables, is always executed. This is exactly what happens when I eventually require `use-package`. > > I can fix this by simply always requiring `use-package` in my config so that the enable-theme statement in `use-package-core` is executed before I modify any variables. Alternatively, this small patch seems to fix the root cause of the issue. 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. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 18:26:35 2024 Received: (at 73609) by debbugs.gnu.org; 11 Oct 2024 22:26:35 +0000 Received: from localhost ([127.0.0.1]:35600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szO5i-0007AO-N6 for submit@debbugs.gnu.org; Fri, 11 Oct 2024 18:26:34 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:55656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szO5g-0007AF-Ul for 73609@debbugs.gnu.org; Fri, 11 Oct 2024 18:26:33 -0400 Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-37d51055097so1170443f8f.3 for <73609@debbugs.gnu.org>; Fri, 11 Oct 2024 15:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728685518; x=1729290318; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=DM7ud30gcmwzPixbEKuhq6T3sIgKPgr7mi1GzQRUSso=; b=hOMz4/kcQ0zFaeBtkMDqTapgQEqRluE4iUl2AGOtNCUJDzNhHnkIpkh6Wmpo6N3WTv UbC6NwskQzECFlnzjWiEwAw66XZh6DndpqnXLgp7mwHiPWYrBmEd1ZKDhwxBjxIv4YQo fb9p0+taMCiogmd9eKdXBnhU61imLD7xLblnBj2V6xw7ebaWym+Eh4xZ8gjloZ4XdoG8 ULScgfHy7mi+C6XOiaDFK9pNoEHMqKP0HUJID1dsa1pcQrr2GD2ZNZgof4pI78wU/HRK UIhPHSRkndm04ly7kUoGDW/rXUIezXQ7YHQrCMOGlcTLkEa8pICGR7XGEOgqpeDQNTlM w+1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728685518; x=1729290318; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DM7ud30gcmwzPixbEKuhq6T3sIgKPgr7mi1GzQRUSso=; b=To7fk0jWcHoTYXqlo8kc48a9I++kLDZLyCv8IKxTuLOfUfYXQfSpckJzk8YXBQSkM0 VmfRKgkaDSIZtUHd572Fb2aTAzaoPTvywrLvjd61uoGoD861df77S8NFUcjoLDdPy0Wh pfB/80wlb4/TrPJscSLl94i5BuAzNlntcM2u1wRMzuLlI5cd+p/BbBMxcuxTF/juUbnn Xd5n6kU3rT//zWdCfMN74YQ4TT+3DDQ2LN5i5Tkg4qgEM7823djY+b19whr08Ok1tZnG EH8zMRa+VCg38Y+J6JvL9/qmp3eBModTmwkawy6tW6kPbwvMoaVLI3XpPtZGT13b1QTW 5EkA== X-Gm-Message-State: AOJu0YxyjOKNR/6+d8L6ndxXb3lwYkXNRiWZjFV998IgOsjh5/0ReYJ0 w2r5zWBOniUCXRWRG28WG6UsMmStgHFLLW7ZFEuJPPCBYUkWLzQZp48c4Q== X-Google-Smtp-Source: AGHT+IFDYG3WNOBEsPkiqMfZGeVSHTQVeuvZpWBu/XnSHnms7Plc87q6MQjYg2Ceo2I2W9Cb4ZpIXg== X-Received: by 2002:adf:f703:0:b0:37d:38a1:6470 with SMTP id ffacd0b85a97d-37d5ffc0320mr612335f8f.46.1728685518224; Fri, 11 Oct 2024 15:25:18 -0700 (PDT) Received: from localhost (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d4b917f54sm4829926f8f.110.2024.10.11.15.25.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 15:25:17 -0700 (PDT) From: Al Haji-Ali To: Eli Zaretskii Subject: Re: bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files In-Reply-To: <86frpdzby8.fsf@gnu.org> References: <86frpdzby8.fsf@gnu.org> Date: Fri, 11 Oct 2024 23:25:08 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73609 Cc: 73609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > 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`. -- Al From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 04:07:45 2024 Received: (at 73609) by debbugs.gnu.org; 12 Oct 2024 08:07:45 +0000 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 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 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==; Date: Sat, 12 Oct 2024 11:07:22 +0300 Message-Id: <86wmidycat.fsf@gnu.org> From: Eli Zaretskii To: Al Haji-Ali , John Wiegley In-Reply-To: (message from Al Haji-Ali on Fri, 11 Oct 2024 23:25:08 +0100) Subject: Re: bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files References: <86frpdzby8.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73609 Cc: 73609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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? From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 11:23:41 2024 Received: (at 73609) by debbugs.gnu.org; 12 Oct 2024 15:23:41 +0000 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 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 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 sghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepjhhohhhnfiesghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: ib64945b7:Fastmail Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files From: John Wiegley In-Reply-To: <86wmidycat.fsf@gnu.org> Date: Sat, 12 Oct 2024 08:22:45 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <3BD8C402-58DE-429C-8C90-744471B95007@gnu.org> References: <86frpdzby8.fsf@gnu.org> <86wmidycat.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73609 Cc: 73609@debbugs.gnu.org, Al Haji-Ali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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? From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 13 13:41:23 2024 Received: (at 73609) by debbugs.gnu.org; 13 Oct 2024 17:41:23 +0000 Received: from localhost ([127.0.0.1]:53043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t02ap-00008r-0O for submit@debbugs.gnu.org; Sun, 13 Oct 2024 13:41:23 -0400 Received: from mail-wm1-f48.google.com ([209.85.128.48]:43479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t02am-00008h-G0 for 73609@debbugs.gnu.org; Sun, 13 Oct 2024 13:41:21 -0400 Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-431160cdbd0so21762545e9.1 for <73609@debbugs.gnu.org>; Sun, 13 Oct 2024 10:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728841204; x=1729446004; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=AbWZ8mbIqnsPEZgpCf5ZKpif5RkXN5/sENMg3bmFKaE=; b=eQabZv782WgeWYHgsbTU9DA9nwl7HbbOFQXuXC8H7/9d2ucR6fDtrOr3FMPysL3xIi UymrbML21j2tnkiXNgFUoFi0GsLevIE6pu1finr9w7F77xE94oWpQ1JdW/2WCOxBD7rr IE/hQchnaQhkAVA0ysPsvgwD+1dz5ZPLFX7CHlEyL2WDKfX0tOuK24M9BthZP5cKMcdt z6/pzM2VqMOnHrTULN/G9y6hC+QWmsk8Rl9mgRFqA0Oq+/p1Mwh/L6hDBsVfkjGUcb6m SqMtQW/l6pl/5rfTsGsnAg65n3kxkjffO4lDvxzY2i4dzQZRMAKIacWdT0O373AMN9Hu mMyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728841204; x=1729446004; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AbWZ8mbIqnsPEZgpCf5ZKpif5RkXN5/sENMg3bmFKaE=; b=iCAB0P5sjmcqFpMidMW5uRuT3EqKGH8ymq+HPKengt981w3R160N5cdLOmwLCT0+2v lboqeUKSo2kh4CVzs6dJZUv/5XJ38SlkH5GKnDGO35eExOYrtS118kLw1lWNPWuXuKt+ XLdYhuRvhlzniernfjCPZjn2TqT7IAmMtYfwBHykoc90br5fmchtjYvg9O6PlSf/cFNC OTkDr8DVfFYFa/3cu95/BjFsJ5PseD7ibuej0tyVigiA7m8E1Av25kZQWTyFnYpOJUW9 nZJ1WUvETFaxMkQ7PHEfqs5oDZxJsmpx2jb9nPZzsI1vNop0j5zAeaUhcr2b/nc7400o MQPQ== X-Gm-Message-State: AOJu0YwGOXMrZrZ/WvtnnljnhYk2Dlug9GjYv6qZH/oHGR+0L+EW/p0t ozfDFGd6rDaniirZ6M7SKoYPYklEdO5v5BL6n20253HTTGspU115XxfC90GB X-Google-Smtp-Source: AGHT+IEp4Ebo8fY81A5lopw7HRVKG5hgKhs02lASTJspgg/fmzrq//0I1s5MstiNYlT6J7wN3GXLiQ== X-Received: by 2002:a05:600c:4e8e:b0:430:4db2:2b88 with SMTP id 5b1f17b1804b1-4311d891c4cmr68550725e9.5.1728841203375; Sun, 13 Oct 2024 10:40:03 -0700 (PDT) Received: from localhost (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431182ffabdsm98451035e9.14.2024.10.13.10.40.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Oct 2024 10:40:02 -0700 (PDT) From: Al Haji-Ali To: John Wiegley , Eli Zaretskii Subject: Re: bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files In-Reply-To: <3BD8C402-58DE-429C-8C90-744471B95007@gnu.org> References: <86frpdzby8.fsf@gnu.org> <86wmidycat.fsf@gnu.org> <3BD8C402-58DE-429C-8C90-744471B95007@gnu.org> Date: Sun, 13 Oct 2024 18:31:39 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73609 Cc: 73609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, On 12/10/2024, John Wiegley wrote: > I don=E2=80=99t fully understand. The purpose of of `:custom (X Y)` is ex= actly to customize X to the value Y using the value setting functions of th= e customization framework. > > Is the user expecting that byte-compilation would cause the value to be s= et without loading use-package? No, the point is that this is already the case, and that is causing a discr= epancy between having a compiled file vs not. The original message had the = context, but if you've seen that already, here's another crack at explainin= g. Apologies for the repetition. The function definition above essentially has the sequence: 1- load a file that uses `use-package` with a `:custom` statement to set a = variable.=20 2- modify said variable to some other value. 3- require `use-package`. 4- Check value of variable. If the file is not compiled, then `use-package` is loaded in step 1 in orde= r to expand the `use-package` statement. This means that the third step doe= sn't do anything, and the value of the variable is set to whatever I had in= step 2. However, if the file is compiled, the first step does not load `use-package= `, due to lazy loading and since all `use-package` macro calls are expanded= in a compiled file. This means that the loading of `use-package` happens i= n the third step, after I have modified the variable. The in turns loads `u= se-package-core` and the 'use-package theme is enabled, which resets the va= lue of all custom variables that were set using `:custom` statements. The f= inal result is that value of the variable in step 4 is the one from step 1,= rather than step 2. I hope this clarifies the issue. I included a potential patch in my origina= l message which fixes the issue, but I am not sure if it would have uninten= ded consequences, -- Al From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 14 11:11:07 2024 Received: (at 73609) by debbugs.gnu.org; 14 Oct 2024 15:11:07 +0000 Received: from localhost ([127.0.0.1]:40115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0Mix-0000Wr-5H for submit@debbugs.gnu.org; Mon, 14 Oct 2024 11:11:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0Miu-0000WK-IY for 73609@debbugs.gnu.org; Mon, 14 Oct 2024 11:11:05 -0400 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 1t0MiY-0007eD-6v; Mon, 14 Oct 2024 11:10:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=MJ16OaHugD6yeVj7jbdJpf59TzDMDKtaS2F8Q5Cg+d4=; b=QRv7fb5t/3jMoWKw8zM6 zjl1WHlcT1B9eQPGEtgMdt6Z/pw7CrEe1qF+TEl0ttBv1waore7MgjpwEzVknArrQbBOhIelLZN84 U15yEkv3O4+dWlqccZ21Pkr6JFYGxISW/8yOZES7O3HJMyJx5DyklgY1fncJkG48SztxSnhSeS6Xc A37388y3lFSWFoAdpJnC4+JyNlWzGzoZrPWX3WqueWLqDgIg5kFKT5eZGrvs9L5jqNnUSQPHdj3PG OcNqLNEH6CIS+GY8UtXn3mJB3mvAXGp74zzuOt19MknN9IquleW7gYOhBQjycQhoV5vXCRkLzSkk/ W7j/vc4Sy/CwPw==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdeghedgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujghffffkfgggtgesthdtredttdertden ucfhrhhomheplfhohhhnucghihgvghhlvgihuceojhhohhhnfiesghhnuhdrohhrgheqne cuggftrfgrthhtvghrnhepfefhvddvteetueefjedtvdfgveeuvdfhheehtdevudefueev jeelgfduteelfeeknecuffhomhgrihhnpehnvgifrghrthhishgrnhhsrdgtohhmnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhohhhnfido mhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqieekjeektdelgeegqddujeejhe efkeduiedqjhhohhhnfieppehgnhhurdhorhhgsehnvgifrghrthhishgrnhhsrdgtohhm pdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeejfe eitdelseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepvghlihiisehgnhhu rdhorhhgpdhrtghpthhtoheprggsughordhhrghjihdrrghlihesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: ib64945b7:Fastmail From: John Wiegley To: Al Haji-Ali Subject: Re: bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files In-Reply-To: (Al Haji-Ali's message of "Sun, 13 Oct 2024 18:31:39 +0100") References: <86frpdzby8.fsf@gnu.org> <86wmidycat.fsf@gnu.org> <3BD8C402-58DE-429C-8C90-744471B95007@gnu.org> Date: Mon, 14 Oct 2024 08:10:39 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73609 Cc: Eli Zaretskii , 73609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>>>> Al Haji-Ali writes: > I hope this clarifies the issue. I included a potential patch in my original > message which fixes the issue, but I am not sure if it would have unintended > consequences, Ah, I understand now, this is indeed a complication that should be addressed. Byte-compiling use-package declarations has always been rather tricky, and it still does not even work for my own personal configuration. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 27 06:33:15 2024 Received: (at 73609) by debbugs.gnu.org; 27 Oct 2024 10:33:15 +0000 Received: from localhost ([127.0.0.1]:43947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t50aB-0006Pq-86 for submit@debbugs.gnu.org; Sun, 27 Oct 2024 06:33:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t50a9-0006Pb-HL for 73609@debbugs.gnu.org; Sun, 27 Oct 2024 06:33:14 -0400 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 1t50ZP-0004a4-3o; Sun, 27 Oct 2024 06:32:33 -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=zUKZZHh2dPFDt7uTONcJrNTqBOizwFFX+1EkojR9u6M=; b=KZB0dK6N/x5y NNSaEmkiOrCmOExpAJqi6UJp6fVP8LqqEBoCJIyrll4tqIburkp8V3OX7JlU5G6CyT/aEUf/VTmBh JuNMb6Co2MM//OXhYkCERa/xmmplUlUoyjeBRzA1Wi/9Y5I/i/fHO2ZZCNIZ13OtpJZMTkdbWUdn9 13GoyMDctnYs8tv0Znb5i5Gv5zTC0fEdO5skyteNRyxQ3Qahl65EwSPYe3Gw8rpiBdl04ZGJwlCaK sL3rfiLgX5ch+KLyLCmC2Gf7v2YIhmSFI6iJ5v+R3KbebxhTtUfoQ1nIGlC7PzBTEfzBJQI5VA2IU +kZQTXdaWJH2NNrQH3y1NA==; Date: Sun, 27 Oct 2024 12:32:24 +0200 Message-Id: <86h68xalaf.fsf@gnu.org> From: Eli Zaretskii To: John Wiegley In-Reply-To: (message from John Wiegley on Mon, 14 Oct 2024 08:10:39 -0700) Subject: Re: bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files References: <86frpdzby8.fsf@gnu.org> <86wmidycat.fsf@gnu.org> <3BD8C402-58DE-429C-8C90-744471B95007@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73609 Cc: 73609@debbugs.gnu.org, abdo.haji.ali@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: John Wiegley > Cc: Eli Zaretskii , 73609@debbugs.gnu.org > Date: Mon, 14 Oct 2024 08:10:39 -0700 > > >>>>> Al Haji-Ali writes: > > > I hope this clarifies the issue. I included a potential patch in my original > > message which fixes the issue, but I am not sure if it would have unintended > > consequences, > > Ah, I understand now, this is indeed a complication that should be addressed. > Byte-compiling use-package declarations has always been rather tricky, and it > still does not even work for my own personal configuration. How should we proceed with this bug report? Should we close it as wontfix? From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 01:53:32 2024 Received: (at 73609) by debbugs.gnu.org; 29 Oct 2024 05:53:32 +0000 Received: from localhost ([127.0.0.1]:55602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5fAa-0003ls-31 for submit@debbugs.gnu.org; Tue, 29 Oct 2024 01:53:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5fAY-0003ld-C4 for 73609@debbugs.gnu.org; Tue, 29 Oct 2024 01:53:30 -0400 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 1t5fAS-0005Km-30; Tue, 29 Oct 2024 01:53:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=UAzxwhoCNy/YMHw/Ji+Eqd2/u3pXMYYuvSJpdyKzHhM=; b=npLgL/GL3AYuUGmveFxn 5wV76nkwnrk1S3Xm7KixtyiyXd0l1DR0xhM4HJ1pwgxrgeqYHaGdlOsWMoHVurrvCpn5VyVQDyACT 1GjlXiYwJ/xWx7DXIR+LPn1CgeW4clGf9B2FGYr31PL9v5BarGy55wIyYfTCJdPssxTfcm83YTcHe AWlFGCfTXO+NOkFDZpcE0cRoQrKGoWAD3BD0u+CD/wE1PCh98bY0/JAMEWn9GuJ589/lALo2Gyxri uLkOfCmgI2XbsRFMbZk5WcfYLpxr/RxpRf6pv3tpYZpLalsqlqyoiTHWuCO4DNUv9MpYVK1HSl4o+ l6ZmnstCOKJxqw==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdektddgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujghffffkfgggtgfgsehtqhertddtreej necuhfhrohhmpeflohhhnhcuhghivghglhgvhicuoehjohhhnhifsehgnhhurdhorhhgqe enucggtffrrghtthgvrhhnpeeiffdthedviedvtdfffeffffevkeeludejieeltddufeeh fefhhfefgeejteefgeenucffohhmrghinhepnhgvfigrrhhtihhsrghnshdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhhnhif odhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeikeejkedtleeggedqudejje ehfeekudeiqdhjohhhnhifpeepghhnuhdrohhrghesnhgvfigrrhhtihhsrghnshdrtgho mhdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepje efiedtleesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopegrsgguohdrhhgr jhhirdgrlhhisehgmhgrihhlrdgtohhmpdhrtghpthhtohepvghlihiisehgnhhurdhorh hg X-ME-Proxy: Feedback-ID: ib64945b7:Fastmail From: John Wiegley To: Eli Zaretskii Subject: Re: bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files In-Reply-To: <86h68xalaf.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 27 Oct 2024 12:32:24 +0200") References: <86frpdzby8.fsf@gnu.org> <86wmidycat.fsf@gnu.org> <3BD8C402-58DE-429C-8C90-744471B95007@gnu.org> <86h68xalaf.fsf@gnu.org> Date: Mon, 28 Oct 2024 22:53:12 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73609 Cc: 73609@debbugs.gnu.org, abdo.haji.ali@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>>>> Eli Zaretskii writes: >> > I hope this clarifies the issue. I included a potential patch in my or= iginal >> > message which fixes the issue, but I am not sure if it would have unin= tended >> > consequences, >>=20 >> Ah, I understand now, this is indeed a complication that should be addre= ssed. >> Byte-compiling use-package declarations has always been rather tricky, a= nd it >> still does not even work for my own personal configuration. > How should we proceed with this bug report? Should we close it as wontfix? I think this one has to be =E2=80=9Cwon=E2=80=99t fix=E2=80=9D, indeed, wit= h a note in the documentation about possible bad interactions between :custom settings and byte-compiled files=E2=80=A6 --=20 John Wiegley GPG fingerprint =3D 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 30 04:50:56 2024 Received: (at 73609) by debbugs.gnu.org; 30 Oct 2024 08:50:56 +0000 Received: from localhost ([127.0.0.1]:34078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t64Po-0000d7-9O for submit@debbugs.gnu.org; Wed, 30 Oct 2024 04:50:56 -0400 Received: from mail-lj1-f176.google.com ([209.85.208.176]:46449) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t64Pl-0000cy-RW for 73609@debbugs.gnu.org; Wed, 30 Oct 2024 04:50:54 -0400 Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2fb3c3d5513so57379801fa.1 for <73609@debbugs.gnu.org>; Wed, 30 Oct 2024 01:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730278193; x=1730882993; darn=debbugs.gnu.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=wgrYZzYjtBqRQ3FolhDyVgvtZ2xUtiE32FSwql1ESLg=; b=dqY9livwJtJ0c9MZdpnsA3wUxs5I6eKWlyJ/pPMpmSjYM9kJbTQAuoaRW3KMjqKXKx gosaxsaQ3aRgjqpYylcpNVXG3dVtn+cTBvZSRDezqQUfs0ZeoAdTC4c2vPidv1gmhSQx eNNdD1/5cfxGU6d98SmFytW+Q910tEM3LxNAA7GdsFeKWC4YNTlPU5NYisIkmC5YVmER /LYRD6OnSgrWAgpDsc0OcfcoVQQ4fMIt74xQEPOlaXWzlpKNkreeca64lquBRvsHvCuY FnPdtS+6ysHv0KqHQuPu8PsOBG02zI/oum/WELYAwLw0O4YmYwqS2hFnOqnNdnzPTD8c AY7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730278193; x=1730882993; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wgrYZzYjtBqRQ3FolhDyVgvtZ2xUtiE32FSwql1ESLg=; b=PRxNpd0+NsjCs3zpw7SmhjJz96OHaJnE1C/LlkFYJrys0D5shBKU3WGjUal6ePgVBw mDgHBaDxbgH+d6kKENRmAF+Y0qAS9zT+Jiuwt1AmWn2kdeLrP4L8xQgqyepBWvLFh5Zx AIdW92hsl6jSmEmYmae8/H4dpG1aeB7N8p3jqP6TG4FQwiCS1bItXAzEYlNtyPgX6VR7 5Ymu3djaA+df3Cceb25/PNcPAlyL/UJGBNnuI2dUj85192Xr2O0EvGkABNMVNtBa6Rg/ jynfc7BPUuz5Pa1gGzhZBE9DsZC6F4zacF4I4Kl4p4eOU0s06Q1lJXeNk668bWZ3QLXk daZA== X-Forwarded-Encrypted: i=1; AJvYcCVvoNIIVRg4eI/ICOd7fq2ARiL5OQAYDGOpBdxldL55R5cR0e7ktyppKASqkY6Fohf5fkCnrQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzbhUu+aKCWoOho8KNzy5waxfUngjS85g+5/Gtlsq57lgM+32kK PfCLdfI3HhwHkDEpzC2GS5uExBXowFbKHXxgv4Sjwu7buBTBhWzR X-Google-Smtp-Source: AGHT+IGTsKRNS/ourqNQ7flmrMeIR51KdBHFM0efYEg0/0PBXf0sV8gRPTaQoHsDvChP7e5aQnNXuw== X-Received: by 2002:a05:651c:1146:b0:2fb:b59:8167 with SMTP id 38308e7fff4ca-2fcbe0993f7mr73679821fa.39.1730278192453; Wed, 30 Oct 2024 01:49:52 -0700 (PDT) Received: from smtpclient.apple (82-132-227-91.dab.02.net. [82.132.227.91]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cbb62c22d1sm4553238a12.45.2024.10.30.01.49.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Oct 2024 01:49:51 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: abdo.haji.ali@gmail.com Mime-Version: 1.0 (1.0) Subject: Re: bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files Date: Wed, 30 Oct 2024 08:49:30 +0000 Message-Id: <92F3DB22-DC62-491D-8090-4204C4D973F3@gmail.com> References: In-Reply-To: To: John Wiegley X-Mailer: iPhone Mail (22A3370) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73609 Cc: Eli Zaretskii , 73609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > I think this one has to be =E2=80=9Cwon=E2=80=99t fix=E2=80=9D, indeed, wi= th a note in the > documentation about possible bad interactions between :custom settings and= > byte-compiled files=E2=80=A6 Just to mention that a fix on the user side would be to always require use-p= ackage to force the loading of the theme before other user code is executed.= Of course this defeats the purpose of lazy-loading use-package that byte co= mpiling would normally offer. An easy =E2=80=9Cfix=E2=80=9D from the use-package side, with virtually zero= side effects, would be to move the loading of the theme into a small module= that the user can always require without loading all of use-package.= From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 09 04:57:33 2024 Received: (at 73609-done) by debbugs.gnu.org; 9 Nov 2024 09:57:33 +0000 Received: from localhost ([127.0.0.1]:53474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9iDk-0003L3-P9 for submit@debbugs.gnu.org; Sat, 09 Nov 2024 04:57:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9iDi-0003Kp-4F for 73609-done@debbugs.gnu.org; Sat, 09 Nov 2024 04:57:32 -0500 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 1t9iDc-0005ST-R0; Sat, 09 Nov 2024 04:57:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=FQwI6WxnhWoSmYj4mCH/wn03pIlrBtsm5M2b8i1PktI=; b=MrnvCxrF7Ao9840TO5wv 9RwmMI6MiyLTKV9Vec7lP+A2N+Mfi86kiz2Rr8qCRTMvp5Ber64XrWXYQTS8rG+/mTqVNa2D9xQ3z gTfTgyNfJ3yuJKUsMAniNyzMj20WpD33yUoxXTblVFcoNlQEvJ2hjqgGvmtehSVKOOQxTAcFLqGoq t9e8ETroXSOW4o7AqYOc6AmgyoQoCgBAXnABNwQrlzN+LroraAa3pqL5j3yiRfOazO/CJIFuwsx13 sR41qc+o4SbS7SqsQ9hjw4u26aoioIHvaFgV3g7UrBeWAxu+0dbrgU08tYm4bn7a4BJ5ili7LeDX6 TWVbeBN1SJJK0Q==; Date: Sat, 09 Nov 2024 11:57:21 +0200 Message-Id: <86ses0n30e.fsf@gnu.org> From: Eli Zaretskii To: abdo.haji.ali@gmail.com In-Reply-To: <92F3DB22-DC62-491D-8090-4204C4D973F3@gmail.com> (abdo.haji.ali@gmail.com) Subject: Re: bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files References: <92F3DB22-DC62-491D-8090-4204C4D973F3@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73609-done Cc: 73609-done@debbugs.gnu.org, johnw@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: abdo.haji.ali@gmail.com > Date: Wed, 30 Oct 2024 08:49:30 +0000 > Cc: Eli Zaretskii , 73609@debbugs.gnu.org > > > > I think this one has to be “won’t fix”, indeed, with a note in the > > documentation about possible bad interactions between :custom settings and > > byte-compiled files… > > Just to mention that a fix on the user side would be to always require use-package to force the loading of the theme before other user code is executed. Of course this defeats the purpose of lazy-loading use-package that byte compiling would normally offer. > > An easy “fix” from the use-package side, with virtually zero side effects, would be to move the loading of the theme into a small module that the user can always require without loading all of use-package. Thanks, I've now updated the use-package manual with the relevant information (on the emacs-30 branch), and I'm therefore closing this bug. From unknown Mon Jun 23 16:46:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 07 Dec 2024 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator