GNU bug report logs -
#55070
28.1; desktop-load doesn't work in -nw (non-gui) emacs
Previous Next
Reported by: Eric Swenson <eric <at> swenson.org>
Date: Sat, 23 Apr 2022 00:00:02 UTC
Severity: normal
Tags: moreinfo, patch
Found in version 28.1
Fixed in version 29.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #16 received at 55070 <at> debbugs.gnu.org (full text, mbox):
> From: Eric Swenson <eric <at> swenson.org>
> Date: Sat, 23 Apr 2022 06:52:13 -0700
> Cc: 55070 <at> debbugs.gnu.org, eric=swenson.org <at> groups.io
>
> I start emacs with a single frame. I create three windows by doing, for example, C-x 2, and C-x 3. In each window, I read in a file. Then I invoke M-x desktop-save, and select a directory. I always use ~/.emacs.d. Then I exit emacs with C-x C-c.
>
> Then I renter emacs and invoke C-x desktop-load.
>
> If for both sessions, I invoke emacs with “-Q” only, on either macOS or Linux with Gnome desktop, everything works fine. However, if I invoke emacs with “-nw -Q”, when I run M-x desktop-load, I only get a single window with one of the files loaded. The other two files are loaded into buffers, but their windows were not restored.
>
> I haven’t tried a case where I ran a GUI session first and saved the desktop and then ran the non-GUI (-nw) session for the restore, but I’m pretty sure it would also fail.
>
> I think the “issue” is that desktop-load doesn’t work in the -nw session.
>
> And yes, you can set up the windows using C-x 4 f <filename> as well as the explicitly creating a second window and splitting and then loading files into each. It doesn’t really matter.
OK, thanks for the details. They tell me that what you see is the
intended behavior: desktop.el doesn't restore frames and windows on
text-mode terminals. This is because restoring frames and windows in
a -nw session is problematic, especially if the desktop was saved from
a GUI session.
If this causes a lot of inconvenience, maybe we could have a user
option to allow restoring the frameset in -nw session, for those who
only ever use -nw sessions. But we cannot allow that in general, and
not by default, IMO.
This bug report was last modified 3 years and 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.