all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to persist registers across sessions?
Date: Fri, 01 Jul 2022 10:19:22 +0300	[thread overview]
Message-ID: <83v8she1vp.fsf@gnu.org> (raw)
In-Reply-To: <Yr6cMeXyQtrcQ+B7@protected.localdomain> (message from Jean Louis on Fri, 1 Jul 2022 10:03:13 +0300)

> Date: Fri, 1 Jul 2022 10:03:13 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: help-gnu-emacs@gnu.org
> 
> So I try this way:
> 
> (prin1-to-string (window-state-get (get-buffer-window))) ⇒ "(((min-height . 4) (min-width . 10) (min-height-ignore . 3) (min-width-ignore . 6) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 76) (min-pixel-width . 100) (min-pixel-height-ignore . 57) (min-pixel-width-ignore . 60) (min-pixel-height-safe . 19) (min-pixel-width-safe . 20)) leaf (pixel-width . 1592) (pixel-height . 779) (total-width . 159) (total-height . 41) (normal-height . 1.0) (normal-width . 1.0) (parameters (clone-of . #<window 2515 on mutt-protected-1001-4153-16793396821956371330>)) (buffer #<buffer mutt-protected-1001-4153-16793396821956371330> (selected . t) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 2 t nil 0 t nil) (vscroll . 0) (dedicated) (point . #<marker at 1892 in mutt-
 protected-1001-4153-16793396821956371330>) (start . #<marker at 1065 in mutt-protected-1001-4153-16793396821956371330>)) (prev-buffers (#<buffer mutt-protected-1001-4153-16793396821956371330> #<marker at 1 in mutt-protected-1001-4153-16793396821956371330> #<marker at 2287 in mutt-protected-1001-4153-16793396821956371330>) (#<buffer Downloads> #<marker at 1164 in Downloads> #<marker at 1715 in Downloads>)))"
> 
> But I cannot read it back:

I don't think you described what exactly you'd like to do with the
window config information.  So the answers you get don't satisfy your
needs, because you didn't describe those needs in sufficient detail.

> > Another possibility is to use frameset-save.  (Not surprisingly,
> > desktop.el already uses it.)
> 
> I have been testing, I see the output of below command, and it looks
> like it does what it says, saving frameset.
> 
> (frameset-save (frame-list)) 
> 
> It should be possible to "read" back from there:
> 
> (read-from-string (prin1-to-string (frameset-save (frame-list))))
> 
> However, I get this error:
> 
> eval: Invalid read syntax: "#" probably because somewhere inside I find this:

If you want to restore the configuration recorded by frameset-save,
you should use frameset-restore.

> However, frame set is not what I meant, as it also contains many
>  variables and what other not necessary information.
> 
> I meant window set, not a frame set.

Windows belong to frames.  Any window-configuration data is
meaningless without the corresponding frame data.



  reply	other threads:[~2022-07-01  7:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27  3:24 How to persist registers across sessions? Pankaj Jangid
2022-06-27 12:01 ` Michael Heerdegen
2022-06-28 18:03 ` Jean Louis
2022-06-29 15:35 ` Visuwesh
2022-06-30 12:50   ` Jean Louis
2022-06-30 13:55     ` Michael Heerdegen
2022-06-30 14:00     ` Eli Zaretskii
2022-06-30 14:23       ` Michael Heerdegen
2022-06-30 15:50         ` Eli Zaretskii
2022-06-30 14:33       ` Jean Louis
2022-06-30 16:01         ` Eli Zaretskii
2022-06-30 21:55           ` Jean Louis
2022-07-01  6:02             ` Eli Zaretskii
2022-07-01  7:03               ` Jean Louis
2022-07-01  7:19                 ` Eli Zaretskii [this message]
2022-07-01 12:27                   ` Jean Louis
2022-07-02  5:54                     ` Eli Zaretskii
2022-07-02  8:46                       ` Jean Louis
2022-07-02  9:04                         ` Eli Zaretskii
2022-07-02 17:19                           ` Jean Louis
2022-07-02 17:40                             ` Eli Zaretskii
2022-07-02 18:03                               ` Jean Louis
2022-07-02 18:42                                 ` Eli Zaretskii
2022-07-02 18:52                                   ` Jean Louis
2022-07-03  5:02                                     ` Eli Zaretskii
2022-07-01 14:29                 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-07-01 16:07                 ` [External] : " Drew Adams
2022-07-02 11:00       ` Pankaj Jangid
2022-07-02 11:48         ` Eli Zaretskii
2022-07-04  3:26           ` Pankaj Jangid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83v8she1vp.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.