From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#55070: 28.1; desktop-load doesn't work in -nw (non-gui) emacs Date: Sat, 23 Apr 2022 17:25:10 +0300 Message-ID: <83sfq3op15.fsf@gnu.org> References: <83fsm4pbs4.fsf@gnu.org> <6961B895-263C-4632-AA4E-8DE29D6160BC@swenson.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40455"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55070@debbugs.gnu.org To: Eric Swenson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 23 16:26:16 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1niGiF-000AHN-VT for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Apr 2022 16:26:16 +0200 Original-Received: from localhost ([::1]:54266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niGiE-0003AO-J8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Apr 2022 10:26:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niGi2-000395-IS for bug-gnu-emacs@gnu.org; Sat, 23 Apr 2022 10:26:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34731) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niGi2-0002lr-9m for bug-gnu-emacs@gnu.org; Sat, 23 Apr 2022 10:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1niGi2-0000Ku-2L for bug-gnu-emacs@gnu.org; Sat, 23 Apr 2022 10:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Apr 2022 14:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 55070-submit@debbugs.gnu.org id=B55070.16507239171219 (code B ref 55070); Sat, 23 Apr 2022 14:26:02 +0000 Original-Received: (at 55070) by debbugs.gnu.org; 23 Apr 2022 14:25:17 +0000 Original-Received: from localhost ([127.0.0.1]:56858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niGhJ-0000Jb-Du for submit@debbugs.gnu.org; Sat, 23 Apr 2022 10:25:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niGhH-0000JL-SV for 55070@debbugs.gnu.org; Sat, 23 Apr 2022 10:25:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60972) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niGhC-0002bB-Bj; Sat, 23 Apr 2022 10:25:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=0ViBz3lFt181s6b6B5JHOggCz6c99omIn4HXEycLY2E=; b=YgdZko8LW1JRNFMohHmH ofrFpUFiZpBiPDav68K6WFdMNdXU/vEGy2Y+vBRIa5qQHZAi/cR4gFUPe+y242A/92HmC7oCV0/kW eHmV3M4BVnWYSceeRH2l0/PhPbUXOU7h//y9d116W/l3c3S8MCkXzRFWkhR2Ue5LmLRZPXecGjRaJ 5BVagrNUlFaak6Y0DjU/NoKZ5viE9lQsLLY6b7hOErar1+GBBsaF4ULoEXDtA6xQ6qjhQj3xyDl25 M3xdo5xickVtOIL/C1rNSFMYGPpza4OO9E3e5s+Hv2oPfV1dz/2VIQV5qVjv7VtFBt/TZyngfAbm4 41gS18JgbP3XRQ==; Original-Received: from [87.69.77.57] (port=3753 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niGhB-0002Eu-Gp; Sat, 23 Apr 2022 10:25:10 -0400 In-Reply-To: <6961B895-263C-4632-AA4E-8DE29D6160BC@swenson.org> (message from Eric Swenson on Sat, 23 Apr 2022 06:52:13 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:230491 Archived-At: > From: Eric Swenson > Date: Sat, 23 Apr 2022 06:52:13 -0700 > Cc: 55070@debbugs.gnu.org, eric=swenson.org@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 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.