unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10348: 24.0.92; Save and load window states
@ 2011-12-21 20:41 Michael Bach
  2011-12-22 17:04 ` martin rudalics
                   ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: Michael Bach @ 2011-12-21 20:41 UTC (permalink / raw)
  To: 10348

`window-state-put' as used within the following functions does not work.
Please see *Backtrace* below for error.  (See also post to
help-gnu-emacs@gnu.org with subject "Save and load window states")

Steps to reproduce: 
1) Start via `emacs -Q'.
2) evaluate the two functions:
(defun my-save-frame ()
  (interactive)
  (let ((buf (find-file-noselect "/tmp/emacs-layout")))
    (set-buffer buf)
    (erase-buffer)
    (print (window-state-get) buf)
    (save-buffer)
    (kill-buffer)))

(defun my-load-frame ()
  (interactive)
  (let ((buf (find-file-noselect "/tmp/emacs-layout")))
    (set-buffer buf)
    (beginning-of-buffer)
    (window-state-put (read buf))
    (kill-buffer)))

3) Do a `M-x my-save-frame' and after that `M-x my-load-frame'

Debugger entered--Lisp error: (invalid-read-syntax "#")
  read(#<buffer emacs-layout>)
  (window-state-put (read buf))
  (let ((buf (find-file-noselect "/tmp/emacs-layout"))) (set-buffer buf) (beginning-of-buffer) (window-state-put (read buf)) (save-buffer) (kill-buffer))
  my-load-frame()
  call-interactively(my-load-frame t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8
  default enable-multibyte-characters: t

Recent messages:
Wrote /tmp/emacs-layout
Quit
Mark set
window-state-put: Invalid read syntax: "#"





^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2012-01-16  9:43 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21 20:41 bug#10348: 24.0.92; Save and load window states Michael Bach
2011-12-22 17:04 ` martin rudalics
2011-12-22 17:14   ` Drew Adams
2011-12-22 21:57   ` Juri Linkov
2011-12-22 22:57     ` Juanma Barranquero
2011-12-22 23:34       ` Juri Linkov
2011-12-23 10:30         ` martin rudalics
2011-12-23 15:10           ` Drew Adams
2011-12-24 19:04             ` Juri Linkov
2011-12-23 10:30     ` martin rudalics
2011-12-23  1:03   ` Stefan Monnier
2011-12-23 10:31     ` martin rudalics
2011-12-23 11:30       ` Michael Bach
2011-12-23 21:14       ` Juri Linkov
2011-12-24  9:26         ` martin rudalics
2011-12-24 19:08           ` Juri Linkov
2011-12-25 13:57             ` martin rudalics
2011-12-24  0:07       ` Stefan Monnier
2011-12-24  9:27         ` martin rudalics
2011-12-25 11:00           ` Stefan Monnier
2011-12-25 13:58             ` martin rudalics
2011-12-25 21:36               ` Juri Linkov
2011-12-26 11:07                 ` martin rudalics
2011-12-26  0:22               ` Stefan Monnier
2011-12-26 11:07                 ` martin rudalics
2011-12-26 18:25                   ` martin rudalics
2011-12-27 23:23                     ` Stefan Monnier
2011-12-28 15:57                       ` martin rudalics
2011-12-28 23:09                         ` Stefan Monnier
2011-12-29 11:39                           ` martin rudalics
2012-01-16  9:42                       ` martin rudalics
2011-12-28  9:50                     ` martin rudalics
2011-12-24 19:17 ` Juri Linkov
2012-01-16  9:43 ` martin rudalics

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).