Re: notmuch-0.24.1: missing header include

2017-05-13 Thread David Bremner
Thomas Klausner writes: > Hi! > > On Solaris, notmuch-0.24.1 does not compile because lib/message.cc > uses index(3) but does not include strings.h. > > Please apply the attached patch or a similar one. > > Thanks, > Thomas In master we've replaced index(3) with strchr(3).

Re: Limiting number of results in saved searches in Emacs ?

2017-05-13 Thread David Bremner
Olivier Berger writes: > Hi. > > I can't find a way to limit the number of results in saved searches in > Emacs. Mainly to avoid OOM issues. > > It seems that --limit=N could help on the command-line. > > However, the construction of the saved searches only

Thunderbird import & parsing flight etickets

2017-05-13 Thread Johannes Buchner
Dear all, I wrote a primitive script to copy emails from Thunderbird's storage into notmuch, allowing one to use notmuch's power without having to abandon Thunderbird. Perhaps you are interested in including it in the import scripts on the notmuch website. thunderbird-notmuch-import.py in

synchronizing the inbox flag

2017-05-13 Thread Antoine Beaupré
Hi notmuchers! :) I've done numerous attemps at making notmuch work across different machines in the past. (See below for the details.) The only thing missing now is the "inbox" tag synchronization. My use case is this: I mostly use this one machine all the time. I have a [notmuch-tag][1] script

Re: [PATCH] emacs: with prefix argument, notmuch-show-stash-date stashes timestamp

2017-05-13 Thread Jani Nikula
On Thu, 11 May 2017, David Bremner wrote: > Tomi Ollila writes: > >> Using timestamp of a message is useful in many Xapian queries. >> --- >> >> This is my suggested alternative to id:20170110181525.18269-1-j...@nikula.org >> since my comments in

Re: [PATCH] emacs: with prefix argument, notmuch-show-stash-date stashes timestamp

2017-05-13 Thread David Bremner
Tomi Ollila writes: > Using timestamp of a message is useful in many Xapian queries. > --- > > This is my suggested alternative to id:20170110181525.18269-1-j...@nikula.org > since my comments in id:m2fuimv4mj@guru.guru-group.fi In case it's not obvious, I'm waiting for

[PATCH 1/6] lib: add content type argument to uuencode filter.

2017-05-13 Thread David Bremner
The idea is to support more general types of filtering, based on content type. --- lib/index.cc | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index 8c145540..1c04cc3d 100644 --- a/lib/index.cc +++ b/lib/index.cc @@ -56,6 +56,7 @@

[PATCH 2/2] cli/dump: don't include tags when not asked for

2017-05-13 Thread David Bremner
Add in the analogous test for tags that is given for properties a few lines below. --- notmuch-dump.c| 3 ++- test/T610-message-property.sh | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/notmuch-dump.c b/notmuch-dump.c index e451ac0c..5cc3b2f6 100644 ---

Re: [PATCH] emacs: tree: bugfix: specify --format-version

2017-05-13 Thread David Bremner
Mark Walters writes: > Previously notmuch tree did not specify the format-version when > calling notmuch. This meant that when the structured output was > slightly changed (in commit 14c60cf168ac3b0f277188c16e6012b7ebdadde7) > stash filename broke. This fixes this

[PATCH 3/6] lib/index: separate state table definition from scanner.

2017-05-13 Thread David Bremner
We want to reuse the scanner definition with a different table --- lib/index.cc | 81 +++- 1 file changed, 47 insertions(+), 34 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index 74a750b9..02b35b81 100644 --- a/lib/index.cc +++

[PATCH 6/6] lib/index: add simple html filter

2017-05-13 Thread David Bremner
Just drop all (HTML) tags --- lib/index.cc | 38 +- test/T680-html-indexing.sh | 5 - 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index 1b420b75..217b58c0 100644 --- a/lib/index.cc +++

v2 of drop HTML tags when indexing

2017-05-13 Thread David Bremner
This obsoletes id:20170322112306.12060-1-da...@tethera.net Compared to the previous version: - drop test already pushed upstream - add diagram of new state machine - add longer, and hopefully more illuminating comment about how the (new) state machines are encoded - don't create the

[PATCH 2/6] lib/index: Add another layer of indirection in filtering

2017-05-13 Thread David Bremner
We could add a second gmime filter subclass, but prefer to avoid duplicating the boilerplate. --- lib/index.cc | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index 1c04cc3d..74a750b9 100644 --- a/lib/index.cc +++ b/lib/index.cc @@

[PATCH 5/6] lib/index.cc: generalize filter state machine

2017-05-13 Thread David Bremner
To match things more complicated than fixed strings, we need states with multiple out arrows. --- lib/index.cc | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index 3bb1ac1c..1b420b75 100644 --- a/lib/index.cc +++

RE: Upcoming GMime 3.0 changes

2017-05-13 Thread David Bremner
Jeffrey Stedfast writes: >> -Original Message- >> From: David Bremner [mailto:da...@tethera.net] >> Sent: Tuesday, March 14, 2017 9:18 AM >> To: Jeffrey Stedfast ; notmuch@notmuchmail.org >> Subject: Re: Upcoming GMime 3.0 changes >> >>

[PATCH 4/6] lib/index: generalize filter name

2017-05-13 Thread David Bremner
We can't very well call it uuencode if it is going to filter other things as well. --- lib/index.cc | 92 +++- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index 02b35b81..3bb1ac1c 100644 ---

RE: Upcoming GMime 3.0 changes

2017-05-13 Thread Daniel Kahn Gillmor
On Tue 2017-05-09 10:37:30 -0300, David Bremner wrote: > Just for the record, I have some patches in progress for porting to > gmime-3.0. The main issue is the multiplicity of memory management > models involved. I think the gmime 3.0 approach of using more stock glib > memory management makes

[gmailieer] [release v0.1] Fast fetch and two-way tag synchronization between notmuch and GMail

2017-05-13 Thread Gaute Hope
Hi, gmailieer now has its first release! 'gmailieer' (or 'gmi') is a small program that can pull email and labels from your GMail account and store them locally in a maildir with the labels synchronized with a notmuch database. The changes to tags in the notmuch database may be pushed back to

RE: Upcoming GMime 3.0 changes

2017-05-13 Thread Tomi Ollila
On Tue, May 09 2017, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> >> out of curiosity, why do you think we won't be able to drop gmime-2.6 >> for a few years? if it's due to the debian release cycle and wanting to >> backport notmuch to stretch, i don't think

RE: Upcoming GMime 3.0 changes

2017-05-13 Thread David Bremner
Daniel Kahn Gillmor writes: > > out of curiosity, why do you think we won't be able to drop gmime-2.6 > for a few years? if it's due to the debian release cycle and wanting to > backport notmuch to stretch, i don't think i'd mind providing backports > of gmime 3.0 for

Re: [notmuch] Re: v3 of regexp search for mid/folder/path

2017-05-13 Thread David Bremner
Tomi Ollila writes: > On Sun, May 07 2017, David Bremner wrote: >> >> Gauteh reported success with these patches on IRC. Anyone want more time >> to review? > > Nope, but fix s/implimentation/implementation/ in 2/2 commit message :D Done and pushed to master. Ispell provided

[gmailieer] [release v0.1] Fast fetch and two-way tag synchronization between notmuch and GMail

2017-05-13 Thread Gaute Hope
Hi, gmailieer now has its first release! 'gmailieer' (or 'gmi') is a small program that can pull email and labels from your GMail account and store them locally in a maildir with the labels synchronized with a notmuch database. The changes to tags in the notmuch database may be pushed back to

[PATCH 1/2] test: add known broken test --include=properties

2017-05-13 Thread David Bremner
Reported in [1], --include=properties currently implies --include=tags, but it should not. [1] id:87y3u8vjbo@tethera.net --- test/T610-message-property.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh index

Semi-ready saved search

2017-05-13 Thread Tomas Nordin
Hello Notmuchers What is a good way (with emacs) to hook into the search to modify only a part of a search term. I find myself often doing this: date:2d.. not is:rfile rfile is my tag for mails that i archive locally. I am looking for a way to query myself only for the number of days in the

Re: [notmuch] Re: v3 of regexp search for mid/folder/path

2017-05-13 Thread Tomi Ollila
On Sun, May 07 2017, David Bremner wrote: > David Bremner writes: > >> No sooner posted than I realized it had a bug: the previous version >> compared against the prefixed term so anchored searches failed. >> >> I've also included some tests for the new features in this

[PATCH 03/12] lib: factor out message-id parsing to separate file.

2017-05-13 Thread David Bremner
This is really pure C string parsing, and doesn't need to be mixed in with the Xapian/C++ layer. Although not strictly necessary, it also makes it a bit more natural to call _parse_message_id from multiple compilation units. --- lib/Makefile.local| 1 + lib/add-message.cc| 106

[PATCH 12/12] add "notmuch reindex" subcommand

2017-05-13 Thread David Bremner
From: Daniel Kahn Gillmor This new subcommand takes a set of search terms, and re-indexes the list of matching messages. --- Makefile.local| 1 + doc/conf.py | 4 ++ doc/index.rst | 1 +

BUG: notmuch dump --include=properties implies --include=tags

2017-05-13 Thread David Bremner
This is almost certainly my fault, but % notmuch dump --include=properties '*' also includes the (typically much more voluminous) tag information. I looks like the call to dump_tags_message on line 253 needs to be guarded by (include & DUMP_INCLUDE_TAGS). I'm not sure how serious a bug this

[PATCH 09/12] cli/search: print total number of files matched in summary output.

2017-05-13 Thread David Bremner
This change needs to be documented. Left for a future commit as the current format is only loosely documented. --- notmuch-search.c | 15 +-- test/T080-search.sh | 2 +- test/T100-search-by-folder.sh| 4 ++-- test/T340-maildir-sync.sh

Re: v3 of regexp search for mid/folder/path

2017-05-13 Thread David Bremner
David Bremner writes: > No sooner posted than I realized it had a bug: the previous version > compared against the prefixed term so anchored searches failed. > > I've also included some tests for the new features in this version. > > Below is an interdiff against v1 Gauteh

[PATCH 08/12] lib: add notmuch_thread_get_total_files

2017-05-13 Thread David Bremner
This is relatively inexpensive in terms of run time and implementation cost as we are already traversing the list of messages in a thread. --- lib/notmuch.h | 12 lib/thread.cc | 9 + 2 files changed, 21 insertions(+) diff --git a/lib/notmuch.h b/lib/notmuch.h index

[PATCH 05/12] test: add known broken tests for duplicate message id

2017-05-13 Thread David Bremner
There are many other problems that could be tested, but these ones we have some hope of fixing because it doesn't require UI changes, just indexing changes. --- test/T670-duplicate-mid.sh | 28 1 file changed, 28 insertions(+) create mode 100755

[PATCH 11/12] lib: add notmuch_message_reindex

2017-05-13 Thread David Bremner
From: Daniel Kahn Gillmor This new function asks the database to reindex a given message. The parameter `indexopts` is currently ignored, but is intended to provide an extensible API to support e.g. changing the encryption or filtering status (e.g. whether and how certain

[PATCH 01/12] lib: isolate n_d_add_message and helper functions into own file

2017-05-13 Thread David Bremner
'database.cc' is becoming a monster, and it's hard to follow what the various static functions are used for. It turns out that about 1/3 of this file notmuch_database_add_message and helper functions not used by any other function. This commit isolates this code into it's own file. Some side

[PATCH 06/12] lib: index message files with duplicate message-ids

2017-05-13 Thread David Bremner
The corresponding xapian document just gets more terms added to it, but this doesn't seem to break anything. Values on the other hand get overwritten, which is a bit annoying, but arguably it is not worse to take the values (from, subject, date) from the last file indexed rather than the first.

[PATCH 10/12] lib: add _notmuch_message_remove_indexed_terms

2017-05-13 Thread David Bremner
Testing will be provided via use in notmuch_message_reindex --- lib/message.cc| 54 +++ lib/notmuch-private.h | 2 ++ 2 files changed, 56 insertions(+) diff --git a/lib/message.cc b/lib/message.cc index 2d67f6ea..106b767a 100644 ---

[PATCH 04/12] lib: refactor notmuch_database_add_message header parsing

2017-05-13 Thread David Bremner
This function is large and hard to understand and modify. Start to break it down into meaningful pieces. --- lib/add-message.cc| 54 +++- lib/message-file.c| 86 +++ lib/notmuch-private.h | 11 +++ 3 files

[PATCH 02/12] lib/n_d_add_message: refactor test for new/ghost messages

2017-05-13 Thread David Bremner
The switch is easier to understand than the side effects in the if test. It also potentially allows us more flexibility in breaking up this function into smaller pieces, since passing private_status around is icky. --- lib/add-message.cc | 23 +-- 1 file changed, 13

[PATCH 07/12] lib: add notmuch_message_count_files

2017-05-13 Thread David Bremner
This operation is relatively inexpensive, as the needed metadata is already computed by our lazy metadata fetching. The goal is to support better UI for messages with multipile files. --- lib/message.cc| 8 lib/notmuch-private.h | 6 ++ lib/notmuch.h | 8

v2 of index multiple files per msg-id, add reindex command

2017-05-13 Thread David Bremner
This obsoletes id:20170414025004.5334-1-da...@tethera.net. Let me repeat the warning from that version: , | WARNING: reindexing is an intrusive operation. I don't think this will | corrupt your database, but previous versions thrashed threading pretty | well. notmuch-dump is your friend.

Re: [PATCH] Replace index(3) with strchr(3)

2017-05-13 Thread David Bremner
Fredrik Fornwall writes: > The index(3) function has been deprecated in POSIX since 2001 and > removed in 2008, and most code in notmuch already calls strchr(3). > pushed to master (some time ago) d ___ notmuch mailing list

Re: [PATCH] Makefile.local: have all files in release tarball be owned by root

2017-05-13 Thread David Bremner
Tomi Ollila writes: > The tar content `git archive` creates (reproducibly) have owner and > group set to 'root'. (GNU) tar writes user ids to the added file > `version` by default. The contents of tar archive looks better and > more consistent when owner and group in all

Re: [PATCH] emacs/notmuch.el: don't use 'function' as variable name.

2017-05-13 Thread David Bremner
David Bremner writes: > In principle this should work, but at least in some pre-release > versions of emacs26, this causes problems inside lexical let [1]. > > [1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26406 pushed to master (some time ago). In the meantime, also

Re: [PATCH] configure: Be more verbose when compiler sanity checks fail

2017-05-13 Thread David Bremner
Tomi Ollila writes: > By printing the executed command line and re-executing it without > output redirection user gets better information how to proceed > (or ask for help) to resolve this problem. pushed to master (some time ago) d

[PATCH 3/3] emacs: notmuch-search: add filesize sorting

2017-05-13 Thread Ioan-Adrian Ratiu
Besides the previous date-based result orderings (oldest-first and newest-first) add two more filesize-based orderings: biggest-first smallest-first. The orderings are interchangeable, you can specify any one as the default via notmuch-search-default-sort-order or as the preffered ordering for a

[PATCH 2/3] emacs: make notmuch-search-oldest-first generic

2017-05-13 Thread Ioan-Adrian Ratiu
The current search result order logic assumes results are always sorted by date and thus uses a boolean switch for oldest/newest ordering specifications. This is problematic if I want to introduce other result orderings, like for example based on the mail-file size with smallest/biggest ordering

[PATCH 1/3] notmuch-search: implement 'filesize' search

2017-05-13 Thread Ioan-Adrian Ratiu
I need to keep track of my mail file sizes and writing custom parsers/scripts and running them on the maildir is problematic especially for managing large collections of email. Having a way to search email based on file sizes would be very useful, also copled with notmuch's incremental maildir

[RFC][PATCH] notmuch-search: add file size search feature

2017-05-13 Thread Ioan-Adrian Ratiu
I need to keep track of my maildir file sizes and for a while the parsers/scripts which I wrote were problematic, especially for viewing & interacting with large collections of email. Since I started using notmuch, having a way to filter my email search results based on file sizes would prove

Announcing Astroid v0.9

2017-05-13 Thread Gaute Hope
Greetings, Astroid v0.9 has been released! Astroid is a lightweight and fast graphical threads-with-tags email client for notmuch. Written in C++ using GTK+, WebKit and gmime. Astroid can be acquired at: $ git clone https://github.com/astroidmail/astroid.git Usage and instructions:

Re: some issues with emacs 25

2017-05-13 Thread Matthew Lear
On 4 Mar 2017 11:03, "David Bremner" wrote: David Bremner writes: > Matthew Lear writes: > > >> Thanks David. Yes it does. After recompiling the v25 lisp with these >> changes, I'm unable to reproduce the problems with both the test

ANNOUNCE: muchsync 3 released

2017-05-13 Thread David Mazieres
Muchsync 3 is now available from the usual place: http://www.muchsync.org/ Muchsync synchronizes mail and tags in your notmuch database across machines. Not much has changed since the last release, because the tool already worked well. However, there are two changes people requested:

Re: [PATCH 2/2] emacs: make modifications to message Fcc vars buffer-local

2017-05-13 Thread David Bremner
David Bremner writes: > Tomi Ollila writes: > >> >> One thing come to my mind: would it be possible to use buffer-local >> variable message-fcc-handler-function in notmuch-message-mode buffers so >> that such wrapper functions defined below would not be

Re: Fwd: error building against xapian 1.3.4

2017-05-13 Thread David Bremner
Matthew Lear writes: > > Even though xapian 1.4 is marked as stable, Ubuntu 16.04 has xapian 1.3.4 > installed. I'd rather not start hacking around updating xapian and > dependant packages since the whole point of me having this machine is to > use it as a stable baseline

Limiting number of results in saved searches in Emacs ?

2017-05-13 Thread Olivier Berger
Hi. I can't find a way to limit the number of results in saved searches in Emacs. Mainly to avoid OOM issues. It seems that --limit=N could help on the command-line. However, the construction of the saved searches only allow to type search terms and no options like --limit. Would anyone have a

Support for limiting number of displayed search results in Emacs saved searches ?

2017-05-13 Thread Olivier Berger
Hi. I'd like to be able to add the --limit option to the notmuch search command spawned from saved searches in Emacs notmuch-hello. But the construction of the search string only supports search terms and not options, apparently. Any hope ? Many thanks in advance. -- Olivier BERGER

error building against xapian 1.3.4

2017-05-13 Thread Matthew Lear
Hi. On a new machine that I've been setting up (running Ubuntu 16.04 LTS), I'm unable to build notmuch from git with HEAD @ * 77c9ec1 - (HEAD -> master, origin/master, origin/HEAD) test: add known broken test for indexing html (2017-04-20 06:59:40 -0300) The error looks like this: ... CXX -g

[PATCH 1/4] build: do not export compat functions from lib

2017-05-13 Thread Jani Nikula
Commits 9db214527213 ("lib/gen-version-script.h: add getline and getdelim to notmuch.sym if needed") and 3242e29e57ac ("build: add canonicalize_file_name to symbols exported from libnotmuch.so") started exporting compat functions from libnotmuch so that the cli could use them. But we shouldn't

RFC on default notmuch-show mime part buttons

2017-05-13 Thread William Casarin
I recently had to do this in my notmuch config to remove a lot of button noise in the notmuch-show buffer: (defun jb55/notmuch-show-insert-header-p (part hide) ;; Show all part buttons except for text/plain and multipart (let ((mime-type (notmuch-show-mime-type part))) (not

[PATCH 2/4] compat: don't include compat.h from the feature test source

2017-05-13 Thread Jani Nikula
The feature test code should test the build environment, and none of the compat code should interfere with that. Don't include compat.h from the feature test source. There should be no functional changes here, but this is just the right thing to do. --- compat/have_timegm.c | 1 - 1 file changed,

Re: [PATCH 1/7] test: add known broken test for indexing html

2017-05-13 Thread David Bremner
David Bremner writes: > 'quite' on IRC reported that notmuch new was grinding to a halt during > initial indexing, and we eventually narrowed the problem down to some > html parts with large embedded images. These cause the number of terms > added to the Xapian database to

notmuch-0.24.1: missing header include

2017-05-13 Thread Thomas Klausner
Hi! On Solaris, notmuch-0.24.1 does not compile because lib/message.cc uses index(3) but does not include strings.h. Please apply the attached patch or a similar one. Thanks, Thomas $NetBSD: patch-lib_notmuch-private.h,v 1.1 2017/04/20 09:06:34 jperkin Exp $ Include strings.h for index(3).

Re: notmuch-emacs and Emacs26 (master)

2017-05-13 Thread Steven Allen
This appears to have been fixed by commit 89898e43c7ceef28bb3c2116b4d8a3ec96d9c8da in Emacs master. signature.asc Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch

Re: how to configure notmuch-emacs to automatically show application/pgp partsFcc: sent -unread

2017-05-13 Thread David Bremner
David Bremner writes: > Gregor Zattler writes: > >> Dear notmuch users and developers, could one please enlighten me, >> how to configure notmuch-emacs in order to automatically show >> application/pgp mime parts in emails as in e.g. cryptograhically >>

[PATCH 0/4] build fixes and improvements

2017-05-13 Thread Jani Nikula
I was looking into the Meson build system [1], and tried converting notmuch to use it as a learning experience. I'm not sure if that'll lead anywhere, but I noted some issues in the current build while at it. The first two are genuine fixes, the last two I think make the build easier to

Re: how to configure notmuch-emacs to automatically show application/pgp partsFcc: sent -unread

2017-05-13 Thread David Bremner
Gregor Zattler writes: > Dear notmuch users and developers, could one please enlighten me, > how to configure notmuch-emacs in order to automatically show > application/pgp mime parts in emails as in e.g. cryptograhically > signed debian security advisories (as attached). I

[PATCH 01/10] lib: isolate n_d_add_message and helper functions into own file

2017-05-13 Thread David Bremner
'database.cc' is becoming a monster, and it's hard to follow what the various static functions are used for. It turns out that about 1/3 of this file notmuch_database_add_message and helper functions not used by any other function. This commit isolates this code into it's own file. Some side

[PATCH 02/10] lib/n_d_add_message: refactor test for new/ghost messages

2017-05-13 Thread David Bremner
The switch is easier to understand than the side effects in the if test. It also potentially allows us more flexibility in breaking up this function into smaller pieces, since passing private_status around is icky. --- lib/add-message.cc | 23 +-- 1 file changed, 13

[PATCH 03/10] lib: factor out message-id parsing to separate file.

2017-05-13 Thread David Bremner
This is really pure C string parsing, and doesn't need to be mixed in with the Xapian/C++ layer. Although not strictly necessary, it also makes it a bit more natural to call _parse_message_id from multiple compilation units. --- lib/Makefile.local| 1 + lib/add-message.cc| 106

[PATCH 06/10] lib: index message files with duplicate message-ids

2017-05-13 Thread David Bremner
The corresponding xapian document just gets more terms added to it, but this doesn't seem to break anything. Values on the other hand get overwritten, which is a bit annoying, but arguably it is not worse to take the values (from, subject, date) from the last file indexed rather than the first.

[PATCH 04/10] lib: refactor notmuch_database_add_message header parsing

2017-05-13 Thread David Bremner
This function is large and hard to understand and modify. Start to break it down into meaningful pieces. --- lib/add-message.cc| 54 +++- lib/message-file.c| 86 +++ lib/notmuch-private.h | 11 +++ 3 files

[PATCH 05/10] test: add known broken tests for duplicate message id

2017-05-13 Thread David Bremner
There are many other problems that could be tested, but these ones we have some hope of fixing because it doesn't require UI changes, just indexing changes. --- test/T670-duplicate-mid.sh | 28 1 file changed, 28 insertions(+) create mode 100755

[PATCH 10/10] add "notmuch reindex" subcommand

2017-05-13 Thread David Bremner
From: Daniel Kahn Gillmor This new subcommand takes a set of search terms, and re-indexes the list of matching messages. --- Makefile.local| 1 + doc/conf.py | 4 ++ doc/index.rst | 1 +

[PATCH 09/10] lib: add notmuch_message_reindex

2017-05-13 Thread David Bremner
From: Daniel Kahn Gillmor This new function asks the database to reindex a given message. The parameter `indexopts` is currently ignored, but is intended to provide an extensible API to support e.g. changing the encryption or filtering status (e.g. whether and how certain

[PATCH 02/10] lib/n_d_add_message: refactor test for new/ghost messages

2017-05-13 Thread David Bremner
The switch is easier to understand than the side effects in the if test. It also potentially allows us more flexibility in breaking up this function into smaller pieces, since passing private_status around is icky. --- lib/add-message.cc | 23 +-- 1 file changed, 13

[PATCH 09/10] lib: add notmuch_message_reindex

2017-05-13 Thread David Bremner
From: Daniel Kahn Gillmor This new function asks the database to reindex a given message. The parameter `indexopts` is currently ignored, but is intended to provide an extensible API to support e.g. changing the encryption or filtering status (e.g. whether and how certain

[PATCH 03/10] lib: factor out message-id parsing to separate file.

2017-05-13 Thread David Bremner
This is really pure C string parsing, and doesn't need to be mixed in with the Xapian/C++ layer. Although not strictly necessary, it also makes it a bit more natural to call _parse_message_id from multiple compilation units. --- lib/Makefile.local| 1 + lib/add-message.cc| 106

[PATCH] emacs: tree: bugfix: specify --format-version

2017-05-13 Thread Mark Walters
Previously notmuch tree did not specify the format-version when calling notmuch. This meant that when the structured output was slightly changed (in commit 14c60cf168ac3b0f277188c16e6012b7ebdadde7) stash filename broke. This fixes this breakage by specifying the format-version. --- Bremner

[PATCH 08/10] lib: add _notmuch_message_remove_indexed_terms

2017-05-13 Thread David Bremner
Testing will be provided via use in notmuch_message_reindex --- lib/message.cc| 54 +++ lib/notmuch-private.h | 2 ++ 2 files changed, 56 insertions(+) diff --git a/lib/message.cc b/lib/message.cc index 5291e846..313660da 100644 ---

v1.1 index multiple files per message-id, add reindex command

2017-05-13 Thread David Bremner
This obsoletes id:20170414025004.5334-1-da...@tethera.net But for some reason the key patch 9/10 was missing (at least for me), so I'm calling this round 1.1. Most of the comments there apply, except - I fixed one memory leak in notmuch_message_reindex - I added a test that

[PATCH 07/10] WIP: Add message count to summary output

2017-05-13 Thread David Bremner
This requires a bunch of small changes spread out in different places; I'd probably break it up if we decide to make this change. --- lib/message.cc | 8 lib/notmuch-private.h| 6 ++ lib/notmuch.h| 6 ++

[PATCH 06/10] lib: index message files with duplicate message-ids

2017-05-13 Thread David Bremner
The corresponding xapian document just gets more terms added to it, but this doesn't seem to break anything. Values on the other hand get overwritten, which is a bit annoying, but arguably it is not worse to take the values (from, subject, date) from the last file indexed rather than the first.

[PATCH 01/10] lib: isolate n_d_add_message and helper functions into own file

2017-05-13 Thread David Bremner
'database.cc' is becoming a monster, and it's hard to follow what the various static functions are used for. It turns out that about 1/3 of this file notmuch_database_add_message and helper functions not used by any other function. This commit isolates this code into it's own file. Some side

[PATCH 07/10] WIP: Add message count to summary output

2017-05-13 Thread David Bremner
This requires a bunch of small changes spread out in different places; I'd probably break it up if we decide to make this change. --- lib/message.cc | 8 lib/notmuch-private.h| 6 ++ lib/notmuch.h| 6 ++