MIME-Version: 1.0 Date: Tue, 17 Nov 2009 16:23:53 -0800 Message-ID: From: Alex Botero-Lowry To: notmuch@notmuchmail.org Content-Type: multipart/mixed; boundary=0016e64ca4d8f27a4804789a4139 Subject: [notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: notmuch-bounces@notmuchmail.org Errors-To: notmuch-bounces@notmuchmail.org --0016e64ca4d8f27a4804789a4139 Content-Type: multipart/alternative; boundary=0016e64ca4d8f27a3604789a4137 --0016e64ca4d8f27a3604789a4137 Content-Type: text/plain; charset=ISO-8859-1 In this case error out when no query is supplied. There seems to be an infinite-loop casued by i think notmuch_query_search_threads having an exception: A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND A Xapian exception occurred: Syntax: AND I'll look into that bug specifically a bit later. It might be better to do a usage instead of just throwing an error here? alex --0016e64ca4d8f27a3604789a4137 Content-Type: text/html; charset=ISO-8859-1 In this case error out when no query is supplied. There seems to be an infinite-loop casued by i think notmuch_query_search_threads having
an exception:

A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>
A Xapian exception occurred: Syntax: <expression> AND <expression>

I'll look into that bug specifically a bit later.

It might be better to do a usage instead of just throwing an error here?

alex
--0016e64ca4d8f27a3604789a4137-- --0016e64ca4d8f27a4804789a4139 Content-Type: application/octet-stream; name="0001-Error-out-if-no-query-is-supplied-to-search-instead-.patch" Content-Disposition: attachment; filename="0001-Error-out-if-no-query-is-supplied-to-search-instead-.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g25cms190 RnJvbSAzZjk0MzFmNzRhNWZmNjZjODRjODY5YTNlMjZjMmJhZDQyYmVkMWIxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbGV4YW5kZXIgQm90ZXJvLUxvd3J5IDxhbGV4LmJvdGVyb2xv d3J5QGdtYWlsLmNvbT4KRGF0ZTogVHVlLCAxNyBOb3YgMjAwOSAxNjoyMDoyOCAtMDgwMApTdWJq ZWN0OiBbUEFUQ0hdIEVycm9yIG91dCBpZiBubyBxdWVyeSBpcyBzdXBwbGllZCB0byBzZWFyY2gg aW5zdGVhZCBvZiBnb2luZyBpbnRvIGFuIGluZmluaXRlIGxvb3AKCi0tLQogbm90bXVjaC1zZWFy Y2guYyB8ICAgIDUgKysrKysKIDEgZmlsZXMgY2hhbmdlZCwgNSBpbnNlcnRpb25zKCspLCAwIGRl bGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL25vdG11Y2gtc2VhcmNoLmMgYi9ub3RtdWNoLXNlYXJj aC5jCmluZGV4IDhkYjA5YzcuLmQ5NGZjY2QgMTAwNjQ0Ci0tLSBhL25vdG11Y2gtc2VhcmNoLmMK KysrIGIvbm90bXVjaC1zZWFyY2guYwpAQCAtNjYsNiArNjYsMTEgQEAgbm90bXVjaF9zZWFyY2hf Y29tbWFuZCAodm9pZCAqY3R4LCBpbnQgYXJnYywgY2hhciAqYXJndltdKQogICAgIGFyZ2MgLT0g aTsKICAgICBhcmd2ICs9IGk7CiAKKyAgICBpZiAoYXJnYyA9PSAwKSB7CisgICAgICAgIGZwcmlu dGYgKHN0ZGVyciwgIk5vIHF1ZXJ5IHByb3ZpZGVkXG4iKTsKKyAgICAgICAgcmV0dXJuIDE7Cisg ICAgfQorCiAgICAgY29uZmlnID0gbm90bXVjaF9jb25maWdfb3BlbiAoY3R4LCBOVUxMLCBOVUxM KTsKICAgICBpZiAoY29uZmlnID09IE5VTEwpCiAJcmV0dXJuIDE7Ci0tIAoxLjYuNS4yCgo= --0016e64ca4d8f27a4804789a4139 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch --0016e64ca4d8f27a4804789a4139--