all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Phillip Lord <phillip.lord@newcastle.ac.uk>
Subject: Re: Package for data serialization?
Date: Tue, 13 Jun 2006 17:02:11 +0100	[thread overview]
Message-ID: <ufyi9t56k.fsf@newcastle.ac.uk> (raw)
In-Reply-To: 1150195170.157848.7260@f6g2000cwb.googlegroups.com

>>>>> "anon" == spamfilteraccount  <spamfilteraccount@gmail.com> writes:

  anon> Is there a package for de/serializing an arbitrary elisp data
  anon> structure, so that it can be read/written in binary format
  anon> from/to disk?

  anon> I know about prin1 and co., but they create a printed
  anon> representation and I want binary for speed and size.


As far as I know, this doesn't work in general. Not all lisp objects
have an output representation that can then by eval'd back in; the
most obvious one for me is the hash-table which is a pain. I can
understand why objects such as a frame or a window can't be
serialised, but not a hash. 

However, as far as I can tell Emacs does the have the ability to store
arbitrary elisp data items -- this is what `dump-emacs' does for
example. I wonder how hard it would be to extend this system so that
it could cope with arbitrary bits of the current state. It would be
quite useful. 

Incidentally, the printed representation is not bad. Emacs is pretty
quick at parsing lisp code, even large data structures, for purposes
of an eval.

Cheers

Phil

  parent reply	other threads:[~2006-06-13 16:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-13 10:39 Package for data serialization? spamfilteraccount
2006-06-13 11:13 ` Pascal Bourguignon
2006-06-13 13:04 ` Ted Zlatanov
2006-06-13 13:37   ` Pascal Bourguignon
2006-06-13 16:02 ` Phillip Lord [this message]
2006-06-13 17:57 ` Eli Zaretskii
     [not found] ` <mailman.2851.1150221485.9609.help-gnu-emacs@gnu.org>
2006-06-13 18:38   ` spamfilteraccount
2006-06-13 18:48     ` Eli Zaretskii
     [not found]     ` <mailman.2854.1150224536.9609.help-gnu-emacs@gnu.org>
2006-06-14 10:27       ` Phillip Lord

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=ufyi9t56k.fsf@newcastle.ac.uk \
    --to=phillip.lord@newcastle.ac.uk \
    /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.