unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [RFC] Use JSON in emacs interface
@ 2012-04-29 16:22 Chris Gray
  2012-04-29 18:17 ` Adam Wolfe Gordon
  2012-04-29 20:11 ` Austin Clements
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Gray @ 2012-04-29 16:22 UTC (permalink / raw)
  To: notmuch

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,
<http://cvs.savannah.gnu.org/viewvc/*checkout*/emacs/lisp/json.el?root=emacs>,
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-29 20:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-29 16:22 [RFC] Use JSON in emacs interface Chris Gray
2012-04-29 18:17 ` Adam Wolfe Gordon
2012-04-29 20:11 ` Austin Clements

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).