From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: How to persist registers across sessions? Date: Sat, 2 Jul 2022 11:46:49 +0300 Message-ID: References: <83y1xe45ga.fsf@gnu.org> <83bkuaf8e5.fsf@gnu.org> <83zghte5gl.fsf@gnu.org> <83v8she1vp.fsf@gnu.org> <83tu80cb54.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5363"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/+ () (2022-05-21) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 02 10:56:51 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o7Yvr-0001DJ-8E for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 02 Jul 2022 10:56:51 +0200 Original-Received: from localhost ([::1]:41628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7Yvp-0002jy-Pn for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 02 Jul 2022 04:56:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7YvJ-0002jq-Rd for help-gnu-emacs@gnu.org; Sat, 02 Jul 2022 04:56:18 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:43443) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7YvH-0001aJ-NO; Sat, 02 Jul 2022 04:56:17 -0400 Original-Received: from localhost ([::ffff:102.87.107.124]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000087C50.0000000062C0082C.00002DF7; Sat, 02 Jul 2022 01:56:12 -0700 Mail-Followup-To: Eli Zaretskii , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <83tu80cb54.fsf@gnu.org> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138253 Archived-At: * Eli Zaretskii [2022-07-02 08:55]: > > Date: Fri, 1 Jul 2022 15:27:20 +0300 > > From: Jean Louis > > Cc: help-gnu-emacs@gnu.org > > > > * Eli Zaretskii [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 # 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/