Re: [PATCH 2/6] cli: sanitize tabs to spaces in notmuch search

2013-10-17 Thread Jani Nikula
for the review! On Wed, 16 Oct 2013, Jani Nikula j...@nikula.org wrote: This is in preparation of switching to gmime header parsing, but arguably converting tabs to spaces rather than question marks is the right thing to do anyway. --- I think it would be worth saying in the commit message

Re: [PATCH 3/6] cli: make the hacky from guessing more liberal

2013-10-17 Thread Jani Nikula
On Thu, 17 Oct 2013, Mark Walters markwalters1...@gmail.com wrote: On Wed, 16 Oct 2013, Jani Nikula j...@nikula.org wrote: This is in preparation of switching to gmime header parsing. Accept for and by preceded by tabs in the received header. This is a bit flaky, but so is the whole guessing

Re: [PATCH 3/6] cli: make the hacky from guessing more liberal

2013-10-17 Thread Jani Nikula
On Thu, 17 Oct 2013, Moritz Wilhelmy mw+notm...@barfooze.de wrote: Hello, On Wed, Oct 16, 2013 at 22:00:10 +0300, Jani Nikula wrote: This is in preparation of switching to gmime header parsing. Accept for and by preceded by tabs in the received header. This is a bit flaky, but so

Re: [PATCH] lib: Add a new prefix list to the search-terms syntax

2013-10-17 Thread Jani Nikula
On Wed, 10 Apr 2013, Alexey I. Froloff ra...@raorn.name wrote: From: Alexey I. Froloff ra...@raorn.name Add support for indexing and searching the message's List-Id header. This is useful when matching all the messages belonging to a particular mailing list. There's an issue with our

Re: Build broken on OS X 10.9

2013-10-26 Thread Jani Nikula
Please post the build log. Jani. On Oct 25, 2013 11:54 PM, Tad tadfis...@gmail.com wrote: Looks like notmuch 0.16 won't build on OS X 10.9 due to the switch to libc++. I don't know where to start with fixing this, but thought I'd let y'all know.

[PATCH] lib: fix build on !HAVE_XAPIAN_COMPACT

2013-10-28 Thread Jani Nikula
Minimal change to build notmuch against xapian that doesn't have compaction support. --- lib/database.cc |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 06f1c0a..20e5ec2 100644 --- a/lib/database.cc +++ b/lib/database.cc @@

[PATCH 3/6] lib: use the backup path provided by the user, don't add anything to it

2013-11-01 Thread Jani Nikula
Adding another level is just useless cruft. --- lib/database.cc | 14 -- notmuch-compact.c |4 ++-- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index da549b4..9c99ac6 100644 --- a/lib/database.cc +++ b/lib/database.cc @@

[PATCH 4/6] cli: return error status if compaction fails

2013-11-01 Thread Jani Nikula
--- notmuch-compact.c | 19 ++- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/notmuch-compact.c b/notmuch-compact.c index 043710f..2afa725 100644 --- a/notmuch-compact.c +++ b/notmuch-compact.c @@ -39,16 +39,17 @@ notmuch_compact_command (notmuch_config_t

[PATCH 0/6] compactor changes

2013-11-01 Thread Jani Nikula
the time, just pick up from here. ;) Cheers, Jani. Jani Nikula (6): lib: construct compactor within try block to catch any exceptions lib: add closure parameter to compact status update callback lib: use the backup path provided by the user, don't add anything to it cli: return error

[PATCH 1/6] lib: construct compactor within try block to catch any exceptions

2013-11-01 Thread Jani Nikula
Constructors may also throw exceptions. Catch them. --- lib/database.cc |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 20e5ec2..3dfea0f 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -864,7 +864,6 @@

[PATCH 5/6] cli: add compact --backup=FILE option, don't backup by default

2013-11-01 Thread Jani Nikula
It's the user's decision. The recommended way is to do a database dump anyway. Clean up the relevant printfs too. --- notmuch-compact.c | 27 +++ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/notmuch-compact.c b/notmuch-compact.c index 2afa725..ecac86a

[PATCH 6/6] cli: add compact --verbose option and silence output without it

2013-11-01 Thread Jani Nikula
If there's nothing surprising to say, don't say anything. Unless asked for by the user. --- notmuch-compact.c | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/notmuch-compact.c b/notmuch-compact.c index ecac86a..c0ae22e 100644 --- a/notmuch-compact.c +++

Re: [PATCH] lib: update documentation of callback functions for database_compact and database_upgrade.

2013-11-01 Thread Jani Nikula
The point was, we can do this *now* without soname bumps, because we haven't released this yet. On Nov 2, 2013 1:16 AM, da...@tethera.net wrote: From: David Bremner brem...@debian.org Compact was missing callback documentation entirely, and upgrade did not discuss the closure parameter.

Re: [PATCH 3/6] lib: use the backup path provided by the user, don't add anything to it

2013-11-02 Thread Jani Nikula
On Nov 2, 2013 2:14 PM, David Bremner da...@tethera.net wrote: Jani Nikula j...@nikula.org writes: Adding another level is just useless cruft. --- lib/database.cc | 14 -- notmuch-compact.c |4 ++-- 2 files changed, 6 insertions(+), 12 deletions(-) The first two

Re: Getting the right root mail of the thread

2013-11-02 Thread Jani Nikula
On Sat, 02 Nov 2013, Felipe Contreras felipe.contre...@gmail.com wrote: I often wondered why when browsing threads, I often see a message that doesn't describe at all the thread, for example: notmuch search ... thread:826a 18 mins. ago [45/45] Felipe Contreras; [PATCH/TEST

Re: Getting the right root mail of the thread

2013-11-02 Thread Jani Nikula
On Sat, 02 Nov 2013, Felipe Contreras felipe.contre...@gmail.com wrote: On Sat, Nov 2, 2013 at 7:50 AM, Jani Nikula j...@nikula.org wrote: On Sat, 02 Nov 2013, Felipe Contreras felipe.contre...@gmail.com wrote: I think there should be a way to get the root mail of a thread, irrespective

[PATCH v2 01/11] test: fix compact backup / restore test

2013-11-03 Thread Jani Nikula
From: David Bremner da...@tethera.net It was looking in completely the wrong place for the backup and the (test) xapian database. Unfortunately test_begin_subtest hides the relevant errors. --- test/compact | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/compact

[PATCH v2 00/11] compactor changes v2

2013-11-03 Thread Jani Nikula
documentation of callback functions for database_compact and database_upgrade. Jani Nikula (9): lib: construct compactor within try block to catch any exceptions lib: check talloc success in compact lib: do not leak the database in compaction lib: add closure parameter to compact status

[PATCH v2 03/11] lib: check talloc success in compact

2013-11-03 Thread Jani Nikula
In line with the allocation checks all around. --- lib/database.cc | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/database.cc b/lib/database.cc index 3dfea0f..7a8702e 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -863,13 +863,17 @@ notmuch_database_compact

[PATCH v2 02/11] lib: construct compactor within try block to catch any exceptions

2013-11-03 Thread Jani Nikula
Constructors may also throw exceptions. Catch them. --- lib/database.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/database.cc b/lib/database.cc index 20e5ec2..3dfea0f 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -864,7 +864,6 @@ notmuch_database_compact

[PATCH v2 05/11] lib: add closure parameter to compact status update callback

2013-11-03 Thread Jani Nikula
This provides much more flexibility for the caller. --- lib/database.cc | 14 +- lib/notmuch.h | 5 +++-- notmuch-compact.c | 8 +++- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index eadf8a7..5a01703 100644 ---

[PATCH v2 06/11] lib: update documentation of callback functions for database_compact and database_upgrade.

2013-11-03 Thread Jani Nikula
From: David Bremner brem...@debian.org Compact was missing callback documentation entirely, and upgrade did not discuss the closure parameter. --- lib/notmuch.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index cd301a4..82fd599 100644

[PATCH v2 10/11] cli: add compact --verbose option and silence output without it

2013-11-03 Thread Jani Nikula
If there's nothing surprising to say, don't say anything. Unless asked for by the user. --- notmuch-compact.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/notmuch-compact.c b/notmuch-compact.c index 359acfc..1e7808c 100644 --- a/notmuch-compact.c +++

[PATCH v2 08/11] cli: return error status if compaction fails

2013-11-03 Thread Jani Nikula
As is customary for any tool. --- notmuch-compact.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/notmuch-compact.c b/notmuch-compact.c index 55dc731..b9461c2 100644 --- a/notmuch-compact.c +++ b/notmuch-compact.c @@ -43,16 +43,17 @@

[PATCH v2 07/11] lib: use the compaction backup path provided by the caller

2013-11-03 Thread Jani Nikula
The extra path component added by the lib is a magic value that the caller just has to know. This is demonstrated by the current code, which indeed has xapian.old both sides of the interface. Use the backup path provided by the lib caller verbatim, without adding anything to it. --- v2: add

[PATCH v2 09/11] cli: add compact --backup=DIRECTORY option, don't backup by default

2013-11-03 Thread Jani Nikula
It's the user's decision. The recommended way is to do a database dump anyway. Clean up the relevant printfs too. --- v2: reorder prints --- notmuch-compact.c | 27 +-- test/compact | 4 ++-- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git

[PATCH v2 11/11] man: document notmuch compact --verbose and --backup=DIRECTORY options

2013-11-03 Thread Jani Nikula
--- man/man1/notmuch-compact.1 | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/man/man1/notmuch-compact.1 b/man/man1/notmuch-compact.1 index 1aeed22..dfffccb 100644 --- a/man/man1/notmuch-compact.1 +++ b/man/man1/notmuch-compact.1 @@ -4,6 +4,8 @@

Re: [PATCH] test: fix compact backup / restore test

2013-11-03 Thread Jani Nikula
On Sat, 02 Nov 2013, David Bremner da...@tethera.net wrote: It was looking in completely the wrong place for the backup and the (test) xapian database. Unfortunately test_begin_subtest hides the relevant errors. I included this, unchanged, in my series [1] that depends on it. It makes no

Re: Getting the right root mail of the thread

2013-11-03 Thread Jani Nikula
On Sun, 03 Nov 2013, Felipe Contreras felipe.contre...@gmail.com wrote: On Sat, Nov 2, 2013 at 8:58 AM, Jani Nikula j...@nikula.org wrote: On Sat, 02 Nov 2013, Felipe Contreras felipe.contre...@gmail.com wrote: On Sat, Nov 2, 2013 at 7:50 AM, Jani Nikula j...@nikula.org wrote: On Sat, 02 Nov

Re: Getting the right root mail of the thread

2013-11-03 Thread Jani Nikula
On Sun, 03 Nov 2013, Jesse Rosenthal jrosent...@jhu.edu wrote: The current behavior can be annoying, but the old behavior could make the MUA quite unusable in a number of circumstances. (And yes, an MUA that fails on reading mail from senders with bad emailing practices is unusable for me.) I

Re: [PATCH v2 07/11] lib: use the compaction backup path provided by the caller

2013-11-05 Thread Jani Nikula
On Tue, 05 Nov 2013, David Bremner da...@tethera.net wrote: Jani Nikula j...@nikula.org writes: +backup_path = talloc_asprintf (config, %s/xapian.old, path); +if (! backup_path) +return 1; + Is it intentional that no message is printed here? A random glance at notmuch-search.c

[PATCH 1/2] cli: add compact --quiet option and silence output with it

2013-11-06 Thread Jani Nikula
Provide a way to silence the output. --- v2: --verbose - --quiet --- notmuch-compact.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/notmuch-compact.c b/notmuch-compact.c index 359acfc..8022dfe 100644 --- a/notmuch-compact.c +++ b/notmuch-compact.c @@

[RFC PATCH 2/2] lib: modify notmuch.h for automatic document generation

2013-11-06 Thread Jani Nikula
Minimal changes to produce a sensible result. --- lib/notmuch.h | 426 +++--- 1 file changed, 289 insertions(+), 137 deletions(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index 9dab555..6d91b17 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h

[PATCH 2/2] man: document notmuch compact --quiet and --backup=DIRECTORY options

2013-11-06 Thread Jani Nikula
--- v2: --verbose - --quiet --- man/man1/notmuch-compact.1 | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/man/man1/notmuch-compact.1 b/man/man1/notmuch-compact.1 index 1aeed22..0c95873 100644 --- a/man/man1/notmuch-compact.1 +++

[PATCH] lib: add library version check macro

2013-11-06 Thread Jani Nikula
There have been some plans for making build incompatible changes to the library API. This is inconvenient, but it is much more so without a way to easily conditional build against multiple versions of notmuch. The macro has been lifted from glib. --- lib/notmuch.h | 24

[PATCH] completion: update bash completion

2013-11-06 Thread Jani Nikula
Update bash completion to cover new commands and options: notmuch compact --quiet --backup=DIR notmuch count --output=files --batch --input=FILE notmuch insert --folder=DIR --create-folder notmuch search --exclude=all --duplicate=N notmuch show --include-html notmuch tag --batch --input=FILE

Re: fix for failing tests with gmime 2.6.19

2013-11-11 Thread Jani Nikula
Gmime doesn't do anything standards incompliant, so I'd prefer patching the test suite. Which is also why I'd like to work around this in notmuch. On Nov 11, 2013 4:59 PM, Tomi Ollila tomi.oll...@iki.fi wrote: On Mon, Nov 11 2013, David Bremner da...@tethera.net wrote: Daniel Kahn Gillmor

Re: [PATCH] notmuch: Add maildir: search option

2013-11-12 Thread Jani Nikula
On Tue, 12 Nov 2013, Peter Zijlstra pet...@infradead.org wrote: On Tue, Nov 12, 2013 at 02:31:25PM -0500, Austin Clements wrote: +/* Strip the maildir cur, new directory entries. */ +i = strlen(maildir); +if (strncmp(maildir + i - 3, cur, 3) == 0 || + strncmp(maildir + i - 3,

Re: [PATCH v2 4/5] compact: unconditionally attempt to remove old wip database compact directory

2013-11-14 Thread Jani Nikula
On Wed, 13 Nov 2013, Tomi Ollila tomi.oll...@iki.fi wrote: In case previous notmuch compact has been interrupted there is old work-in-progress database compact directory partially filled. Remove it just before starting to fill the directory with new files. --- lib/database.cc | 5 + 1

Re: [PATCH v2 2/5] compact: catch Xapian::Error consistently

2013-11-14 Thread Jani Nikula
The first two patches LGTM. On Wed, 13 Nov 2013, Tomi Ollila tomi.oll...@iki.fi wrote: catch Xapian::Error in compact code in lib/database.cc to be consistent with other code in addition to not making software crash on uncaught other Xapian error. --- lib/database.cc | 4 ++-- 1 file

Re: [PATCH v2 5/5] compact: provide user more information on after-compaction failures

2013-11-14 Thread Jani Nikula
On Wed, 13 Nov 2013, Tomi Ollila tomi.oll...@iki.fi wrote: After database has been compacted, there are steps to put the new database into place -- and these steps may fail. In case such failure happens, provide better information how to resolve it. I disagree with having a library spew all

Re: [PATCH v2 3/5] compact: preserve backup database until compacted database is in place

2013-11-14 Thread Jani Nikula
On Wed, 13 Nov 2013, Tomi Ollila tomi.oll...@iki.fi wrote: It is less error prone and window of failure opportunity is smaller if the old (backup) database is always renamed (instead of sometimes rmtree'd) before new (compacted) database is put into its place. Finally rmtree() old database in

[PATCH] NEWS: insert quotable parts in reply as they are displayed in show view

2013-11-17 Thread Jani Nikula
News for commit 5c19eb46a906819744a022463ee3fd7cdfaabbb9 Author: Jani Nikula j...@nikula.org Date: Sun Sep 1 20:59:53 2013 +0300 emacs: insert quotable parts in reply as they are displayed in show view --- NEWS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index

Re: notmuch-lib questions and observations

2013-11-19 Thread Jani Nikula
On Mon, 18 Nov 2013, Tomi Valkeinen tomi.valkei...@iki.fi wrote: Hi, I found out about notmuch quite recently, and now I've been tinkering with it, prototyping a GUI client. I have some questions and observations: Hello Tomi, glad you've found notmuch too! ;) Your mail would deserve a more

[PATCH v2 1/7] cli: sanitize tabs and newlines to spaces in notmuch search

2013-11-30 Thread Jani Nikula
Sanitize tabs and newlines to spaces rather than question marks in --output=summary --format=text output. This will also hide any difference in unfolding a header that has been folded with a tab. Our own header parser replaces tabs with spaces, while gmime would retain the tab. ---

[PATCH v2 0/7] lib: replace the message header parser with gmime

2013-11-30 Thread Jani Nikula
artificial division, but perhaps makes it easier to review. Patch 7 is just a hack to make perf tests not ignore so many mails... we have quite a bit of non-emails in the corpus by gmime parser standards. And this illustrates one of the differences in the parsers. BR, Jani. Jani Nikula (7): cli

[PATCH v2 3/7] util: make sanitize string available in string util for reuse

2013-11-30 Thread Jani Nikula
No functional changes. --- notmuch-search.c | 19 --- util/string-util.c | 22 ++ util/string-util.h | 7 +++ 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index 11cd6ee..8b6940a 100644 ---

[PATCH v2 2/7] cli: refactor reply from guessing

2013-11-30 Thread Jani Nikula
The guess_from_received_header() function had grown quite big. Chop it up into smaller functions. No functional changes. --- notmuch-reply.c | 178 +--- 1 file changed, 105 insertions(+), 73 deletions(-) diff --git a/notmuch-reply.c

[PATCH v2 4/7] cli: sanitize the received header before scanning for replies

2013-11-30 Thread Jani Nikula
This makes the from guessing agnostic to header folding by spaces or tabs. --- notmuch-reply.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index ca41405..a2eee17 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -21,6

[PATCH v2 6/7] lib: parse messages only once

2013-11-30 Thread Jani Nikula
Make the necessary changes to only do one gmime parse pass during indexing. --- lib/database.cc | 2 +- lib/index.cc | 59 ++- lib/message-file.c| 9 lib/notmuch-private.h | 16 -- 4 files changed, 30

[PATCH v2 5/7] lib: replace the header parser with gmime

2013-11-30 Thread Jani Nikula
The notmuch library includes a full blown message header parser. Yet the same message headers are parsed by gmime during indexing. Switch to gmime parsing completely. These are the main differences between the parsers: * Gmime stops header parsing at the first invalid header, and presumes the

[PATCH v2 7/7] HACK: fix broken messages in the perf test corpus

2013-11-30 Thread Jani Nikula
The gmime header parser rejects a lot of messages in the perf test corpus which have this in the middle of headers: Microsoft Mail Internet Headers Version 2.0 The header parsing stops right there. This illustrates a change in the parsing. The message is clearly broken, but previously notmuch

[PATCH 0/2] library reference man page

2013-11-30 Thread Jani Nikula
* generate html pages too, and upload to web site also * start using doxygen/javadoc tags to produce nicer output Cheers, Jani. Jani Nikula (2): devel: add doxygen configuration file lib: modify notmuch.h for automatic document generation devel/doxygen.cfg | 1890

[PATCH 2/2] lib: modify notmuch.h for automatic document generation

2013-11-30 Thread Jani Nikula
Minimal changes to produce a sensible result. --- lib/notmuch.h | 436 +++--- 1 file changed, 296 insertions(+), 140 deletions(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index 7c3a30c..708b603 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h

Re: [PATCH 0/2] library reference man page

2013-11-30 Thread Jani Nikula
On Sat, 30 Nov 2013, David Bremner da...@tethera.net wrote: Jani Nikula j...@nikula.org writes: devel/doxygen.cfg | 1890 + lib/notmuch.h | 436 A 2K line config file is kindof gross, but other than that, I think

[PATCH 1/2] lib: add return status to database close and destroy

2013-12-01 Thread Jani Nikula
notmuch_database_close may fail in Xapian -flush() or -close(), so report the status. Similarly for notmuch_database_destroy which calls close. This is required for notmuch insert to report error status if message indexing failed. Bump the notmuch version to allow clients to conditional build

[PATCH 0/2] lib: introduce notmuch_database_new

2013-12-01 Thread Jani Nikula
and contrib/notmuch-deliver. BR, Jani. Jani Nikula (2): lib: add return status to database close and destroy lib: introduce notmuch_database_new for initializing a database handle lib/database.cc | 80 ++-- lib/notmuch.h| 69

[PATCH 2/2] lib: introduce notmuch_database_new for initializing a database handle

2013-12-01 Thread Jani Nikula
There is a need for setting options before opening a database, such as setting a logging function to use instead of writing to stdout or stderr. It would be possible to do this by adding new parameters to notmuch_database_create and notmuch_database_open, but maintaining a backwards compatible API

Re: [PATCH 2/2] lib: introduce notmuch_database_new for initializing a database handle

2013-12-03 Thread Jani Nikula
transition for people running notmuch-deliver from git. Agreed. We could fix notmuch insert with patch 1/2 alone. Jani Nikula j...@nikula.org writes: +/* + * XXX: error handling should clean up *all* state created! + */ is this a warning to future hackers or some current problem? It's a note

Re: [PATCH WIP v2 0/5] emacs: show: redesign unread/read logic

2013-12-04 Thread Jani Nikula
On Sun, 01 Dec 2013, Mark Walters markwalters1...@gmail.com wrote: This is further wip of the message at id:1385285551-5158-1-git-send-email-markwalters1...@gmail.com see there for some discussion of the design. This series is still definitely wip: one reason for posting is so people can

Re: [PATCH 1/3] lib: Make VERSION macros agree with soname version

2013-12-04 Thread Jani Nikula
On Wed, 04 Dec 2013, Austin Clements amdra...@mit.edu wrote: We have two distinct library version numbers: the soname version and the version macros. We need both for different reasons: the version macros enable easy compile-time version detection (and conditional compilation), while the

Re: [PATCH 1/1] devel/release-checks.sh: adjust to LIBNOTMUCH version checks

2013-12-04 Thread Jani Nikula
On Wed, 04 Dec 2013, Tomi Ollila tomi.oll...@iki.fi wrote: NOTMUCH_VERSION_* macros in lib/notmuch.h are replaced with LIBNOTMUCH_VERSION_* macros. Check that the values of those match the LIBNOTMUCH_*_VERSION values in lib/Makefile.local. --- devel/release-checks.sh | 41

Re: [PATCH 1/2] lib: add return status to database close and destroy

2013-12-04 Thread Jani Nikula
On Wed, 04 Dec 2013, Austin Clements amdra...@mit.edu wrote: Quoth Jani Nikula on Dec 01 at 3:13 pm: notmuch_database_close may fail in Xapian -flush() or -close(), so report the status. Similarly for notmuch_database_destroy which calls close. This is required for notmuch insert to report

Re: [PATCH 2/2] lib: introduce notmuch_database_new for initializing a database handle

2013-12-05 Thread Jani Nikula
On Thu, 05 Dec 2013, Austin Clements amdra...@mit.edu wrote: Quoth Jani Nikula on Dec 01 at 3:14 pm: There is a need for setting options before opening a database, such as setting a logging function to use instead of writing to stdout or stderr. It would be possible to do this by adding new

Re: [PATCH WIP v3 1/3] emacs: show: mark tags changed since buffer loaded

2013-12-09 Thread Jani Nikula
On Thu, 05 Dec 2013, Mark Walters markwalters1...@gmail.com wrote: This shows any tags changed in the show buffer since it was loaded or refreshed. By default a removed tag is displayed with strike-through in red and an added tag is displayed underlined in green. One nice feature is that this

Re: [PATCH WIP v3 0/3] emacs: show: change the unread handling

2013-12-09 Thread Jani Nikula
On Thu, 05 Dec 2013, Mark Walters markwalters1...@gmail.com wrote: This is the next iteration of this WIP patch series. v2 was at id:1385892147-16994-1-git-send-email-markwalters1...@gmail.com I would just like to emphasise that *all* feedback is appreciated including I HATE IT etc. I LIKE

Re: [PATCH] lib: Add a new prefix list to the search-terms syntax

2014-01-01 Thread Jani Nikula
On Tue, 17 Dec 2013, Kirill A. Shutemov kir...@shutemov.name wrote: On Thu, Oct 17, 2013 at 05:17:00PM +0300, Jani Nikula wrote: On Wed, 10 Apr 2013, Alexey I. Froloff ra...@raorn.name wrote: From: Alexey I. Froloff ra...@raorn.name Add support for indexing and searching the message's List

Re: [PATCH] new: Detect dirent.d_type support at configure time

2014-01-01 Thread Jani Nikula
On Sun, 24 Nov 2013, Austin Clements amdra...@mit.edu wrote: Support for dirent.d_type is OS-specific. Previously, we used _DIRENT_HAVE_D_TYPE to detect support for this, but this is apparently a glic-ism (FreeBSD, for example, supports d_type, but does not define this). Since there's no

[PATCH 2/2] insert: respect maildir.synchronize_flags

2014-01-01 Thread Jani Nikula
Don't synchronize maildir flags if the user doesn't want it. --- notmuch-insert.c | 24 test/insert | 1 - 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index 2207b1e..55384e3 100644 --- a/notmuch-insert.c +++

[PATCH v2 2/2] lib: modify notmuch.h for automatic document generation

2014-01-01 Thread Jani Nikula
Minimal changes to produce a sensible result. --- lib/notmuch.h | 443 +++--- 1 file changed, 302 insertions(+), 141 deletions(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index d30768d..02604c5 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h

[PATCH v2 1/2] devel: add doxygen configuration file

2014-01-01 Thread Jani Nikula
This is a pretty basic config to get started, generated using 'doxygen -s -g' and mildly tweaked. To generate the library man page man/man3/notmuch.3 from lib/notmuch.h use: $ doxygen devel/doxygen.cfg --- devel/doxygen.cfg | 304 ++ 1 file

Re: notmuch-0.16: realpath() compatibility issue; clang visibility problem

2014-01-04 Thread Jani Nikula
For the visibility issue please upgrade Notmuch. BR, Jani. On Jan 4, 2014 2:26 PM, Thomas Klausner t...@giga.or.at wrote: Hi! I'm currently starting to try out notmuch-0.16 on NetBSD. It went off to a rocky start, since it segfaulted in the initial config setup. Debugging it I found that

Re: notmuch-0.16: realpath() compatibility issue; clang visibility problem

2014-01-04 Thread Jani Nikula
I guess we should look at realpath() compatibility, but in fairness passing NULL for the second parameter is according to POSIX.1-2008, not glibc extension. On Jan 4, 2014 2:35 PM, Jani Nikula j...@nikula.org wrote: For the visibility issue please upgrade Notmuch. BR, Jani. On Jan 4, 2014

Re: notmuch-0.16: realpath() compatibility issue; clang visibility problem

2014-01-04 Thread Jani Nikula
On Jan 5, 2014 12:38 AM, Thomas Klausner t...@giga.or.at wrote: On Sat, Jan 04, 2014 at 09:18:15AM -0400, David Bremner wrote: I'm not sure what the right answer is here. MATHPATHLEN (and PATH_MAX) are not necessarily defined; in particular this would break compilation on GNU Hurd. Perhaps

[PATCH 0/5] lib: make folder: prefix literal

2014-01-09 Thread Jani Nikula
. BR, Jani. Jani Nikula (5): lib: make folder: prefix literal test: fix insert folder: searches test: fix test for literal folder: search test: add test database in format version 1 test: add database upgrade test from format version 1 lib/database.cc| 39

[PATCH 1/5] lib: make folder: prefix literal

2014-01-09 Thread Jani Nikula
In xapian terms, convert folder: prefix from probabilistic to boolean prefix. This change constitutes a database change: bump the database version and add database upgrade support. --- lib/database.cc | 39 - lib/message.cc| 154

[PATCH 3/5] test: fix test for literal folder: search

2014-01-09 Thread Jani Nikula
--- test/search-by-folder | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/test/search-by-folder b/test/search-by-folder index 5cc2ca8..84ca438 100755 --- a/test/search-by-folder +++ b/test/search-by-folder @@ -3,6 +3,7 @@ test_description='notmuch

[PATCH 5/5] test: add database upgrade test from format version 1

2014-01-09 Thread Jani Nikula
--- test/notmuch-test | 1 + test/upgrade | 25 + 2 files changed, 26 insertions(+) create mode 100755 test/upgrade diff --git a/test/notmuch-test b/test/notmuch-test index d6fdd3a..68c8ad9 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -69,6 +69,7 @@

[PATCH 2/5] test: fix insert folder: searches

2014-01-09 Thread Jani Nikula
folder: is now boolean prefix. --- test/insert | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/insert b/test/insert index e8dc4c0..4bbccd5 100755 --- a/test/insert +++ b/test/insert @@ -126,14 +126,14 @@ test_expect_equal $dirname $MAIL_DIR/new

[PATCH] cli: initialize quiet variable in compact

2014-01-10 Thread Jani Nikula
Surprisingly there's no compiler warning! --- notmuch-compact.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notmuch-compact.c b/notmuch-compact.c index 8b820c0..6c59093 100644 --- a/notmuch-compact.c +++ b/notmuch-compact.c @@ -32,7 +32,7 @@ notmuch_compact_command

[PATCH 2/2] cli: close config and do talloc report also on errors

2014-01-10 Thread Jani Nikula
Seems like the sensible thing to do. --- notmuch.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/notmuch.c b/notmuch.c index 2d7f33d..b3fa9f3 100644 --- a/notmuch.c +++ b/notmuch.c @@ -256,7 +256,7 @@ main (int argc, char *argv[]) const char *command_name = NULL;

Re: [PATCH] show: add In-reply-to, References fields to structured formats

2014-01-12 Thread Jani Nikula
On Sun, 12 Jan 2014, Peter Wang noval...@gmail.com wrote: This is useful when 'show' is used to retrieve a draft message which is in reply to another message. I'd like to know more about *how* this is useful. Indeed the whole big picture about supporting draft or postponed messages is foggy. I

Re: [PATCH] notmuch: Add maildir: search option

2014-01-12 Thread Jani Nikula
On Tue, 12 Nov 2013, Peter Zijlstra pet...@infradead.org wrote: Subject: notmuch: Add maildir: search option The current folder: search terms are near useless when you have recursive folders, introduce a boolean maildir: search term to exactly match the maildir folder. Hi Peter - Per some

Re: [PATCH] notmuch: Add maildir: search option

2014-01-12 Thread Jani Nikula
On Sun, 12 Jan 2014, Peter Zijlstra pet...@infradead.org wrote: Right, sorry for disappearing; I failed to find time to finish the patch. That's what I figured, but didn't want to pester you... I did actually modify it do loose the /new,/cur bits and I think I addressed all other comments,

Re: encrypting replies to encrypted mail

2014-01-12 Thread Jani Nikula
On Sun, 12 Jan 2014, Jameson Graef Rollins jroll...@finestructure.net wrote: The question is how do we solve this problem. The tricky bit is that notmuch-emacs uses message-mode to compose and send messages, and mml to handle signing and encrypting, but uses the binary reply command to

Re: [Patch v3 1/3] info: start info documentation.

2014-01-17 Thread Jani Nikula
On Wed, 15 Jan 2014, David Bremner da...@tethera.net wrote: From: David Bremner brem...@debian.org Initially, just a skeleton of documentation for the emacs interface. There are a few dangling references to other info pages; these are to be generated from the man pages in a following commit.

Re: [Patch v3 1/3] info: start info documentation.

2014-01-17 Thread Jani Nikula
On Wed, 15 Jan 2014, David Bremner da...@tethera.net wrote: From: David Bremner brem...@debian.org Initially, just a skeleton of documentation for the emacs interface. There are a few dangling references to other info pages; these are to be generated from the man pages in a following commit.

[PATCH] lib: fix clang compiler warning

2014-01-17 Thread Jani Nikula
With some combination of clang and talloc, not using the return value of talloc_steal() produces a warning. Ignore it, as talloc_steal() has no failure modes per documentation. --- lib/thread.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/thread.cc b/lib/thread.cc

[PATCH] cli: abstract common config get/set code

2014-01-17 Thread Jani Nikula
Pretty straightforward abstraction similar to get/set list. --- v2 of id:1376839205-5115-1-git-send-email-j...@nikula.org adding a few comments about config value caching per David's request. Dropped the 2nd patch as too tricky. --- notmuch-config.c | 86

[PATCH v2] lib: add return status to database close and destroy

2014-01-19 Thread Jani Nikula
notmuch_database_close may fail in Xapian -flush() or -close(), so report the status. Similarly for notmuch_database_destroy which calls close. This is required for notmuch insert to report error status if message indexing failed. --- v2 of

[PATCH 1/7] cli: extract single message addition in notmuch new to clarify code

2014-01-19 Thread Jani Nikula
The add_files() function has grown huge, chop it up a bit. No functional changes. --- notmuch-new.c | 109 +- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 6a8b1b2..1dd8fc9 100644 ---

[PATCH 2/7] cli: only check the ignore list if needed

2014-01-19 Thread Jani Nikula
Premature optimization is the root of all evil, but this is simple enough. --- notmuch-new.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notmuch-new.c b/notmuch-new.c index 1dd8fc9..7f3b3b0 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -728,7 +728,7 @@ count_files

[PATCH 3/7] cli: use dirent_type in count_files too

2014-01-19 Thread Jani Nikula
Avoid an extra stat per file, if possible, also when counting the files for initial indexing. --- notmuch-new.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 7f3b3b0..e6ca841 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@

[PATCH 0/7] cli: notmuch new improvements

2014-01-19 Thread Jani Nikula
Here's an assortment of notmuch new fixes, non-functional cleanups, and the oft-requested --quiet option. These should be pretty straightforward to review. BR, Jani. Jani Nikula (7): cli: extract single message addition in notmuch new to clarify code cli: only check the ignore list

[PATCH 4/7] cli: for loop is more customary

2014-01-19 Thread Jani Nikula
With the happy day stop condition within the while, it was confusing. Switch to the paradigm for loop. No functional changes. --- notmuch-new.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index e6ca841..f6d9c3a 100644 ---

[PATCH 5/7] cli: abstract notmuch new result printing

2014-01-19 Thread Jani Nikula
The notmuch_new_command() function has grown huge, chop it up a bit. This should also be helpful when adding a --quiet option to notmuch new. No functional changes. --- notmuch-new.c | 80 +-- 1 file changed, 39 insertions(+), 41

[PATCH 6/7] cli: add --quiet option to notmuch new

2014-01-19 Thread Jani Nikula
Tie it to --verbose (resulting in verbosity levels of quiet, normal, and verbose) but leave --debug orthogonal. Do some drive-by cleaning while at it. --- notmuch-new.c | 47 --- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git

[PATCH 7/7] man: document notmuch new --quiet option

2014-01-19 Thread Jani Nikula
--- man/man1/notmuch-new.1 | 5 + 1 file changed, 5 insertions(+) diff --git a/man/man1/notmuch-new.1 b/man/man1/notmuch-new.1 index 5725b7d..7e71926 100644 --- a/man/man1/notmuch-new.1 +++ b/man/man1/notmuch-new.1 @@ -60,6 +60,11 @@ include Prevents hooks from being run. .RE +.RS 4 +.TP

Re: [PATCH 6/7] cli: add --quiet option to notmuch new

2014-01-24 Thread Jani Nikula
On Fri, 24 Jan 2014, Mark Walters markwalters1...@gmail.com wrote: I am not sure I like doing the database upgrade with no comment to the user at all. I think --quiet should mean we don't write to stdout at all. So the question becomes, is the database upgrade worth warning about in stderr?

Re: [PATCH 2/3] lib: make notmuch_threads_valid return FALSE when passed NULL

2014-01-24 Thread Jani Nikula
On Thu, 23 Jan 2014, David Bremner da...@tethera.net wrote: Without this patch, the example code in the header docs crashes for certain invalid queries (see id:871u00oimv@approx.mit.edu) --- lib/notmuch.h | 2 ++ lib/query.cc | 3 +++ 2 files changed, 5 insertions(+) diff --git

<    4   5   6   7   8   9   10   11   12   13   >