From Newsgroup: gnu.emacs.help
* emacsusr <
opngid@gmail.com>
| I just finished tracking down a bug that had resulted from my
| .emacs.desktop file oddly snapshotting all of my environment variables
| and then restoring them from that frozen state each time I reloaded
| that desktop file.
| Environment variables are not saved by default when I run desktop-save
| from a freshly invoked emacs -q instance.
There is also no mention of 'env' in desktop.el (emacs 27.2 here).
Maybe some hook which jumps in here?
I'd check where the section with that information in .emacs.desktop gets written in the code of 'desktop-save'. Then maybe you get a clue which
part of desktop.el is the culprit.
Good luck!
R'
--- Synchronet 3.21d-Linux NewsLink 1.2