GNU bug report logs - #10348
24.0.92; Save and load window states

Previous Next

Package: emacs;

Reported by: Michael Bach <phaebz <at> gmail.com>

Date: Thu, 22 Dec 2011 01:40:08 UTC

Severity: normal

Found in version 24.0.92

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


Message #53 received at 10348 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 'martin rudalics' <rudalics <at> gmx.at>, 10348 <at> debbugs.gnu.org,
	'Michael Bach' <phaebz <at> gmail.com>, 'Juanma Barranquero' <lekktu <at> gmail.com>
Subject: Re: bug#10348: 24.0.92; Save and load window states
Date: Sat, 24 Dec 2011 21:04:23 +0200
> FWIW, maybe like something general like that should be autoloadable or, better
> perhaps, somewhere other than desktop.el?  Just a thought - why need to load
> desktop.el if you are not necessarily interested in saving/restoring desktops
> and you just want to serialize something?

It is tied to desktop functionality.  For example, see how it serializes
markers, and delays restoration of their values in `desktop-delay-hook'
until the desktop is completely loaded:

(desktop-value-to-string (window-state-get nil t))
=>
(list '((min-height . 4)
        (min-width . 10)
        (min-height-ignore . 2)
        (min-width-ignore . 9)
        (min-height-safe . 1)
        (min-width-safe . 2))
      'leaf
      '(total-height . 61)
      '(total-width . 227)
      '(normal-height . 1.0)
      '(normal-width . 1.0)
      '(combination-limit)
      '(parameters
        (clone-of . "Unprintable entity"))
      (list 'buffer "*scratch*"
            '(selected . t)
            '(hscroll . 0)
            '(fringes 9 9 nil)
            '(margins nil)
            '(scroll-bars 16 3 t nil)
            '(vscroll . 0)
            '(dedicated)
            (desktop-list* 'point
                           (let ((mk (make-marker)))
                             (add-hook 'desktop-delay-hook
                                       (list 'lambda '()
                                             (list 'set-marker mk 243
                                                   (get-buffer "*scratch*"))))
                             mk))
            (desktop-list* 'start
                           (let ((mk (make-marker)))
                             (add-hook 'desktop-delay-hook
                                       (list 'lambda '()
                                             (list 'set-marker mk 1
                                                   (get-buffer "*scratch*"))))
                             mk))
            (desktop-list* 'mark
                           (let ((mk (make-marker)))
                             (add-hook 'desktop-delay-hook
                                       (list 'lambda '()
                                             (list 'set-marker mk 192
                                                   (get-buffer "*scratch*"))))
                             mk))))




This bug report was last modified 13 years and 222 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.