Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serializing an emacs lisp hash to file

Tags:

emacs

elisp

In emacs lisp, is there a way to serialize a hash table to a file in and then reading it again at a later time?

Thanks

like image 380
simao Avatar asked Jul 31 '12 16:07

simao


1 Answers

This is easily possible since Emacs 23.2 or so. Check with

(featurep 'hashtable-print-readable)

If this returns t, you can simply prin1 a hashtable to a buffer, save it and read it later.

like image 117
pokita Avatar answered Oct 11 '22 11:10

pokita