GNU bug report logs -
#65843
28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
Previous Next
Reported by: tanzer <at> gg32.com
Date: Sat, 9 Sep 2023 16:37:02 UTC
Severity: normal
Found in version 28.2
Done: Alan Third <alan <at> idiocy.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On 11.09.2023, at 20:45, Alan Third <alan <at> idiocy.org> wrote:
> On Mon, Sep 11, 2023 at 06:16:19PM +0100, Christian Tanzer wrote:
> ...
> In the mean time, I might have an idea how to mitigate the issue.
Yup. That worked.
I defined one hook added to desktop-save-hook and another one added to
desktop-after-read-hook. The idea is to have no iconified frames in
the .emacs.desktop, so ::
+ the hook running before desktop-save makes all iconified frames
visible and sets a frame-parameter to mark the frame is iconified
(defun lse-frame:desktop-before-save:deiconify-frames ()
"desktop-save-hook: de-iconify all frames that are iconified"
(dolist (frame (frame-list))
(when (eq (frame-parameter frame 'visibility) 'icon)
(set-frame-parameter frame 'lse-iconified t)
(make-frame-visible frame)
)
)
)
+ the hook running after desktop-read iconifies all frames marked by
the desktop-save-hook
(defun lse-frame:desktop-after-read:iconify-frames ()
"desktop-after-read-hook: iconify all frames that were de-iconified
before desktop-save"
(dolist (frame (frame-list))
(when (frame-parameter frame 'lse-iconified)
(set-frame-parameter frame 'lse-iconified nil)
(iconify-frame frame)
)
)
)
A fringe benefit of this is that position and size of iconified frames
are preserved better.
An .emacs.desktop that crashed will work after being changed from
`(visibility . icon)` to `(visibility . t) (lse-iconified . t)`.
So I can upgrade from Emacs 27 to Emacs 28.2.
Emacs 29.1 is still out because of bug=65840.
Cheers,
--
Christian Tanzer
[Message part 2 (text/html, inline)]
This bug report was last modified 1 year and 249 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.