From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jay Kamat Newsgroups: gmane.emacs.help Subject: Re: desktop.el and frame parameters when -nw Date: Wed, 25 Jul 2018 20:02:57 -0700 Message-ID: <878t5yy9zy.fsf@gmail.com> References: <87fu08xe9r.fsf@gmail.com> <838t5zv13w.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1532574088 4428 195.159.176.226 (26 Jul 2018 03:01:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 26 Jul 2018 03:01:28 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 26.1.50 Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 26 05:01:24 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiWWp-00012f-Nb for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Jul 2018 05:01:23 +0200 Original-Received: from localhost ([::1]:57814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiWYw-0006VH-JY for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Jul 2018 23:03:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiWYS-0006V5-6I for help-gnu-emacs@gnu.org; Wed, 25 Jul 2018 23:03:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiWYP-0007i0-8G for help-gnu-emacs@gnu.org; Wed, 25 Jul 2018 23:03:04 -0400 Original-Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:36143) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fiWYO-0007gl-RE; Wed, 25 Jul 2018 23:03:01 -0400 Original-Received: by mail-pf1-x431.google.com with SMTP id d14-v6so90528pfo.3; Wed, 25 Jul 2018 20:03:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=fGB5nFHzq5/NttRxNicPTMfu/s1Hi19KxvLS4O3egnQ=; b=VpFKWYG/bq/rt8CT9rQ0T/3KjO+b4ilFHuQ02NlWYl09sUAd5YVlPeq+rQ9zqiWp7B QvHeIkYcOemQbI9uRx4tlRuZhgwAdOu/bIZOgMExbL0Rx99aBXjKR6o217fobWzFVQtf NBE28jCk1puCNeEQyGTPu9tsXKInqKdMe/3k131JFFbStZohK3z/CQdN2TFJ9WfUcJIl EN/lpdM8ukZok6o3WJh7T2wnpz2oanWpPIDuIgJDQPzvJgVimYoSOiYDnV70ByzT+wZZ ol8+yFqL9DHhrdKtUfPSqmnGNuJX5GjyMSiYjyedqM/nO1VxBnYChFPHBUvItq3FfLq3 KPng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=fGB5nFHzq5/NttRxNicPTMfu/s1Hi19KxvLS4O3egnQ=; b=ZAy/BPadTKZf2FaWFnFrgBPG8QHynd/uhUvQ1zS4Wtd1PXFiISfqaFsfxWXVQBChh4 tj896BZwQ0kEuYr/aXm2giiQO6kXF9XHOFsgC2VsOT6/JLtjHM4LEpbU3kLc3Xb7h/Km 6sY6yCmxczrc5VDneMJXNbwv79BtGlFs2S0Ync5I5jlexl0NzpqBapYgNMZOaE8hUD6I CkdsOjv+H/uqKZ2YQ5R8QESE1mehVKgjIMMSrqzbAZlpR7o+HnjZEgEI3Eu3P3mw7kL1 jNA+Tz4xuFAjZQZzFF0OtrnCyEP2aU9gmqD/JpgDmRJazi0j7ByoZh3RdmyaHWw1ICWh uzQg== X-Gm-Message-State: AOUpUlH3Aa1RL1D+AQqAgzb4hlenjQo+8J+BWWdh/DBtVjKEOPINBxo6 yX+UQVIHKLZiVS8BI5ddcabYBmKj X-Google-Smtp-Source: AAOMgpfvFO+pmRFqoX2wNJwY1D4I4U5GfpqBUdAg2mUA6Kpa3Cft+tMq46LkItOvtqZmZJuooaJOPw== X-Received: by 2002:a63:2c8e:: with SMTP id s136-v6mr194418pgs.390.1532574179037; Wed, 25 Jul 2018 20:02:59 -0700 (PDT) Original-Received: from laythe (c-107-3-141-66.hsd1.ca.comcast.net. [107.3.141.66]) by smtp.gmail.com with ESMTPSA id p64-v6sm178460pfa.47.2018.07.25.20.02.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jul 2018 20:02:58 -0700 (PDT) In-reply-to: <838t5zv13w.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::431 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117591 Archived-At: Hi Eli, Martin, Eli Zaretskii writes: > Why do you need such frame parameters restored when you start Emacs > with -nw? IOW, what is your real-life use case, and why cannot you > start Emacs without -nw, and then create a TTY frame in that session? I use a package called 'eyebrowse' which stores information about workspaces in the frame parameters. Because this data is not saved and restored, my eyebrowse workspaces get lost in tty frames after an Emacs quit. I'm trying to run Emacs on a remote server with no graphical interface at all, so I don't think I'll be able to run the gui version and open a frame (without installing all of X). I'm not sure why eyebrowse stores it's information in the frame parameters... > I suppose this is due to desktop.el's > > (defun desktop-restoring-frameset-p () > "True if calling `desktop-restore-frameset' will actually restore it." > (and desktop-restore-frames desktop-saved-frameset (display-graphic-p) t)) > > Try removing the (display-graphic-p). But I'm quite confident that this will > get you into lots of other troubles. Thanks for the pointer! I was able to come up with this: (unless (display-graphic-p) (setq desktop-restore-forces-onscreen nil) (defun desktop-restoring-frameset-p () "True if calling `desktop-restore-frameset' will actually restore it. Removes graphical from the list of required parameters." (and desktop-restore-frames desktop-saved-frameset t))) I'm not sure why I needed to set `desktop-restore-forces-onscreen' to nil, but I was getting errors without it. With this though, I'm getting the expected behavior. I'll remember to disable this if I run into any odd issues or breakages though. Hopefully the gui frame parameters that I shouldn't be restoring isn't a problem since the desktop sessions I'm loading from are terminal-only (for now at least). -Jay