unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Swenson <eric@swenson.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 55070@debbugs.gnu.org, eric=swenson.org@groups.io
Subject: bug#55070: 28.1; desktop-load doesn't work in -nw (non-gui) emacs
Date: Sat, 23 Apr 2022 06:52:13 -0700	[thread overview]
Message-ID: <6961B895-263C-4632-AA4E-8DE29D6160BC@swenson.org> (raw)
In-Reply-To: <83fsm4pbs4.fsf@gnu.org>

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. 

-- Eric (KN6SIJ)


> On Apr 22, 2022, at 23:13, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> 
>> 
>> Date: Fri, 22 Apr 2022 16:27:47 -0700
>> From: Eric Swenson <eric@swenson.org>
>> Cc: "Eric Swenson via groups.io" <eric=swenson.org@groups.io>
>> 
>> I've tried the following in versions 26.3, 27.1, and 28.1.  If you use
>> desktop-save in a non-GUI (-nw) run of emacs, with no init.el loaded
>> (-Q), and then exit emacs, upon reentry, while the files that were
>> loaded in buffers at the time of the save are present, the windows are
>> not restored properly. Only one window is correct -- and only one window
>> is present.  If you start emacs without the "-nw" option, however,
>> everything works just fine.
>> 
>> For some of us who SSH into servers, we have no option but to use the
>> non-GUI version of emacs.
>> 
>> Note, I started this ticket in an emacs invocation with "-nw" but
>> without specifying "-Q", so my minimal, test init.el was executed. It appears
>> below:
>> 
>>  (desktop-save-mode 1)
>>  (setq desktop-load-locked-desktop nil)
>>  (desktop-read)
> 
> Please tell more about the symptoms:
> 
> . what do you mean by "only one window"? do you mean "frame" or do
>   you mean "window"?
> . what does one need to do before exiting the first session to
>   observe the results in the next one? for example, if you indeed
>   mean "only one window", then I guess in the first session one needs
>   to do something like "C-x 2" or maybe "C-x 4 f SOME-FILE"? please
>   describe those actions.
> . is the second session also a -nw session or is it a GUI session?
> 
> Thanks.





  reply	other threads:[~2022-04-23 13:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 23:27 bug#55070: 28.1; desktop-load doesn't work in -nw (non-gui) emacs Eric Swenson
2022-04-23  6:13 ` Eli Zaretskii
2022-04-23 13:52   ` Eric Swenson [this message]
2022-04-23 14:25     ` Eli Zaretskii
2022-04-23 14:53       ` Eric Swenson
2022-04-23 15:16         ` Eli Zaretskii
2022-04-23 15:39           ` Eric Swenson
2022-04-26  7:58       ` Juri Linkov
2022-04-26 10:16         ` Lars Ingebrigtsen
2022-04-26 11:26           ` Eli Zaretskii
2022-04-26 15:28           ` Juri Linkov
2022-04-26 16:09             ` Eli Zaretskii
2022-04-26 17:40               ` Juri Linkov
2022-04-26 18:14                 ` Eli Zaretskii
2022-04-27 16:53                   ` Juri Linkov
2022-04-27 17:02                     ` Eric Swenson
2022-04-28  7:01                       ` Juri Linkov
2022-04-28 16:18                         ` Eric Swenson
2022-04-28 17:39                           ` Juri Linkov
2022-04-30  8:42                             ` Eli Zaretskii
2022-05-01 17:25                               ` Juri Linkov
2022-05-03 16:31                                 ` Eli Zaretskii
2022-05-03 17:57                                   ` Juri Linkov
2022-05-03 18:28                                     ` Eli Zaretskii
2022-05-05 16:35                                       ` Juri Linkov
2022-05-05 16:51                                         ` Eli Zaretskii
2022-05-05 18:08                                           ` Juri Linkov
2022-04-27 17:16                     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6961B895-263C-4632-AA4E-8DE29D6160BC@swenson.org \
    --to=eric@swenson.org \
    --cc=55070@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=eric=swenson.org@groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).