GNU bug report logs -
#73609
29.1; use-package overwrites custom variables in byte-compiled files
Previous Next
Reported by: Al Haji-Ali <abdo.haji.ali <at> gmail.com>
Date: Thu, 3 Oct 2024 05:51:02 UTC
Severity: normal
Found in version 29.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 73609 <at> debbugs.gnu.org (full text, mbox):
> 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 <at> 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
This bug report was last modified 198 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.