Re: JSON readtable error when replying
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 30 Apr 2012 16:50:37 +0000 (18:50 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:51 +0000 (09:46 -0800)
f3/b11ddd90879e03e08d0530a6d5b6dc5874dc4e [new file with mode: 0644]

diff --git a/f3/b11ddd90879e03e08d0530a6d5b6dc5874dc4e b/f3/b11ddd90879e03e08d0530a6d5b6dc5874dc4e
new file mode 100644 (file)
index 0000000..23f3322
--- /dev/null
@@ -0,0 +1,107 @@
+Return-Path: <sojkam1@fel.cvut.cz>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 795D5431FAF\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Apr 2012 09:50:41 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id Ar0exxnju47u for <notmuch@notmuchmail.org>;\r
+       Mon, 30 Apr 2012 09:50:39 -0700 (PDT)\r
+Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
+       by olra.theworths.org (Postfix) with ESMTP id A5C5E431FAE\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Apr 2012 09:50:39 -0700 (PDT)\r
+Received: from localhost (unknown [192.168.200.4])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id 8A52819F3345;\r
+       Mon, 30 Apr 2012 18:50:38 +0200 (CEST)\r
+X-Virus-Scanned: IMAP AMAVIS\r
+Received: from max.feld.cvut.cz ([192.168.200.1])\r
+       by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,\r
+       port 10044)\r
+       with ESMTP id moR47koeN7Pq; Mon, 30 Apr 2012 18:50:37 +0200 (CEST)\r
+Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id 2FED219F3343;\r
+       Mon, 30 Apr 2012 18:50:37 +0200 (CEST)\r
+Received: from steelpick.2x.cz (note-sojka.felk.cvut.cz [147.32.86.30])\r
+       (Authenticated sender: sojkam1)\r
+       by imap.feld.cvut.cz (Postfix) with ESMTPSA id 1BDA3660968;\r
+       Mon, 30 Apr 2012 18:50:37 +0200 (CEST)\r
+Received: from wsh by steelpick.2x.cz with local (Exim 4.77)\r
+       (envelope-from <sojkam1@fel.cvut.cz>)\r
+       id 1SOto5-0002mx-2Q; Mon, 30 Apr 2012 18:50:37 +0200\r
+From: Michal Sojka <sojkam1@fel.cvut.cz>\r
+To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+Subject: Re: JSON readtable error when replying\r
+In-Reply-To:\r
+ <CAMoJFUsCe+U_j=oH0c=P6YmD2g_Jk8sxxtJ00JA_sM3dM5pOHQ@mail.gmail.com>\r
+References: <87ehr55knx.fsf@steelpick.2x.cz>\r
+       <CAMoJFUsCe+U_j=oH0c=P6YmD2g_Jk8sxxtJ00JA_sM3dM5pOHQ@mail.gmail.com>\r
+User-Agent: Notmuch/0.12+154~g2d13a18 (http://notmuchmail.org) Emacs/23.4.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Mon, 30 Apr 2012 18:50:37 +0200\r
+Message-ID: <874ns15fky.fsf@steelpick.2x.cz>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Cc: notmuch <notmuch@notmuchmail.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 30 Apr 2012 16:50:41 -0000\r
+\r
+Hi Adam,\r
+\r
+Adam Wolfe Gordon <awg+notmuch@xvx.ca> writes:\r
+> On Mon, Apr 30, 2012 at 09:00, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
+>> when I try to reply within emacs to a particular message, I get "JSON\r
+>> readtable error". This happens with with the current git master as well\r
+>> as with a version from about a month ago. Is this a known problem or\r
+>> shall I dig into it and find what wrong?\r
+>\r
+> Sounds like notmuch reply is producing bad JSON for that particular\r
+> message. Could you try the following, replacing <message id> with the\r
+> message ID of the message you're replying to:\r
+>\r
+> notmuch reply --format=json id:"<message id>" | json_xs -t json-pretty\r
+>\r
+> and see if it complains? \r
+\r
+json_xs didn't complain, but I've found that notmuch outputs\r
+  Failed to verify signed part: Cannot verify multipart/signed part: unsupported signature protocol 'application/x-pkcs7-signature'.\r
+to stderr before the json output and emacs tries to parse\r
+stderr. Emacs then complains about not finding "F" in json-readtable.\r
+\r
+The following patch fixes the problem for me, but I do not know if it is\r
+a good thing to throw away the stderr output of notmuch.\r
+\r
+diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
+index 87bd88d..49db603 100644\r
+--- a/emacs/notmuch-mua.el\r
++++ b/emacs/notmuch-mua.el\r
+@@ -113,7 +113,7 @@ list."\r
+ \r
+     ;; Get the reply object as JSON, and parse it into an elisp object.\r
+     (with-temp-buffer\r
+-      (apply 'call-process (append (list notmuch-command nil (list t t) nil) args))\r
++      (apply 'call-process (append (list notmuch-command nil (list t nil) nil) args))\r
+       (goto-char (point-min))\r
+       (let ((json-object-type 'plist)\r
+            (json-array-type 'list)\r
+\r
+Comments?\r
+\r
+-Michal\r