help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to persist registers across sessions?


From: Jean Louis
Subject: Re: How to persist registers across sessions?
Date: Sat, 2 Jul 2022 11:46:49 +0300
User-agent: Mutt/+ () (2022-05-21)

* Eli Zaretskii <eliz@gnu.org> [2022-07-02 08:55]:
> > Date: Fri, 1 Jul 2022 15:27:20 +0300
> > From: Jean Louis <bugs@gnu.support>
> > Cc: help-gnu-emacs@gnu.org
> > 
> > * Eli Zaretskii <eliz@gnu.org> [2022-07-01 10:20]:
> > > 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.
> > 
> > I wish to save window configuration as Lisp object. I wish to be able
> > to transform window configuration by using prin1-to-string so that I
> > can later read-from-string and store it back to register.
> 
> For what purpose? how would you like to use the stored Lisp object in
> your Emacs sessions?

I am Hyperbole user so this is how I store within session a named
window configuration: {C-h h w a My-Conf RET} and this is how I
restore it {C-h h w r My-Conf RET}, and it does not last over
sessions. There is plan by Hyperbole author to make it.

Compare that flow to desktop.el and you will understand that there is
speed and efficiency in saving window configuration and restoring
it. There can be multiple window configurations. With few keys I may
get access to it.

However, all what I can see in there is #<window-configuration> so I
do not know how to get Lisp data where it will be said which window
belongs to which file, and how windows are split. That is why I am
asking you about it. 

Maybe such Lisp data about window configuration does not exist.

In desktop.el I can see that it generates lisp as string pieces to
write it to desktop.el and I would prefer not that but Lisp data.

Purpose is to isolate that information and become able to store it on
file or inside of the database, so that I can use a key to set some of
preset window configurations from session to session and in quick
manner.

Desktop.el saves everything, and offers directory to user to save
it. Saving hundreds of buffers takes long time and loading desktop
again simply does not work on my side. My buffers are many, like now
there is 795 buffers. Then it starts first that I have to confirm
variables, then I see million messages how some directories do not
exist as Dired was accessing mounted disks, it really takes long
time. From 795 buffers, I get 294 buffers.

It is definitely NOT that what I want, it is not practical.

What I want is:

1) Having 3-5 buffers in specific window configuration. Regardless of
   other buffers, I wish to be able to restore such window
   configuration. 

2) Having possibility to save multiple such window configurations and
   quickly with minimum keys or with menu get access to it.

If at least I get clue how to get the split parameters of a frame,
modes, its sizes of windows, as Lisp data, then I would be fine with
it, and then I can myself assign something to those buffers. My
buffers are too often buffers related to database, table, column and
ID and do not have files attached.

Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/








reply via email to

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