From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/50344 Path: main.gmane.org!not-for-mail From: Andreas Fuchs Newsgroups: gmane.emacs.gnus.general Subject: Re: message registry for Gnus Date: Mon, 24 Feb 2003 16:58:14 +0000 (UTC) Sender: owner-ding@hpc.uh.edu Message-ID: <87u1etsjil.fsf@eris.void.at> References: <4n3cn9i6kq.fsf@lockgroove.bwh.harvard.edu> <4nznopxxn5.fsf@lockgroove.bwh.harvard.edu> <4nbs11wv0q.fsf@chubby.bwh.harvard.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1046106102 3869 80.91.224.249 (24 Feb 2003 17:01:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 24 Feb 2003 17:01:42 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18nLz0-0000zs-00 for ; Mon, 24 Feb 2003 18:01:38 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18nLyd-0003kU-00; Mon, 24 Feb 2003 11:01:15 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 24 Feb 2003 11:02:15 -0600 (CST) Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id LAA06444 for ; Mon, 24 Feb 2003 11:02:03 -0600 (CST) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18nLws-0000pf-00 for ; Mon, 24 Feb 2003 17:59:26 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@hpc.uh.edu Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18nLvi-0000jU-00 for ; Mon, 24 Feb 2003 17:58:14 +0100 Original-Lines: 34 Original-X-Complaints-To: usenet@main.gmane.org Mail-Copies-To: never X-Url: http://asf.void.at/ X-Attribution: asf X-Face: 3*3w/y?I6|`'CYW7F~m0]U1)L\|[x"?/V6^;s3FU#q|F'AL(3C?$eslHvAmR:KjT"&LZeqM 0wMS%HM` Cancel-Lock: sha1:yR4OJOSeyYM3SDLsNzpZw8xbeFY= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:50344 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:50344 Today, Ted Zlatanov wrote: > Could something like hashtable-to-alist-string and > hashtable-from-alist-string be added to the Gnus core? It would make > my life easier, and I'm definitely not the person to write reliable > versions of these functions :) Me neither, but will these help: (defun alist-to-hashtable (alist) "Build a hashtable from the values in ALIST." (let ((ht (make-hash-table))) (mapc (lambda (kv-pair) (puthash (car kv-pair) (cdr kv-pair) ht)) alist) ht)) (defun hashtable-to-alist (hash) "Build an alist from the values in HASH." (let ((list nil)) (maphash (lambda (key value) (setq list (cons (cons key value) list)))))) ;;? You will of course have to use (read) and (format) accordingly. (-: > Serialization would be a wonderful feature for Emacs Lisp in general. Absolutely. Have fun, -- Andreas Fuchs, , asf@jabber.at, antifuchs irc.freenode.net's #emacs - online emacs advice from IRC addicts