Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

news: gotcha


computers / gnu.emacs.help / .emacs.desktop files are saving too much state

SubjectAuthor
* .emacs.desktop files are saving too much stateemacsusr
`* Re: .emacs.desktop files are saving too much stateRalf Fassel
 `- Re: .emacs.desktop files are saving too much stateemacsusr

1
.emacs.desktop files are saving too much state

<94cf0dd9-e6d9-46c6-9ee1-324383ee6f22n@googlegroups.com>

  copy mid

http://rslight.i2p/computers/article-flat.php?id=8&group=gnu.emacs.help#8

  copy link   Newsgroups: gnu.emacs.help
X-Received: by 2002:a37:b645:0:b0:76c:ff36:495a with SMTP id g66-20020a37b645000000b0076cff36495amr126511qkf.2.1692131279690;
Tue, 15 Aug 2023 13:27:59 -0700 (PDT)
X-Received: by 2002:a05:6a00:3990:b0:668:6eed:7c1d with SMTP id
fi16-20020a056a00399000b006686eed7c1dmr6065488pfb.6.1692131279157; Tue, 15
Aug 2023 13:27:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: gnu.emacs.help
Date: Tue, 15 Aug 2023 13:27:58 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=73.69.102.87; posting-account=rTcQLgoAAABwHbjPKrK58lHld6sm8TI8
NNTP-Posting-Host: 73.69.102.87
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <94cf0dd9-e6d9-46c6-9ee1-324383ee6f22n@googlegroups.com>
Subject: .emacs.desktop files are saving too much state
From: opngid@gmail.com (emacsusr)
Injection-Date: Tue, 15 Aug 2023 20:27:59 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2041
 by: emacsusr - Tue, 15 Aug 2023 20:27 UTC

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.

Not sure what condition in my init.el is triggering emacs to save that type of info in my .emacs.desktop, but since environment variables can easily change external to emacs, restoring stale versions of these variables can introduce subtle bugs that are difficult to track down.

It's also not clear from the documentation how to modify this feature:

https://emacsdocs.org/docs/emacs/Saving-Emacs-Sessions

The variable desktop-globals-to-clear looked promising, but unfortunately I don't think it will help here.

So how can users exercise better control over what type of state information gets saved in their .emacs.desktop files?

Re: .emacs.desktop files are saving too much state

<ygabkf7o0f0.fsf@akutech.de>

  copy mid

http://rslight.i2p/computers/article-flat.php?id=9&group=gnu.emacs.help#9

  copy link   Newsgroups: gnu.emacs.help
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralfixx@gmx.de (Ralf Fassel)
Newsgroups: gnu.emacs.help
Subject: Re: .emacs.desktop files are saving too much state
Date: Wed, 16 Aug 2023 10:29:23 +0200
Lines: 18
Message-ID: <ygabkf7o0f0.fsf@akutech.de>
References: <94cf0dd9-e6d9-46c6-9ee1-324383ee6f22n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net 3L4dSX98JZhz1nN4dj3ekQ7QkdnBk+l0m6ei2qi0RvQ1tPEHA=
Cancel-Lock: sha1:2VpoawrHhuHd835gJ4Gt+WYmW5s= sha1:B5b47QP8xKERmgUQBOr4Js0rAug= sha256:c6/m1Z9Dy56HKTLNm49+YB0pOq8tAm03JLCZP/IAr+w=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
 by: Ralf Fassel - Wed, 16 Aug 2023 08:29 UTC

* 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'

Re: .emacs.desktop files are saving too much state

<7b35d408-b5e1-44a0-aae6-80e2fac07bb8n@googlegroups.com>

  copy mid

http://rslight.i2p/computers/article-flat.php?id=10&group=gnu.emacs.help#10

  copy link   Newsgroups: gnu.emacs.help
X-Received: by 2002:a05:6214:1629:b0:63f:7a89:d911 with SMTP id e9-20020a056214162900b0063f7a89d911mr633114qvw.11.1693079872476;
Sat, 26 Aug 2023 12:57:52 -0700 (PDT)
X-Received: by 2002:a05:620a:6689:b0:76e:edb1:f395 with SMTP id
qh9-20020a05620a668900b0076eedb1f395mr445244qkn.6.1693079872115; Sat, 26 Aug
2023 12:57:52 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: gnu.emacs.help
Date: Sat, 26 Aug 2023 12:57:51 -0700 (PDT)
In-Reply-To: <ygabkf7o0f0.fsf@akutech.de>
Injection-Info: google-groups.googlegroups.com; posting-host=2606:40:8722:1331:0:0:71:c2fc;
posting-account=rTcQLgoAAABwHbjPKrK58lHld6sm8TI8
NNTP-Posting-Host: 2606:40:8722:1331:0:0:71:c2fc
References: <94cf0dd9-e6d9-46c6-9ee1-324383ee6f22n@googlegroups.com> <ygabkf7o0f0.fsf@akutech.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7b35d408-b5e1-44a0-aae6-80e2fac07bb8n@googlegroups.com>
Subject: Re: .emacs.desktop files are saving too much state
From: opngid@gmail.com (emacsusr)
Injection-Date: Sat, 26 Aug 2023 19:57:52 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1496
 by: emacsusr - Sat, 26 Aug 2023 19:57 UTC

> 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'

Thanks. I just checked

http://doc.endlessparentheses.com/Var/desktop-globals-to-save.html

to no avail.


computers / gnu.emacs.help / .emacs.desktop files are saving too much state

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor