all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Al Haji-Ali <abdo.haji.ali@gmail.com>, John Wiegley <johnw@gnu.org>
Cc: 73609@debbugs.gnu.org
Subject: bug#73609: 29.1; use-package overwrites custom variables in byte-compiled files
Date: Sat, 12 Oct 2024 11:07:22 +0300	[thread overview]
Message-ID: <86wmidycat.fsf@gnu.org> (raw)
In-Reply-To: <m0ldyui8fv.fsf@gmail.com> (message from Al Haji-Ali on Fri, 11 Oct 2024 23:25:08 +0100)

> From: Al Haji-Ali <abdo.haji.ali@gmail.com>
> 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?





  reply	other threads:[~2024-10-12  8:07 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
2024-10-12  8:07     ` Eli Zaretskii [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86wmidycat.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=73609@debbugs.gnu.org \
    --cc=abdo.haji.ali@gmail.com \
    --cc=johnw@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.