bug#27422: 25.2; Desktop mode fails to restore window registers

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#27422: 25.2; Desktop mode fails to restore window registers

Pierre Neidhardt
Steps to reproduce:

        $ emacs -Q -f desktop-save-mode
        C-x r w a
        C-x C-c
        y <RET>
        $ emacs -Q -f desktop-read
        C-x r j

The last command returns the error:
> user-error: Register doesn’t contain a buffer position or configuration

        M-x list-registers

shows in buffer:

> Register a contains a rectangle starting with Unprintable entity

This is mentioned in #17090.

Also Stefan Monnier wrote in
https://groups.google.com/forum/#!topic/gnu.emacs.help/64aO_O43530:

> This said, I have the impression that this is already done (at least partly)
> in newer Emacsen.

Don't know what it's worth.



In GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.10)
 of 2017-04-22 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
System Description: Arch Linux

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe
 -fstack-protector-strong' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'

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

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#27422: 25.2; Desktop mode fails to restore window registers

martin rudalics
 >> This said, I have the impression that this is already done (at least partly)
 >> in newer Emacsen.
 >
 > Don't know what it's worth.

I think he means that C-x r f should work as intended.  To fix C-x r w
accordingly you would have to write a new function, say
‘window-state-to-register’, based on ‘window-state-get’ and, when you
later jump to that register, use ‘window-state-put’ to put the state
saved in that register into the selected window.  Binding C-x r w to
that new function should then produce a register you can restore in a
later session.  Could you try implementing and testing that?

martin




Loading...