Subject: bug#75022: 31.0.50; --init-directory sets user-emacs-directory after user eln-cache is set

From: Andrea Corallo <[email-masked]>
Date: Sun, 29 Dec 2024 06:25:18 -0500

Eli Zaretskii <[email-masked]> writes:

>> Date: Sun, 22 Dec 2024 13:26:04 -0800
>> From: "Jordan Isaacs" <[email-masked]>
>> Cc: [email-masked]
>> 
>> Because it is read only, there is no reason not to byte compile everything. I just make it part of the build step when packaging up my configuration.
>> 
>> The reasoning for why I byte compile though seems irrelevant, it’s a bug with a simple fix. The eln-cache path isn’t staying in sync with user-emacs-directory. 
>> 
>>     (let ((old-face-font-rescale-alist face-font-rescale-alist))
>>       (unwind-protect
>> 	  (command-line)
>> +  (when (featurep 'native-compile)
>> +     (startup--update-eln-cache))
>
> I'm not at all sure it's indeed so simple to change the eln-cache in
> the middle of a session, but let's hear what Andrea (CC'ed) thinks
> about this.

I have nothing in my mind which suggests this should not work, I think
that if the patch is tested and seems to work we could try it on master.

  Andrea