From: Al Haji-Ali <abdo.haji.ali@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 73609@debbugs.gnu.org
Subject: bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files
Date: Fri, 11 Oct 2024 23:25:08 +0100 [thread overview]
Message-ID: <m0ldyui8fv.fsf@gmail.com> (raw)
In-Reply-To: <86frpdzby8.fsf@gnu.org>
> 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
next prev parent reply other threads:[~2024-10-11 22:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 5:47 bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files Al Haji-Ali
2024-10-03 11:02 ` Eli Zaretskii
2024-10-11 22:25 ` Al Haji-Ali [this message]
2024-10-12 8:07 ` Eli Zaretskii
2024-10-12 15:22 ` John Wiegley
2024-10-13 17:31 ` Al Haji-Ali
2024-10-14 15:10 ` John Wiegley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m0ldyui8fv.fsf@gmail.com \
--to=abdo.haji.ali@gmail.com \
--cc=73609@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).