From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: Xah <xahlee@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: print hash table to disk and reread in hash table
Date: Thu, 28 Aug 2008 07:21:41 +0200 [thread overview]
Message-ID: <87od3dbtp6.fsf@tux.homenetwork> (raw)
In-Reply-To: <34f9604c-a23b-4ad9-9c84-f45884a6df23@x16g2000prn.googlegroups.com> (Xah's message of "Wed, 27 Aug 2008 18:01:58 -0700 (PDT)")
Xah <xahlee@gmail.com> writes:
> if i have a hash table in elisp, is there a way to save it to disk and
> reread in when starting emacs?
What you can do is creating a named hash-table at each time you start
emacs and load a file containing (puthash that...) (puthash this...)
etc... Here an example of one of my files:
,----
| ;;; dvc-bookmarks-cache -*- mode: emacs-lisp; coding: utf-8; -*-
| (puthash 'MAIL '((color . dvc-excluded) (state . "open") (time-stamp . "2008.06.23")) dvc-bookmarks-cache)
| (puthash 'CONFIG '((color . dvc-source) (state . "open") (time-stamp . "2008.06.23")) dvc-bookmarks-cache)
| (puthash 'DVC '((color . dvc-mark) (state . "open") (time-stamp . "2008.08.15")) dvc-bookmarks-cache)
| (puthash 'SOURCES '((color . dvc-unknown) (state . "open") (time-stamp . "2008.06.23")) dvc-bookmarks-cache)
`----
The hash-table here is `dvc-bookmark-cache'
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France
next prev parent reply other threads:[~2008-08-28 5:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-28 1:01 print hash table to disk and reread in hash table Xah
2008-08-28 5:21 ` Thierry Volpiatto [this message]
[not found] ` <mailman.17732.1219901096.18990.help-gnu-emacs@gnu.org>
2008-08-28 5:27 ` Xah
2008-08-28 6:17 ` Thierry Volpiatto
2008-08-28 14:03 ` Ted Zlatanov
2008-08-28 18:10 ` Eli Zaretskii
[not found] ` <mailman.17796.1219947087.18990.help-gnu-emacs@gnu.org>
2008-08-29 14:06 ` Ted Zlatanov
2008-08-29 14:52 ` Eli Zaretskii
[not found] ` <mailman.17897.1220021571.18990.help-gnu-emacs@gnu.org>
2008-08-29 18:10 ` Ted Zlatanov
2008-08-28 8:36 ` Niels Giesen
2008-10-10 20:38 ` harven
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87od3dbtp6.fsf@tux.homenetwork \
--to=thierry.volpiatto@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=xahlee@gmail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).