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 1875B431FAF for ; Mon, 30 Apr 2012 20:36:33 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 n+MA4nb9pleJ for ; Mon, 30 Apr 2012 20:36:31 -0700 (PDT) Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D03E5431FAE for ; Mon, 30 Apr 2012 20:36:30 -0700 (PDT) Received: by lahc1 with SMTP id c1so2615321lah.26 for ; Mon, 30 Apr 2012 20:36:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=YLOzDXA+eIamYDOB86S9o+UZn/brqCfn1ff4oNtbFH0=; b=oN1oCCuyOL/Re3D2DFnjuCFe/obfb01R4Od8ODRsz9GUrkBahctEt6uKvBkJxvgRCO gVuQbdLbJBe0HVlxefOCJdYHwX9D4bF6DEn9KGReAOkvGpkcPIFvehn1XF4ABfF74SM9 htO33ZOA86cFURvu2ZtZZp/LUExNVHTB6RCdtr81fFu1Loo9Vne9tpoESGQwI9n1K1LU 4H1r32GFxza7YANsRWSE1RW8V0o0mT9vGGGjQ90tbcotDHlcyqDTsLLARfUtrVNYJC02 pXafnGxKLybjZQAiICQkLbNt/rGH6bpQLtEG9X0BZ0fWb03V5vYIkhk+qKqpgoP1/5Op YWgw== MIME-Version: 1.0 Received: by 10.152.112.97 with SMTP id ip1mr21876103lab.31.1335843389014; Mon, 30 Apr 2012 20:36:29 -0700 (PDT) Sender: awg@xvx.ca Received: by 10.112.82.163 with HTTP; Mon, 30 Apr 2012 20:36:28 -0700 (PDT) X-Originating-IP: [96.52.216.56] In-Reply-To: <874ns15fky.fsf@steelpick.2x.cz> References: <87ehr55knx.fsf@steelpick.2x.cz> <874ns15fky.fsf@steelpick.2x.cz> Date: Mon, 30 Apr 2012 21:36:28 -0600 X-Google-Sender-Auth: D7Hu99-8OuktoKBbG9-m-uL_WTU Message-ID: Subject: Re: JSON readtable error when replying From: Adam Wolfe Gordon To: Michal Sojka Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkGZKIdL6ZXNXtiiSEvlASxk3EWN4JpXLAAbyIMlCaW4pzFOV3UN/uvfyO1OR/rjeVKQm1J Cc: notmuch 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: Tue, 01 May 2012 03:36:33 -0000 On Mon, Apr 30, 2012 at 10:50, Michal Sojka wrote: > json_xs didn't complain, but I've found that notmuch outputs > =A0Failed to verify signed part: Cannot verify multipart/signed part: uns= upported signature protocol 'application/x-pkcs7-signature'. > to stderr before the json output and emacs tries to parse > stderr. Emacs then complains about not finding "F" in json-readtable. > > The following patch fixes the problem for me, but I do not know if it is > a good thing to throw away the stderr output of notmuch. > > diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el > index 87bd88d..49db603 100644 > --- a/emacs/notmuch-mua.el > +++ b/emacs/notmuch-mua.el > @@ -113,7 +113,7 @@ list." > > =A0 =A0 ;; Get the reply object as JSON, and parse it into an elisp objec= t. > =A0 =A0 (with-temp-buffer > - =A0 =A0 =A0(apply 'call-process (append (list notmuch-command nil (list= t t) nil) args)) > + =A0 =A0 =A0(apply 'call-process (append (list notmuch-command nil (list= t nil) nil) args)) > =A0 =A0 =A0 (goto-char (point-min)) > =A0 =A0 =A0 (let ((json-object-type 'plist) > =A0 =A0 =A0 =A0 =A0 =A0(json-array-type 'list) > > Comments? Good catch. I'm not sure what (if anything) we want to do with the stderr output, but putting it in the buffer with the JSON is definitely not the right thing. Your fix looks fine to me - would you mind doing a commit and sending a patch to the list? David, it would probably be good to get this (pretty trivial) fix in before 0.13, since it will include the JSON reply stuff. -- Adam