help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: print hash table to disk and reread in hash table


From: Thierry Volpiatto
Subject: Re: print hash table to disk and reread in hash table
Date: Thu, 28 Aug 2008 07:21:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]