GNU bug report logs -
#54140
27.2; desktop-save-mode fails to restore frame and window config
Previous Next
To reply to this bug, email your comments to 54140 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54140
; Package
emacs
.
(Thu, 24 Feb 2022 11:45:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mark Jamsek <mark <at> bsdbox.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 24 Feb 2022 11:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
According to the docs[0][1], both tab bar and window config should be
saved and restored with =(desktop-save-mode 1)=, but only buffers are
restored. This behaviour is consistent irrespective of whether using
=(desktop-save-mode 1)= in =init.el=, or manually calling =desktop-save=
and =desktop-read= to save and restore a saved session.
Tested on Emacs 27.2:
OpenBSD 7.0-current amd64
OpenBSD 7.1-beta amd64
macOS 10.15.7 Darwin Kernel 19.6.0 x86_64
macOS 12.2.1 Darwin Kernel 21.3.0 x86_64
Steps:
Set =(desktop-save-mode 1)= in =init.el= as described in the docs[0].
Start Emacs, and setup tabs and windows.
Close and restart Emacs.
Expected:
Emacs tab bar and window config is saved and restored at startup.
Actual:
Emacs creates a =.emacs.desktop= file; however, upon restart, only the
buffers are restored--not the frame and window configuration. Likewise,
any tab bar configuration is also lost.
[0]:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Emacs-Sessions.html
[1]:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Tab-Bars.html
----8<------------------------------------------------------------------
In GNU Emacs 27.2 (build 1, x86_64-unknown-openbsd)
of 2022-02-22 built on amd64.ports.openbsd.org
System Description: OpenBSD fnc.bsdbox.org 7.0 GENERIC.MP#267 amd64
Recent messages:
Defining kbd macro...
Keyboard macro defined
Defining kbd macro...
Keyboard macro defined
Quit
Configured using:
'configure --build=amd64-unknown-openbsd --without-sound --without-x
--without-dbus --without-gsettings --without-harfbuzz --without-jpeg
--without-lcms2 --without-libotf --without-m17n-flt --prefix=/usr/local
--sysconfdir=/etc --mandir=/usr/local/man --infodir=/usr/local/info
--localstatedir=/var --disable-silent-rules --disable-gtk-doc
'CFLAGS=-O2 -pipe -g' CPPFLAGS=-I/usr/local/include
'LDFLAGS=-L/usr/local/lib -g''
Configured features:
NOTIFY KQUEUE GNUTLS LIBXML2 ZLIB MODULES THREADS JSON PDUMPER GMP
Important settings:
locale-coding-system: nil
Major mode: Org
Minor modes in effect:
evil-org-mode: t
global-evil-surround-mode: t
evil-surround-mode: t
evil-leader-mode: t
shell-dirtrack-mode: t
evil-mode: t
evil-local-mode: t
desktop-save-mode: t
override-global-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
tab-bar-history-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug sendmail rx term/screen term/xterm xterm
ol-eww eww mm-url url-queue ol-rmail ol-mhe ol-irc ol-info ol-gnus nnir
gnus-sum url url-proxy url-privacy url-expand url-methods url-history
mailcap shr url-cookie url-domsuf url-util svg xml dom gnus-group
gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc
nnoo parse-time iso8601 gnus-spec gnus-int gnus-range message rmc puny
rfc822 mml mml-sec epa derived epg epg-config mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win
gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
text-property-search mail-utils mm-util mail-prsvr wid-edit ol-docview
doc-view jka-compr image-mode exif image dired dired-loaddefs ol-bibtex
bibtex ol-bbdb ol-w3m sh-script smie executable powerline-evil
powerline-evil-themes powerline powerline-separators color
powerline-themes evil-org org-element avl-tree generator
evil-indent-textobject evil-surround evil-leader evil evil-keybindings
evil-integration evil-maps evil-commands reveal flyspell ispell
evil-jumps evil-command-window evil-search evil-ex shell evil-types
evil-macros evil-repeat evil-states evil-core evil-common windmove calc
calc-loaddefs calc-macs thingatpt rect evil-digraphs evil-vars edmacro
kmacro desktop frameset use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
use-package-core cl-extra help-mode org ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete
pcomplete comint ansi-color ring org-list org-faces org-entities
time-date noutline outline easy-mmode org-version ob-emacs-lisp ob-core
ob-eval org-table ol regexp-opt org-keys org-compat advice org-macs
org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs
finder-inf disp-table info tool-bar package easymenu browse-url
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch timer select mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame minibuffer
cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese composite
charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev
obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads kqueue
multi-tty make-network-process emacs)
Memory information:
((conses 16 230209 20234)
(symbols 48 24411 1)
(strings 32 79904 3145)
(string-bytes 1 2588990)
(vectors 16 35447)
(vector-slots 8 381564 11626)
(floats 8 398 343)
(intervals 56 428 122)
(buffers 1000 17))
--
Mark Jamsek <mark <at> bsdbox.org>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54140
; Package
emacs
.
(Thu, 24 Feb 2022 14:31:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 54140 <at> debbugs.gnu.org (full text, mbox):
Mark Jamsek <mark <at> bsdbox.org> writes:
> Emacs creates a =.emacs.desktop= file; however, upon restart, only the
> buffers are restored--not the frame and window configuration. Likewise,
> any tab bar configuration is also lost.
I'm unable to reproduce this in Emacs 27.2 (on Debian/bookworm) --
frames and windows are restored as normal.
Do you have any customisations that could affect the behaviour? That
is, if you have only
(desktop-save-mode 1)
in your init file, do you still see the problem?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 24 Feb 2022 14:31:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54140
; Package
emacs
.
(Fri, 25 Feb 2022 02:39:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 54140 <at> debbugs.gnu.org (full text, mbox):
(Please keep the debbugs address in the CCs -- otherwise it won't reach
the bug tracker.)
Mark Jamsek <mark <at> bsdbox.org> writes:
> Just to confirm, this report applies to Emacs in the terminal, not GUI.
> Did you test in the former?
No, I didn't test with -nw. With -nw I see the behaviour you're
describing.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54140
; Package
emacs
.
(Fri, 25 Feb 2022 04:57:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 54140 <at> debbugs.gnu.org (full text, mbox):
> On 25 Feb 2022, at 1:38 pm, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
>
> (Please keep the debbugs address in the CCs -- otherwise it won't reach
> the bug tracker.)
Will do. Thanks for the reminder!
> Mark Jamsek <mark <at> bsdbox.org> writes:
>
>> Just to confirm, this report applies to Emacs in the terminal, not GUI.
>> Did you test in the former?
>
> No, I didn't test with -nw. With -nw I see the behaviour you're
> describing.
And thanks for confirming this bug.
Do you know where in the codebase to dig to start debugging this?
Unfortunately, my Lisp is non-existent, but if it's in C, I might be
able to help.
--
Mark Jamsek <mark <at> bsdbox.org>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54140
; Package
emacs
.
(Fri, 25 Feb 2022 08:03:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 54140 <at> debbugs.gnu.org (full text, mbox):
> From: Mark Jamsek <mark <at> bsdbox.org>
> Date: Fri, 25 Feb 2022 13:58:36 +1100
> Cc: 54140 <at> debbugs.gnu.org
>
> Do you know where in the codebase to dig to start debugging this?
There's no need to debug this: this is the expected behavior on TTY
frames, see desktop-restoring-frameset-p. We deliberately don't
restore the frameset on text-mode displays. For the reasons, see
bug#17693.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54140
; Package
emacs
.
(Fri, 25 Feb 2022 09:40:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 54140 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> On 25 Feb 2022, at 7:02 pm, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>
>>
>> From: Mark Jamsek <mark <at> bsdbox.org>
>> Date: Fri, 25 Feb 2022 13:58:36 +1100
>> Cc: 54140 <at> debbugs.gnu.org
>>
>> Do you know where in the codebase to dig to start debugging this?
>
> There's no need to debug this: this is the expected behavior on TTY
> frames
Is this documented; if not, would a patch to this effect be accepted?
> see desktop-restoring-frameset-p. We deliberately don't
> restore the frameset on text-mode displays. For the reasons, see
> bug#17693.
I had a cursory look but don’t quite understand why that precludes desktop-save-mode from working with Emacs in the terminal. If you save an -nw session, you’d have no graphical frames to restore when starting an -nw session. I’ll read the thread in its entirety when back in front of the kb.
Sent from my iPhone
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54140
; Package
emacs
.
(Fri, 25 Feb 2022 12:03:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 54140 <at> debbugs.gnu.org (full text, mbox):
> From: Mark Jamsek <mark <at> bsdbox.org>
> Date: Fri, 25 Feb 2022 20:39:21 +1100
> Cc: larsi <at> gnus.org, 54140 <at> debbugs.gnu.org
>
> There's no need to debug this: this is the expected behavior on TTY
> frames
>
> Is this documented; if not, would a patch to this effect be accepted?
It depends on what the patch will do. Unconditionally letting desktop
restore the frameset on TTY displays is out of the question, as it
will bring back the problems we solved when we prevented that.
> see desktop-restoring-frameset-p. We deliberately don't
> restore the frameset on text-mode displays. For the reasons, see
> bug#17693.
>
> I had a cursory look but don’t quite understand why that precludes desktop-save-mode from working with
> Emacs in the terminal. If you save an -nw session, you’d have no graphical frames to restore when starting
> an -nw session.
How do we know that the desktop was saved from a -nw session?
> I’ll read the thread in its entirety when back in front of the kb.
Thanks. A related issue is bug#24298.
Removed tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 26 Mar 2022 16:38:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 81 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.