From: Ethan Glasser-Camp Date: Wed, 24 Oct 2012 01:36:52 +0000 (+2000) Subject: Re: [PATCH v3 2/3] emacs: Rename incremental JSON internal variables. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=92a1ae5b78180c9eab878026fd769074363e594b;p=notmuch-archives.git Re: [PATCH v3 2/3] emacs: Rename incremental JSON internal variables. --- diff --git a/81/5192d23058dd416057441781b0b3ca763bcbbe b/81/5192d23058dd416057441781b0b3ca763bcbbe new file mode 100644 index 000000000..e88e15caa --- /dev/null +++ b/81/5192d23058dd416057441781b0b3ca763bcbbe @@ -0,0 +1,111 @@ +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 85728431FAF + for ; Tue, 23 Oct 2012 18:37:00 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +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 6e6t--ZmSLPA for ; + Tue, 23 Oct 2012 18:36:59 -0700 (PDT) +Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com + [209.85.212.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 33F1D431FAE + for ; Tue, 23 Oct 2012 18:36:59 -0700 (PDT) +Received: by mail-vb0-f53.google.com with SMTP id fc21so5028vbb.26 + for ; Tue, 23 Oct 2012 18:36:57 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type; + bh=i6shZUBWKoWPxYBb7CsVdQ9BSxSeTWY69sMo2G3cv9g=; + b=aeoLJzYfk2X6PC8XhbBVen7hH8ApCP5AG2fUv5SRvMWoHmUbtUR5C/UPrnDJ16Vkir + cAXfg9ZUHWpifga2VO1jmq7tuxH/BsImSyfr+5a6xJVjppacXVC2RRlX+mmrN10TJ+Jz + m6TbFyh6aWbJxN2ueVVPtnfquaJkUjqgDXJxD/RQu5LqHzpsp4oe1O9XUCGx/vjhVynp + 6EzKbhNJH8MvRSalcAdL5SPeEYvilQxrfMWn4kAxg41o/OgsogPvedCsTigld5RZm5g0 + dNY3gkSKkMWkURBzgQB1bW8dBozAA8k9guvqSG0gWXYBzeWF+3v1VyHjZgI3WXKriIhW + Sq0g== +Received: by 10.58.137.229 with SMTP id ql5mr26724968veb.11.1351042617357; + Tue, 23 Oct 2012 18:36:57 -0700 (PDT) +Received: from smtp.gmail.com (p70-80.acedsl.com. [66.114.70.80]) + by mx.google.com with ESMTPS id q7sm7615899vdw.22.2012.10.23.18.36.55 + (version=TLSv1/SSLv3 cipher=OTHER); + Tue, 23 Oct 2012 18:36:56 -0700 (PDT) +From: Ethan Glasser-Camp +To: Mark Walters , notmuch@notmuchmail.org +Subject: Re: [PATCH v3 2/3] emacs: Rename incremental JSON internal variables. +In-Reply-To: <1351037602-11157-3-git-send-email-markwalters1009@gmail.com> +References: <1351037602-11157-1-git-send-email-markwalters1009@gmail.com> + <1351037602-11157-3-git-send-email-markwalters1009@gmail.com> +User-Agent: Notmuch/0.14+45~g6ea9330 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Tue, 23 Oct 2012 21:36:52 -0400 +Message-ID: <876260k5vv.fsf@betacantrips.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +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: Wed, 24 Oct 2012 01:37:00 -0000 + +Mark Walters writes: + +> This patch just renames the internal variables for the JSON parser now +> it is no longer specific to search mode. It also fixes up the white +> space after the previous patch. There should be no functional changes. + +This series looks very good to me. I still have a couple of quibbles that I wouldn't say +should hold the series up. First, your commit messages have periods at +the end of the first line. I think it is considered good practice that +they not (see, e.g., +http://blogs.gnome.org/danni/2011/10/25/a-guide-to-writing-git-commit-messages/ ). + +> -(defvar notmuch-search-process-state nil +> - "Parsing state of the search process filter.") +> +(defvar notmuch-json-state nil +> + "State of the internal JSON parser.") + +How about, + +"State of the shared JSON parser. + +This variable will be a symbol, corresponding to the state of the JSON +parser's state machine. 'begin means we haven't yet entered a JSON +list. 'result means we are ready to parse a JSON object. 'end means we +have exited the JSON list." + +(Or whatever the correct meanings of the parser's states are...) + +> -(defvar notmuch-search-json-parser nil +> - "Incremental JSON parser for the search process filter.") +> +(defvar notmuch-json-parser nil +> + "Internal Incremental JSON parser Object.") + +How about, + +"Shared notmuch JSON parser object, as created by +(notmuch-json-create-parser). + +Any notmuch code can parse part of a JSON list object by setting this +variable to their JSON parser and calling +notmuch-json-parse-partial-list (which see)." + +(Or whatever one is supposed to do with the parser object...) + +Ethan