* Serializing Lisp Objects
@ 2009-06-08 18:05 Nordlöw
2009-06-09 9:25 ` Pascal J. Bourguignon
0 siblings, 1 reply; 2+ messages in thread
From: Nordlöw @ 2009-06-08 18:05 UTC (permalink / raw)
To: help-gnu-emacs
How do I serialize (encode) and unserialize (decode) an arbitrary
elisp object (code or data) to and from disk/network etc?
Can I use other format than the symbolic one?
Thanks in advance,
Per Nordlöw
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Serializing Lisp Objects
2009-06-08 18:05 Serializing Lisp Objects Nordlöw
@ 2009-06-09 9:25 ` Pascal J. Bourguignon
0 siblings, 0 replies; 2+ messages in thread
From: Pascal J. Bourguignon @ 2009-06-09 9:25 UTC (permalink / raw)
To: help-gnu-emacs
Nordlöw <per.nordlow@gmail.com> writes:
> How do I serialize (encode) and unserialize (decode) an arbitrary
> elisp object (code or data) to and from disk/network etc?
(defun encode-to-string (object) (prin1-to-string object))
(defun decode-from-string (string) (read-from-string string))
Now, of course, this works only for objects that are printable
readably.
> Can I use other format than the symbolic one?
Yes, but you will have to implement the serializer yourself.
--
__Pascal Bourguignon__
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-09 9:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-08 18:05 Serializing Lisp Objects Nordlöw
2009-06-09 9:25 ` Pascal J. Bourguignon
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.