Subject: Re: bug#73593: 29.4; desktop-save-mode does not store window configurations

From: Eli Zaretskii <[email-masked]>
Date: Wed, 02 Oct 2024 09:53:51 +0300

> From: Bob Hepple <[email-masked]>
> Date: Wed, 2 Oct 2024 10:41:41 +1000
> 
> >From emacs -Q:
> M-x desktop-save-mode
> C-x r w 0
> C-x C-c
> restart emacs -Q
> C-u M-x desktop-read
> C-x r j 0
> Error: "Register doesn't contain a buffer position or configuration"
> 
> The .emacs.desktop file contains:
> (setq register-alist (list (list 48 "Unprintable entity" (let ((mk
> (make-marker))) (add-hook 'desktop-delay-hook (lambda nil (set-marker
> mk 146 (get-buffer "*scratch*")))) mk))))
> 
> ... which is useless

Martin, is there any practical way of preserving a
window-configuration across Emacs sessions?  The object
current-window-configuration returns is exposed to Lisp as an opaque
object, and I don't think we can meaningfully serialize it, can we?

So perhaps the solution is to filter such registers from
register-alist when we save desktop?

> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54140 is similar but
> drifted off into a discussion of terminal mode.

No, that's a very different issue, and it has been solved long ago,
AFAIR.