From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcelo de Moraes Serpa Newsgroups: gmane.emacs.help Subject: Re: Saving a elisp data structure into string and evaluating it back into objects Date: Wed, 7 Oct 2009 10:09:58 -0500 Message-ID: <1e5bcefd0910070809w2c985363p3bf90e5490342991@mail.gmail.com> References: <1e5bcefd0910061608y54755a7ejbf5def5831443da7@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001636c92ae57fb8f4047559bdb8 X-Trace: ger.gmane.org 1254929380 29209 80.91.229.12 (7 Oct 2009 15:29:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 Oct 2009 15:29:40 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Kevin Rodgers Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 07 17:29:31 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MvYSH-0006rz-NI for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Oct 2009 17:29:30 +0200 Original-Received: from localhost ([127.0.0.1]:49270 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvYSH-0004i6-49 for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Oct 2009 11:29:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvY9V-0005vZ-Oq for help-gnu-emacs@gnu.org; Wed, 07 Oct 2009 11:10:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvY9S-0005s0-0d for help-gnu-emacs@gnu.org; Wed, 07 Oct 2009 11:10:05 -0400 Original-Received: from [199.232.76.173] (port=55090 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvY9R-0005re-Fh for help-gnu-emacs@gnu.org; Wed, 07 Oct 2009 11:10:01 -0400 Original-Received: from mail-yx0-f202.google.com ([209.85.210.202]:64770) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvY9Q-0005tU-Rm for help-gnu-emacs@gnu.org; Wed, 07 Oct 2009 11:10:01 -0400 Original-Received: by yxe40 with SMTP id 40so5202053yxe.28 for ; Wed, 07 Oct 2009 08:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=7+UoNEENx5sy/SV3aJRLUI/rre9Jodg7kX9AxvMp62I=; b=T7FUzBU+I+i5x9XTSDnoK9hYSdsctQq6Ho8DEd4nsY2be8+fNSvtpowKyWobtqDPdA 50g1QariSgvBbsYPx/qouWpZvG3IQFmyS3zDS9NViMGDqPr3DZ9uklqoqSmuVgo5SOtR 87AkqhtWOnQzj4cPsP9v5p0OxddexbjWgCWwM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=H3dp12KHnZctV2In24SZiuTBIIftk2IDOFJsfGcQMvA7ouKbuXFVhYjjVr1/vQcMrS HsbmtCy4Sv24oHPd3n0wgAf9jrFCm74BKX8e69nkFZU8/GXlG+Ozqy2iSmfQQcbNYK6R S9ZRIstbnNpMvzwGafU3FLR4Eh9WpmnzkYnak= Original-Received: by 10.101.191.17 with SMTP id t17mr6845anp.87.1254928198645; Wed, 07 Oct 2009 08:09:58 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:68729 Archived-At: --001636c92ae57fb8f4047559bdb8 Content-Type: text/plain; charset=ISO-8859-1 Thank you all for taking your time to reply! @Kevin: I've added "layout-configuration-alist" to this var, and indeed, it saved, but here's what it wrote: (setq layout-configuration-alist '(("Unprintable entity" "Unprintable > entity" ("Unprintable entity" . "revive.el")) ("Unprintable entity" > "Unprintable entity" ("Unprintable entity" . "dot.emacs.el") ("Unprintable > entity" . "dot.emacs.el")))) > "Unprintable entity". Any way I could fix it from the top of your head? @Pascal: Thanks for the comprehensive answer! An alternative would be not to try to save EVERYTHING, but only what > really matters to you, taking care of saving only readably printable > objects, or for which you write a serialization/deserialization > function pair. > Well, you are absolutely right -- actually, the only thing that interests me is saving and restoring the value of "layout-configuration-alist", so I can have my buffer-indexed window layouts persisted. How could I go and write a serialization/deserialization function pair? And where would I integrate it? Thanks, Marcelo. On Wed, Oct 7, 2009 at 7:57 AM, Kevin Rodgers wrote: > Marcelo de Moraes Serpa wrote: > >> Hello list, >> >> I'm trying to combine DeskTop, layout-restore.el and revive.el to create >> the ultimate persistence experience :) >> >> Well, what I'm trying to do is, every time I exit emacs, the whole memory >> state (elisp object's tree) will be dumped to a file and reloaded when I >> restart emacs again. >> >> Why am I trying to do this? Well, there are many settings in emacs that >> are volatile, many vars that are not saved. I know that emacs has the >> capability to save its vars into .emacs, but this depends on the mode and >> the var, no? >> > > C-h v desktop-globals-to-save > C-h v desktop-locals-to-save > > -- > Kevin Rodgers > Denver, Colorado, USA > > > > --001636c92ae57fb8f4047559bdb8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thank you all for taking your time to reply!

@Kevin: I've added = "layout-configuration-alist" to this var, and indeed, it saved, b= ut here's what it wrote:

(setq layout-configuration-alist '(("Unprintable entity" &quo= t;Unprintable entity" ("Unprintable entity" . "revive.e= l")) ("Unprintable entity" "Unprintable entity" (&= quot;Unprintable entity" . "dot.emacs.el") ("Unprintabl= e entity" . "dot.emacs.el"))))

"Unprintable entity". Any way I could fix it fro= m the top of your head?

@Pascal: Thanks for the comprehensive answer= !

An alternative would be not to try to save EVERYTHING, but only what
really matters to you, taking care of saving only readably printable
objects, or for which you write a serialization/deserialization
function pair.

Well, you are absolutely right -- a= ctually, the only thing that interests me is saving and restoring the value= of "layout-configuration-alist", so I can have my buffer-indexed= window layouts persisted.

How could I go and write a serialization/deserialization function pair?= And where would I integrate it?

Thanks,

Marcelo.
<= br>
On Wed, Oct 7, 2009 at 7:57 AM, Kevin Rodgers= <kevin.d= .rodgers@gmail.com> wrote:
Marcelo de Moraes Serpa wrote:
Hello list,

I'm trying to combine DeskTop, layout-restore.el and revive.el to creat= e the ultimate persistence experience :)

Well, what I'm trying to do is, every time I exit emacs, the whole memo= ry state (elisp object's tree) will be dumped to a file and reloaded wh= en I restart emacs again.

Why am I trying to do this? Well, there are many settings in emacs that are= volatile, many vars that are not saved. I know that emacs has the capabili= ty to save its vars into .emacs, but this depends on the mode and the var, = no?

C-h v desktop-globals-to-save
C-h v desktop-locals-to-save

--
Kevin Rodgers
Denver, Colorado, USA




--001636c92ae57fb8f4047559bdb8--