Subject: 25.1; desktop-mode restore, issue with frame size

From: Norman Ramsey <[email-masked]>
Date: Sun, 09 Dec 2018 10:59:04 -0500

I'm using (desktop-save-mode 1) to save a session which I then reload,
but logging in remotely from a different machine with a different
resolution display. Something stored in the desktop winds up setting
frame width to 150 characters rather than the 87 characters it was saved
with.  Height seems unaffected.

In detail:

  - Start emacs on machine `homedog` with one monitor, resolution
    3840x2160. 
  - Exit emacs, writing .desktop file.
  - Remote login to `homedog` from machine `jar`, using `ssh -X` to
    forward the X server connection.  Machine `jar` has one monitor,
    resolution 1920x1200.  
  - Start emacs on homedog, but with DISPLAY environment variable set to
    `localhost:10.0`, which is the forwarded X connection.

When the dust settles after initialization, the emacs frame seems to be
about the right height, but it is much wider than it should be.

Interestingly, if I go in the opposite direction---save the desktop
while the display is on `jar`, then relaunch emacs from `homedog` with
its native display, there are no issues.

The waters are muddy here.  I see a number of frame-size changes on
startup, which I imagine have to do with interactions between
desktop-mode and font-size setting.  I had hoped to poke at it and come
up with a workaround, but appeal to
https://emacs.stackexchange.com/questions/46274/how-to-get-desktop-read-to-ignore-modify-frame-size
produced only the suggestion that I file a bug report.

My Emacs Lisp skills are limited, and this issue is not show-stopping,
as I can always resize the window after startup.  But if you have
suggestions about how I might come up with better information, please
let me know.

Norman Ramsey

In GNU Emacs 25.1.1 (i686-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-09-15, modified by Debian built on x86-grnet-01
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description:	Debian GNU/Linux 9.5 (stretch)

Configured using:
 'configure --build i686-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --build i686-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --with-x=yes --with-x-toolkit=gtk3
 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs25-JUSXUp/emacs25-25.1+1=. -fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LC_ALL: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Dired by name

Minor modes in effect:
  text-scale-mode: t
  desktop-save-mode: t
  diff-auto-refine-mode: t
  show-paren-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Desktop lazily opening solo.lua (187 remaining)...done
Desktop lazily opening mail-gradescope-grades (186 remaining)...done
Desktop lazily opening lambda.txt (185 remaining)...done
Desktop lazily opening students.txt (184 remaining)...done
Desktop lazily opening sml.txt (183 remaining)...done
Desktop lazily opening solution.sml (182 remaining)...done
Desktop lazily opening freetests.sml (181 remaining)...done
Desktop lazily opening agstest.sml (180 remaining)...done
Desktop lazily opening solution.sml (179 remaining)...done
Desktop lazily opening lams.sml (178 remaining)...done

Load-path shadows:
/usr/share/emacs/site-lisp/emacs-goodies-el/color-theme hides /home/nr/.emacs.d/elpa/color-theme-20080305.834/color-theme
~nr/emacs/sml-mode hides /usr/share/emacs/25.1/site-lisp/elpa/sml-mode-6.7/sml-mode
/usr/share/emacs/site-lisp/emacs-goodies-el/obfusurl hides /usr/share/emacs25/site-lisp/emacs-goodies-el/obfusurl
/usr/share/emacs/site-lisp/emacs-goodies-el/filladapt hides /usr/share/emacs25/site-lisp/emacs-goodies-el/filladapt
/usr/share/emacs/site-lisp/emacs-goodies-el/browse-huge-tar hides /usr/share/emacs25/site-lisp/emacs-goodies-el/browse-huge-tar
/usr/share/emacs/site-lisp/emacs-goodies-el/perldoc hides /usr/share/emacs25/site-lisp/emacs-goodies-el/perldoc
/usr/share/emacs/site-lisp/emacs-goodies-el/floatbg hides /usr/share/emacs25/site-lisp/emacs-goodies-el/floatbg
/usr/share/emacs/site-lisp/emacs-goodies-el/toggle-option hides /usr/share/emacs25/site-lisp/emacs-goodies-el/toggle-option
/usr/share/emacs/site-lisp/emacs-goodies-el/matlab hides /usr/share/emacs25/site-lisp/emacs-goodies-el/matlab
/usr/share/emacs/site-lisp/emacs-goodies-el/xrdb-mode hides /usr/share/emacs25/site-lisp/emacs-goodies-el/xrdb-mode
/usr/share/emacs/site-lisp/emacs-goodies-el/browse-kill-ring hides /usr/share/emacs25/site-lisp/emacs-goodies-el/browse-kill-ring
/usr/share/emacs/site-lisp/emacs-goodies-el/thinks hides /usr/share/emacs25/site-lisp/emacs-goodies-el/thinks
/usr/share/emacs/site-lisp/emacs-goodies-el/home-end hides /usr/share/emacs25/site-lisp/emacs-goodies-el/home-end
/usr/share/emacs/site-lisp/emacs-goodies-el/diminish hides /usr/share/emacs25/site-lisp/emacs-goodies-el/diminish
/usr/share/emacs/site-lisp/emacs-goodies-el/minibuffer-complete-cycle hides /usr/share/emacs25/site-lisp/emacs-goodies-el/minibuffer-complete-cycle
/usr/share/emacs/site-lisp/emacs-goodies-el/ascii hides /usr/share/emacs25/site-lisp/emacs-goodies-el/ascii
/usr/share/emacs/site-lisp/emacs-goodies-el/tld hides /usr/share/emacs25/site-lisp/emacs-goodies-el/tld
/usr/share/emacs/site-lisp/emacs-goodies-el/boxquote hides /usr/share/emacs25/site-lisp/emacs-goodies-el/boxquote
/usr/share/emacs/site-lisp/emacs-goodies-el/services hides /usr/share/emacs25/site-lisp/emacs-goodies-el/services
/usr/share/emacs/site-lisp/emacs-goodies-el/upstart-mode hides /usr/share/emacs25/site-lisp/emacs-goodies-el/upstart-mode
/usr/share/emacs/site-lisp/emacs-goodies-el/egocentric hides /usr/share/emacs25/site-lisp/emacs-goodies-el/egocentric
/usr/share/emacs/site-lisp/emacs-goodies-el/quack hides /usr/share/emacs25/site-lisp/emacs-goodies-el/quack
/usr/share/emacs/site-lisp/emacs-goodies-el/df hides /usr/share/emacs25/site-lisp/emacs-goodies-el/df
/usr/share/emacs/site-lisp/emacs-goodies-el/keywiz hides /usr/share/emacs25/site-lisp/emacs-goodies-el/keywiz
/usr/share/emacs/site-lisp/emacs-goodies-el/tc hides /usr/share/emacs25/site-lisp/emacs-goodies-el/tc
/usr/share/emacs/site-lisp/emacs-goodies-el/clipper hides /usr/share/emacs25/site-lisp/emacs-goodies-el/clipper
/usr/share/emacs/site-lisp/emacs-goodies-el/ff-paths hides /usr/share/emacs25/site-lisp/emacs-goodies-el/ff-paths
/usr/share/emacs/site-lisp/emacs-goodies-el/folding hides /usr/share/emacs25/site-lisp/emacs-goodies-el/folding
/usr/share/emacs/site-lisp/emacs-goodies-el/auto-fill-inhibit hides /usr/share/emacs25/site-lisp/emacs-goodies-el/auto-fill-inhibit
/usr/share/emacs/site-lisp/emacs-goodies-el/pod-mode hides /usr/share/emacs25/site-lisp/emacs-goodies-el/pod-mode
/usr/share/emacs/site-lisp/emacs-goodies-el/tail hides /usr/share/emacs25/site-lisp/emacs-goodies-el/tail
/usr/share/emacs/site-lisp/emacs-goodies-el/initsplit hides /usr/share/emacs25/site-lisp/emacs-goodies-el/initsplit
/usr/share/emacs/site-lisp/emacs-goodies-el/align-string hides /usr/share/emacs25/site-lisp/emacs-goodies-el/align-string
/usr/share/emacs/site-lisp/emacs-goodies-el/eproject hides /usr/share/emacs25/site-lisp/emacs-goodies-el/eproject
/usr/share/emacs/site-lisp/emacs-goodies-el/graphviz-dot-mode hides /usr/share/emacs25/site-lisp/emacs-goodies-el/graphviz-dot-mode
/usr/share/emacs/site-lisp/emacs-goodies-el/emacs-goodies-el hides /usr/share/emacs25/site-lisp/emacs-goodies-el/emacs-goodies-el
/usr/share/emacs/site-lisp/emacs-goodies-el/minibuf-electric hides /usr/share/emacs25/site-lisp/emacs-goodies-el/minibuf-electric
/usr/share/emacs/site-lisp/emacs-goodies-el/protbuf hides /usr/share/emacs25/site-lisp/emacs-goodies-el/protbuf
/usr/share/emacs/site-lisp/emacs-goodies-el/keydef hides /usr/share/emacs25/site-lisp/emacs-goodies-el/keydef
/usr/share/emacs/site-lisp/emacs-goodies-el/miniedit hides /usr/share/emacs25/site-lisp/emacs-goodies-el/miniedit
/usr/share/emacs/site-lisp/emacs-goodies-el/edit-env hides /usr/share/emacs25/site-lisp/emacs-goodies-el/edit-env
/usr/share/emacs/site-lisp/emacs-goodies-el/muttrc-mode hides /usr/share/emacs25/site-lisp/emacs-goodies-el/muttrc-mode
/usr/share/emacs/site-lisp/emacs-goodies-el/joc-toggle-buffer hides /usr/share/emacs25/site-lisp/emacs-goodies-el/joc-toggle-buffer
/usr/share/emacs/site-lisp/emacs-goodies-el/color-theme-library hides /usr/share/emacs25/site-lisp/emacs-goodies-el/color-theme-library
/usr/share/emacs/site-lisp/emacs-goodies-el/coffee hides /usr/share/emacs25/site-lisp/emacs-goodies-el/coffee
/usr/share/emacs/site-lisp/emacs-goodies-el/rfcview hides /usr/share/emacs25/site-lisp/emacs-goodies-el/rfcview
/usr/share/emacs/site-lisp/emacs-goodies-el/htmlize hides /usr/share/emacs25/site-lisp/emacs-goodies-el/htmlize
/usr/share/emacs/site-lisp/emacs-goodies-el/framepop hides /usr/share/emacs25/site-lisp/emacs-goodies-el/framepop
/usr/share/emacs/site-lisp/emacs-goodies-el/under hides /usr/share/emacs25/site-lisp/emacs-goodies-el/under
/usr/share/emacs/site-lisp/emacs-goodies-el/ctypes hides /usr/share/emacs25/site-lisp/emacs-goodies-el/ctypes
/usr/share/emacs/site-lisp/emacs-goodies-el/marker-visit hides /usr/share/emacs25/site-lisp/emacs-goodies-el/marker-visit
/usr/share/emacs/site-lisp/emacs-goodies-el/maplev hides /usr/share/emacs25/site-lisp/emacs-goodies-el/maplev
/usr/share/emacs/site-lisp/emacs-goodies-el/joc-toggle-case hides /usr/share/emacs25/site-lisp/emacs-goodies-el/joc-toggle-case
/usr/share/emacs/site-lisp/emacs-goodies-el/highlight-current-line hides /usr/share/emacs25/site-lisp/emacs-goodies-el/highlight-current-line
/usr/share/emacs/site-lisp/emacs-goodies-el/eproject-extras hides /usr/share/emacs25/site-lisp/emacs-goodies-el/eproject-extras
/usr/share/emacs/site-lisp/emacs-goodies-el/pp-c-l hides /usr/share/emacs25/site-lisp/emacs-goodies-el/pp-c-l
/usr/share/emacs/site-lisp/emacs-goodies-el/apache-mode hides /usr/share/emacs25/site-lisp/emacs-goodies-el/apache-mode
/usr/share/emacs/site-lisp/emacs-goodies-el/twiddle hides /usr/share/emacs25/site-lisp/emacs-goodies-el/twiddle
/usr/share/emacs/site-lisp/emacs-goodies-el/all hides /usr/share/emacs25/site-lisp/emacs-goodies-el/all
/usr/share/emacs/site-lisp/emacs-goodies-el/csv-mode hides /usr/share/emacs25/site-lisp/emacs-goodies-el/csv-mode
/usr/share/emacs/site-lisp/emacs-goodies-el/slang-mode hides /usr/share/emacs25/site-lisp/emacs-goodies-el/slang-mode
/usr/share/emacs/site-lisp/emacs-goodies-el/dedicated hides /usr/share/emacs25/site-lisp/emacs-goodies-el/dedicated
/usr/share/emacs/site-lisp/emacs-goodies-el/color-theme_seldefcustom hides /usr/share/emacs25/site-lisp/emacs-goodies-el/color-theme_seldefcustom
/usr/share/emacs/site-lisp/emacs-goodies-el/todoo hides /usr/share/emacs25/site-lisp/emacs-goodies-el/todoo
/usr/share/emacs/site-lisp/emacs-goodies-el/shell-command hides /usr/share/emacs25/site-lisp/emacs-goodies-el/shell-command
/usr/share/emacs/site-lisp/emacs-goodies-el/button-lock hides /usr/share/emacs25/site-lisp/emacs-goodies-el/button-lock
/usr/share/emacs/site-lisp/emacs-goodies-el/tlc hides /usr/share/emacs25/site-lisp/emacs-goodies-el/tlc
/usr/share/emacs/site-lisp/emacs-goodies-el/tabbar hides /usr/share/emacs25/site-lisp/emacs-goodies-el/tabbar
/usr/share/emacs/site-lisp/emacs-goodies-el/map-lines hides /usr/share/emacs25/site-lisp/emacs-goodies-el/map-lines
/usr/share/emacs/site-lisp/emacs-goodies-el/highlight-completion hides /usr/share/emacs25/site-lisp/emacs-goodies-el/highlight-completion
/usr/share/emacs/site-lisp/emacs-goodies-el/dir-locals hides /usr/share/emacs25/site-lisp/emacs-goodies-el/dir-locals
/usr/share/emacs/site-lisp/emacs-goodies-el/pack-windows hides /usr/share/emacs25/site-lisp/emacs-goodies-el/pack-windows
/usr/share/emacs/site-lisp/emacs-goodies-el/silly-mail hides /usr/share/emacs25/site-lisp/emacs-goodies-el/silly-mail
/usr/share/emacs/site-lisp/emacs-goodies-el/mutt-alias hides /usr/share/emacs25/site-lisp/emacs-goodies-el/mutt-alias
/usr/share/emacs/site-lisp/emacs-goodies-el/show-wspace hides /usr/share/emacs25/site-lisp/emacs-goodies-el/show-wspace
/usr/share/emacs/site-lisp/emacs-goodies-el/lcomp hides /usr/share/emacs25/site-lisp/emacs-goodies-el/lcomp
/usr/share/emacs/site-lisp/emacs-goodies-el/bar-cursor hides /usr/share/emacs25/site-lisp/emacs-goodies-el/bar-cursor
/usr/share/emacs/site-lisp/emacs-goodies-el/highlight-beyond-fill-column hides /usr/share/emacs25/site-lisp/emacs-goodies-el/highlight-beyond-fill-column
/usr/share/emacs/site-lisp/emacs-goodies-el/color-theme hides /usr/share/emacs25/site-lisp/emacs-goodies-el/color-theme
/usr/share/emacs/site-lisp/emacs-goodies-el/sys-apropos hides /usr/share/emacs25/site-lisp/emacs-goodies-el/sys-apropos
/usr/share/emacs/site-lisp/emacs-goodies-el/projects hides /usr/share/emacs25/site-lisp/emacs-goodies-el/projects
/usr/share/emacs/site-lisp/emacs-goodies-el/session hides /usr/share/emacs25/site-lisp/emacs-goodies-el/session
/usr/share/emacs/site-lisp/emacs-goodies-el/setnu hides /usr/share/emacs25/site-lisp/emacs-goodies-el/setnu
/usr/share/emacs/site-lisp/emacs-goodies-el/bm hides /usr/share/emacs25/site-lisp/emacs-goodies-el/bm
/usr/share/emacs/site-lisp/emacs-goodies-el/emacs-goodies-custom hides /usr/share/emacs25/site-lisp/emacs-goodies-el/emacs-goodies-custom
/usr/share/emacs/site-lisp/emacs-goodies-el/protocols hides /usr/share/emacs25/site-lisp/emacs-goodies-el/protocols
~nr/emacs/noweb-mode hides /usr/share/emacs/site-lisp/noweb-mode
/usr/share/emacs/25.1/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs25/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
~nr/emacs/mwheel hides /usr/share/emacs/25.1/lisp/mwheel
~nr/emacs/isearch hides /usr/share/emacs/25.1/lisp/isearch
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/25.1/lisp/textmodes/rst
~nr/emacs/tex-mode hides /usr/share/emacs/25.1/lisp/textmodes/tex-mode
/home/nr/.emacs.d/elpa/let-alist-1.0.5/let-alist hides /usr/share/emacs/25.1/lisp/emacs-lisp/let-alist
~nr/emacs/longlines hides /usr/share/emacs/25.1/lisp/obsolete/longlines

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec epg mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils minibuffer-complete-cycle
markdown-mode color url-parse url-vars vc-cvs sml-menus sml-mode
sh-script smie cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine face-remap dired flyspell ispell autorevert
filenotify vc-hg cus-edit cus-start cus-load wid-edit desktop frameset
rect lua-mode rx scroll-in-place noweb multi-mode imenu filladapt quack
cmuscheme scheme tex-mode derived skeleton compare-w diff-mode edmacro
kmacro paren server help-macro finder-inf gh-common marshal eieio-compat
info package epg-config mmm-auto mmm-vars mmm-compat
haskell-mode-autoloads ido seq ess-toolbar ess-mouse mouseme thingatpt
browse-url ess-menu ess-swv ess-noweb ess-noweb-font-lock-mode
ess-bugs-l essd-els ess-sas-d ess-sas-l ess-sas-a ess-sta-d ess-sta-l
cc-vars cc-defs make-regexp ess-sp6-d ess-dde ess-sp3-d ess-julia
ess-r-d ess-r-syntax ess-r-completion ess-roxy essddr noutline outline
hideshow ess-help ess-r-package ess-s-l ess ess-inf ess-tracebug compile
tramp tramp-compat auth-source cl-seq eieio byte-opt bytecomp
byte-compile cl-extra cconv eieio-core gnus-util mm-util help-fns
help-mode mail-prsvr password-cache tramp-loaddefs cl-macs trampver
ucs-normalize shell pcomplete comint ansi-color ring format-spec advice
ess-mode ess-noweb-mode ess-utils ess-generics cl gv cl-loaddefs pcase
cl-lib ess-custom executable easymenu ess-compat ess-site
emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs easy-mmode
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame 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 charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer 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 dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 8 597251 14813)
 (symbols 24 48376 0)
 (miscs 20 337 751)
 (strings 16 117508 22730)
 (string-bytes 1 3268415)
 (vectors 8 57667)
 (vector-slots 4 1088625 2386)
 (floats 8 642 672)
 (intervals 28 13014 0)
 (buffers 520 99))