From: Michal Sojka Date: Mon, 30 Apr 2012 16:50:37 +0000 (+0200) Subject: Re: JSON readtable error when replying X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=828fbefa1044f7758e0fa1213a1704e55a7ca7df;p=notmuch-archives.git Re: JSON readtable error when replying --- diff --git a/f3/b11ddd90879e03e08d0530a6d5b6dc5874dc4e b/f3/b11ddd90879e03e08d0530a6d5b6dc5874dc4e new file mode 100644 index 000000000..23f332299 --- /dev/null +++ b/f3/b11ddd90879e03e08d0530a6d5b6dc5874dc4e @@ -0,0 +1,107 @@ +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 795D5431FAF + for ; Mon, 30 Apr 2012 09:50:41 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] 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 Ar0exxnju47u for ; + Mon, 30 Apr 2012 09:50:39 -0700 (PDT) +Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) + by olra.theworths.org (Postfix) with ESMTP id A5C5E431FAE + for ; Mon, 30 Apr 2012 09:50:39 -0700 (PDT) +Received: from localhost (unknown [192.168.200.4]) + by max.feld.cvut.cz (Postfix) with ESMTP id 8A52819F3345; + Mon, 30 Apr 2012 18:50:38 +0200 (CEST) +X-Virus-Scanned: IMAP AMAVIS +Received: from max.feld.cvut.cz ([192.168.200.1]) + by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, + port 10044) + with ESMTP id moR47koeN7Pq; Mon, 30 Apr 2012 18:50:37 +0200 (CEST) +Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) + by max.feld.cvut.cz (Postfix) with ESMTP id 2FED219F3343; + Mon, 30 Apr 2012 18:50:37 +0200 (CEST) +Received: from steelpick.2x.cz (note-sojka.felk.cvut.cz [147.32.86.30]) + (Authenticated sender: sojkam1) + by imap.feld.cvut.cz (Postfix) with ESMTPSA id 1BDA3660968; + Mon, 30 Apr 2012 18:50:37 +0200 (CEST) +Received: from wsh by steelpick.2x.cz with local (Exim 4.77) + (envelope-from ) + id 1SOto5-0002mx-2Q; Mon, 30 Apr 2012 18:50:37 +0200 +From: Michal Sojka +To: Adam Wolfe Gordon +Subject: Re: JSON readtable error when replying +In-Reply-To: + +References: <87ehr55knx.fsf@steelpick.2x.cz> + +User-Agent: Notmuch/0.12+154~g2d13a18 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Mon, 30 Apr 2012 18:50:37 +0200 +Message-ID: <874ns15fky.fsf@steelpick.2x.cz> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +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: Mon, 30 Apr 2012 16:50:41 -0000 + +Hi Adam, + +Adam Wolfe Gordon writes: +> On Mon, Apr 30, 2012 at 09:00, Michal Sojka wrote: +>> when I try to reply within emacs to a particular message, I get "JSON +>> readtable error". This happens with with the current git master as well +>> as with a version from about a month ago. Is this a known problem or +>> shall I dig into it and find what wrong? +> +> Sounds like notmuch reply is producing bad JSON for that particular +> message. Could you try the following, replacing with the +> message ID of the message you're replying to: +> +> notmuch reply --format=json id:"" | json_xs -t json-pretty +> +> and see if it complains? + +json_xs didn't complain, but I've found that notmuch outputs + Failed to verify signed part: Cannot verify multipart/signed part: unsupported 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." + + ;; Get the reply object as JSON, and parse it into an elisp object. + (with-temp-buffer +- (apply 'call-process (append (list notmuch-command nil (list t t) nil) args)) ++ (apply 'call-process (append (list notmuch-command nil (list t nil) nil) args)) + (goto-char (point-min)) + (let ((json-object-type 'plist) + (json-array-type 'list) + +Comments? + +-Michal