From dbca6610d89d54d96d9026297f4661e8cb6da35d Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 12 Nov 2010 17:34:50 +1600 Subject: [PATCH] Re: Strings vs symbols in notmuch-search-result-format --- 6f/b7b4f810af6cf297c9b5c53b0736cd05ab8439 | 88 +++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 6f/b7b4f810af6cf297c9b5c53b0736cd05ab8439 diff --git a/6f/b7b4f810af6cf297c9b5c53b0736cd05ab8439 b/6f/b7b4f810af6cf297c9b5c53b0736cd05ab8439 new file mode 100644 index 000000000..c72981d41 --- /dev/null +++ b/6f/b7b4f810af6cf297c9b5c53b0736cd05ab8439 @@ -0,0 +1,88 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 0A46F40DBE4 + for ; Thu, 11 Nov 2010 17:35:02 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.89 +X-Spam-Level: +X-Spam-Status: No, score=-2.89 tagged_above=-999 required=5 + tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, T_MIME_NO_TEXT=0.01] + autolearn=ham +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 0MYP9APYVqhu; Thu, 11 Nov 2010 17:34:50 -0800 (PST) +Received: from yoom.home.cworth.org (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id A111940DBE8; + Thu, 11 Nov 2010 17:34:50 -0800 (PST) +Received: by yoom.home.cworth.org (Postfix, from userid 1000) + id 4BF7925412B; Thu, 11 Nov 2010 17:34:50 -0800 (PST) +From: Carl Worth +To: Rob Browning , notmuch@notmuchmail.org +Subject: Re: Strings vs symbols in notmuch-search-result-format +In-Reply-To: <87mxrnn964.fsf@raven.defaultvalue.org> +References: <87mxrnn964.fsf@raven.defaultvalue.org> +User-Agent: Notmuch/0.4 (http://notmuchmail.org) Emacs/23.2.1 + (i486-pc-linux-gnu) +Date: Thu, 11 Nov 2010 17:34:50 -0800 +Message-ID: <878w0zmiit.fsf@yoom.home.cworth.org> +MIME-Version: 1.0 +Content-Type: multipart/signed; boundary="=-=-="; + micalg=pgp-sha1; protocol="application/pgp-signature" +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 12 Nov 2010 01:35:02 -0000 + +--=-=-= +Content-Transfer-Encoding: quoted-printable + +On Sat, 11 Sep 2010 18:37:55 -0500, Rob Browning wro= +te: +> I've started to look at the elisp, and wondered why +> notmuch-search-result-format expected strings rather than symbols for +> the field names, i.e.: +... +> Perhaps there's a good argument for strings, but if not, the latter is +> more idiomatic, and a bit more efficient too (comparisons will just be +> pointer compares (via assq) rather than something like a strcmp (assoc)). + + +I'm not sure that this is my code. But I do know that most of the emacs +lisp code I've written is very non-idiomatic and without good +justification. + +Please don't look at my elisp code and assume it is sane at all. I'm +looking forward to the day where "git blame -- emacs/*.el" doesn't show +my name at all... + +Said another way, please feel free to post improvements for any strange +elisp you see, (C code too, of course). + +=2DCarl + +=2D-=20 +carl.d.worth@intel.com + +--=-=-= +Content-Type: application/pgp-signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.10 (GNU/Linux) + +iD8DBQFM3Jm66JDdNq8qSWgRAnpwAKCTsvGL91PmrD1T2XYyqvxMkJn85QCfZyvd +ALZ0nGS5M9PoOT47eebSvgk= +=5hjE +-----END PGP SIGNATURE----- +--=-=-=-- -- 2.26.2