From: Austin Clements <amdragon@MIT.EDU>
To: Sebastian Spaeth <Sebastian@sspaeth.de>
Cc: Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH v2] emacs: bad regexp @ `notmuch-search-process-filter'
Date: Fri, 12 Aug 2011 04:28:43 -0400 [thread overview]
Message-ID: <20110812082843.GB21339@mit.edu> (raw)
In-Reply-To: <87zkjfnjd4.fsf@SSpaeth.de>
Quoth Sebastian Spaeth on Aug 12 at 10:07 am:
> On Mon, 11 Jul 2011 17:05:32 -0400, Austin Clements <amdragon@MIT.EDU> wrote:
> > So what would be a good format? One possibility would be to
> > NULL-delimit the query part; as distasteful as I find that, this part
> > of the search output isn't meant for user consumption. Though I fear
> > this is endemic to the dual role the search output currently plays as
> > both user and computer readable.
>
> Perhaps we take a queue from xargs and have a command line switch for \n
> vs \0 output?
>
> --null
> -- 0
> Input items are terminated by a null character instead of by
> whitespace, and the quotes and backslash are not special (every
> character is taken lit- erally).
This was one of the approaches I considered, but given that JSON
parsing (with my optimized json.el) is nearly as fast as regexp-based
parsing (which would also be the fastest way to parse \0-separated
output) and is flexible, robust, and structured (unlike any simple
delimited text format), I concluded we should just go with JSON. If
we care about speed enough to introduce another format, I'd propose
S-expressions over a new text format, since they double parsing
performance compared to text, have the same structural benefits as
JSON, and JSON and S-expressions could even share the same formatting
code (so there's no chance of representation divergence).
BTW, reviving the JSON search parser is on my shortlist. I should
also bundle up my optimized json.el, since it should seriously boost
the performance of notmuch-show, too.
next prev parent reply other threads:[~2011-08-12 8:29 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-01 16:37 [PATCH 2/2] [RFC] possible solution for "Race condition for '*' command" Austin Clements
2011-07-02 14:20 ` Pieter Praet
2011-07-03 17:17 ` Austin Clements
2011-07-04 6:51 ` [PROTO] " Pieter Praet
2011-07-04 6:51 ` [PATCH 1/5] emacs: add property "matched-msgids" to each search result Pieter Praet
2011-07-04 6:51 ` [PATCH 2/5] emacs: add some functions to fetch the matched-msgids of a (region of) search result(s) Pieter Praet
2011-07-04 6:51 ` [PATCH 3/5] emacs: stashing (a region of) matched-msgids Pieter Praet
2011-07-04 6:51 ` [PATCH 4/5] test: emacs: add/remove tags from all matching messages with `notmuch-search-operate-all' Pieter Praet
2011-07-04 6:51 ` [PATCH 5/5] emacs: make `notmuch-search-operate-all' use matched-msgids instead of the original query string Pieter Praet
2011-07-04 17:56 ` [PROTO] possible solution for "Race condition for '*' command" Austin Clements
2011-07-04 18:48 ` Pieter Praet
2011-07-05 19:04 ` Pieter Praet
2011-07-05 21:42 ` Austin Clements
2011-07-10 14:11 ` [PATCH] emacs: bad regexp @ `notmuch-search-process-filter' Pieter Praet
2011-07-11 20:43 ` [PATCH v2] " Pieter Praet
2011-07-11 21:05 ` Austin Clements
2011-07-13 14:16 ` Pieter Praet
2011-07-13 14:47 ` David Edmondson
2011-07-13 18:57 ` Austin Clements
2011-07-16 15:07 ` Pieter Praet
2011-07-20 4:50 ` servilio
2011-07-20 20:50 ` JSON parsing performance (was Re: [PATCH v2] emacs: bad regexp @ `notmuch-search-process-filter') Austin Clements
2011-08-12 8:07 ` [PATCH v2] emacs: bad regexp @ `notmuch-search-process-filter' Sebastian Spaeth
2011-08-12 8:28 ` Austin Clements [this message]
2011-08-03 20:47 ` [PROTO] possible solution for "Race condition for '*' command" Austin Clements
2011-08-03 21:42 ` Jameson Graef Rollins
2011-08-03 22:21 ` Austin Clements
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=20110812082843.GB21339@mit.edu \
--to=amdragon@mit.edu \
--cc=Sebastian@sspaeth.de \
--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).