emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Customize ‘window-state-get/put’


From: Yuan Fu
Subject: Customize ‘window-state-get/put’
Date: Mon, 07 Oct 2019 12:19:08 -0400

I’m adding the ability to store and restore window configuration for
gdb-mi. To make it work for gdb-mi I need to change what
‘window-state-get’ save - now it saves buffers and I need to not save
buffers. That’s because the buffer names for each window will change
across gdb sessions debugging different programs. Instead of buffer
name I need to store a symbol representing the ”buffer type” of the
window. E.g., register, memory, breakpoint, etc.

So instead of

    (buffer "*scratch*"
              (selected . t)
              (hscroll . 0)
              (fringes 8 8 nil)
              (margins nil)
              (scroll-bars nil 0 t nil 0 t)
              (vscroll . 0)
              (dedicated)
              (point . #<marker at 193 in *scratch*>)
              (start . #<marker at 1 in *scratch*>))

I would store something like

    (buffer 'register)

I would just add an optional argument that handles the extraction of
buffer information and another to restore a buffer from that
information. Does it sound like a good idea?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]