From: Michal Sojka <sojkam1@fel.cvut.cz>
To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>
Cc: notmuch <notmuch@notmuchmail.org>
Subject: Re: JSON readtable error when replying
Date: Mon, 30 Apr 2012 18:50:37 +0200 [thread overview]
Message-ID: <874ns15fky.fsf@steelpick.2x.cz> (raw)
In-Reply-To: <CAMoJFUsCe+U_j=oH0c=P6YmD2g_Jk8sxxtJ00JA_sM3dM5pOHQ@mail.gmail.com>
Hi Adam,
Adam Wolfe Gordon <awg+notmuch@xvx.ca> writes:
> On Mon, Apr 30, 2012 at 09:00, Michal Sojka <sojkam1@fel.cvut.cz> 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 <message id> with the
> message ID of the message you're replying to:
>
> notmuch reply --format=json id:"<message 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
next prev parent reply other threads:[~2012-04-30 16:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-30 15:00 JSON readtable error when replying Michal Sojka
2012-04-30 15:10 ` Adam Wolfe Gordon
2012-04-30 16:50 ` Michal Sojka [this message]
2012-05-01 3:36 ` Adam Wolfe Gordon
2012-05-01 21:10 ` [PATCH] emacs: Do not pass stderr of notmuch reply to JSON parser Michal Sojka
2012-05-02 17:39 ` Adam Wolfe Gordon
2012-05-06 12:23 ` David Bremner
2012-04-30 15:12 ` JSON readtable error when replying James Vasile
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874ns15fky.fsf@steelpick.2x.cz \
--to=sojkam1@fel.cvut.cz \
--cc=awg+notmuch@xvx.ca \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).