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 1F85C431FAF for ; Sun, 29 Apr 2012 09:22:10 -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 WlLXnwiijnc8 for ; Sun, 29 Apr 2012 09:22:09 -0700 (PDT) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 71F74431FAE for ; Sun, 29 Apr 2012 09:22:09 -0700 (PDT) Received: by pbbrr4 with SMTP id rr4so3281086pbb.26 for ; Sun, 29 Apr 2012 09:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:user-agent:date:message-id:mime-version :content-type; bh=lD8EshTNjlY30kn/YFHqi/KrnTaY8yjx4s/dOkem/po=; b=d7HZ8XK0veqhx9YoGzkAbpElalBWJR5KTrzNQLubwODzrr/cR8wO5VPnse1EVnMkrE HIxeJsIqXAX/Onsb64fDnWewWFTLDRTC00Cj1Jf0hXHyGAZriio4CKB87rXVcBirHxY5 dJaaKDXJ0g4kXqQaaeXNMe0G2JP01hC/PbKfK68z+/Ny3ReEDvT0f+U/cq7qFwT3RxTS 7/ThH487OR8UXxO/pDw5I8kvNpG5sjH7QAIk66dBpQnb6vzwox6jG8q/XFHZaNupE7T1 LIyVGzaNvV3dmfhK/XDhuGhDNti+J/9b2ebmHEgLlNRyexPyhq+AmAjEVnEQUnjcdPGZ YX9A== Received: by 10.68.132.201 with SMTP id ow9mr1649305pbb.160.1335716527466; Sun, 29 Apr 2012 09:22:07 -0700 (PDT) Received: from driftwood (S0106001f333bc36d.cg.shawcable.net. [68.144.78.164]) by mx.google.com with ESMTPS id i1sm13216604pbv.49.2012.04.29.09.22.05 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 29 Apr 2012 09:22:06 -0700 (PDT) From: Chris Gray To: notmuch@notmuchmail.org Subject: [RFC] Use JSON in emacs interface User-Agent: Notmuch/0.12+91~gb6d1eb9 (http://notmuchmail.org) Emacs/24.0.93.1 (i486-pc-linux-gnu) Date: Sun, 29 Apr 2012 10:22:01 -0600 Message-ID: <87ty02v786.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain 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: Sun, 29 Apr 2012 16:22:10 -0000 Hi, My thinking about this arises from the fact that there is a person on one of the lists that I read who puts a semicolon after his name. Of course, this confuses the regex in notmuch-search-process-filter, which expects that the first semicolon in the string representing a thread is after all the authors. I first thought of changing the regex so that it looked for the last semicolon in the string or something like that, but that would just move the problem. (Semicolons are probably more frequent in subject lines than in author names.) So it seems to me that what is needed is for notmuch and emacs to talk with each other in a format that is unambiguously parseable. Since notmuch search already has the option of outputting to JSON, that seems like a natural fit. Emacs has an existing JSON parser, , but it doesn't appear that it is able to parse progressively, meaning that it wouldn't be able to display results as they come in from notmuch search if used as-is. My guess is that its parts could be hacked together to overcome this limitation though. Anyway, if others think this is a good idea, I'm willing to do the coding. Cheers, Chris