<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib, branch 0.32.1</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.32.1</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.32.1'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2021-05-15T11:40:05Z</updated>
<entry>
<title>lib/open: restore default database path of $HOME/mail</title>
<updated>2021-05-15T11:40:05Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-05-10T10:39:18Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b3258244c84a7673db39c46cad96ddb63b131dae'/>
<id>urn:sha1:b3258244c84a7673db39c46cad96ddb63b131dae</id>
<content type='text'>
Although this default worked for "notmuch config get", it didn't work
most other places. Restore the previous functionality, with the
wrinkle that XDG locations will shadow $HOME/mail if they exist.

This fixes a bug reported by Jack Kamm in id:87eeefdc8b.fsf@gmail.com
</content>
</entry>
<entry>
<title>lib/notmuch_database_reopen: reload some database metadata</title>
<updated>2021-05-12T11:40:04Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-05-09T12:28:48Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=393c92b04271472e6fdd19da73672a60723e34aa'/>
<id>urn:sha1:393c92b04271472e6fdd19da73672a60723e34aa</id>
<content type='text'>
In some uses of reopen, new documents and threads maybe have been
added, and e.g. compaction may have changed the uuid.
</content>
</entry>
<entry>
<title>lib/config: expand relative paths when reading from database</title>
<updated>2021-05-10T14:12:58Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-05-07T10:27:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=1040e7aa077197e5295180ef54576ea39c298a36'/>
<id>urn:sha1:1040e7aa077197e5295180ef54576ea39c298a36</id>
<content type='text'>
This makes the treatment of relative paths consistent between the
database and config files.
</content>
</entry>
<entry>
<title>lib/config: canonicalize paths relative to $HOME.</title>
<updated>2021-05-10T14:08:18Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-05-07T00:16:38Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=31098c4ae40511ffda9788a6654adbf898063d7f'/>
<id>urn:sha1:31098c4ae40511ffda9788a6654adbf898063d7f</id>
<content type='text'>
Prior to 0.32, notmuch had the (undocumented) behaviour that it
expanded a relative value of database.path with respect to $HOME. In
0.32 this was special cased for database.path but broken for
database.mail_root, which causes problems for at least notmuch-new
when database.path is set to a relative path.

The change in T030-config.sh reflects a user visible, but hopefully
harmless behaviour change; the expanded form of the paths will now be
printed by notmuch config.
</content>
</entry>
<entry>
<title>lib/config: remove early free in _get_email_from_passwd_file</title>
<updated>2021-04-24T15:11:45Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-04-24T13:44:28Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5f80e106d6f6e695677527b509164a6e5194abd1'/>
<id>urn:sha1:5f80e106d6f6e695677527b509164a6e5194abd1</id>
<content type='text'>
This (obvious) bug was caused by cut&amp;pasting the code from
notmuch-config.c into the library and adding on a return at the end.
</content>
</entry>
<entry>
<title>compat: rename {,notmuch_}canonicalize_file_name</title>
<updated>2021-04-24T11:07:00Z</updated>
<author>
<name>Đoàn Trần Công Danh</name>
<email>congdanhqx@gmail.com</email>
</author>
<published>2021-04-24T01:05:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=441a327051f5357175029709030a0ee51131379d'/>
<id>urn:sha1:441a327051f5357175029709030a0ee51131379d</id>
<content type='text'>
When compat canonicalize_file_name was introduced, it was limited to
C code only because it was used by C code only during that time.

&gt;From 5ec6fd4d, (lib/open: check for split configuration when creating
database., 2021-02-16), lib/open.cc, which is C++, relies on the
existent of canonicalize_file_name.

However, we can't blindly enable canonicalize_file_name for C++ code,
because different implementation has different additional signature for
C++ and users can arbitrarily add -DHAVE_CANONICALIZE_FILE_NAME=0 to
{C,CXX}FLAGS.

Let's move our implementation into a util library.

Helped-by: Tomi Ollila &lt;tomi.ollila@iki.fi&gt;
Signed-off-by: Đoàn Trần Công Danh &lt;congdanhqx@gmail.com&gt;
</content>
</entry>
<entry>
<title>lib/n_d_index_file: check return value from _n_m_add_filename</title>
<updated>2021-04-18T13:02:20Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-03-20T13:10:52Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=084e60d54a752d9c26263e7540f8687b747203f9'/>
<id>urn:sha1:084e60d54a752d9c26263e7540f8687b747203f9</id>
<content type='text'>
Ignoring this return value seems like a bad idea in general, and in
particular it has been hiding one or more bugs related to handling
long directory names.
</content>
</entry>
<entry>
<title>lib: directly traverse postlists in _n_message_delete</title>
<updated>2021-04-18T12:50:36Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-04-16T12:00:39Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=9ad19e4454ff98342a6c0ec5a7e44c8c516e6fcd'/>
<id>urn:sha1:9ad19e4454ff98342a6c0ec5a7e44c8c516e6fcd</id>
<content type='text'>
This is intended to fix the slow behaviour of "notmuch new" (and possibly
"notmuch reindex") when large numbers of files are deleted.

The underlying issue [1] seems to be the Xapian glass backend spending
a large amount of time in db.has_positions when running queries with
large-ish amounts of unflushed changes.

This commit removes two uses of Xapian queries [2], and replaces them with
an approximation of what Xapian would do after optimizing the
queries. This avoids the calls to has_positions (which are in any case
un-needed because we are only using boolean terms here).

[1] Thanks to "andres" on IRC for narrowing down the performance
bottleneck.

[2] Thanks to Olly Betts of Xapian fame for talking me a through a fix
that does not require people to update Xapian.
</content>
</entry>
<entry>
<title>lib: provide notmuch_config_path</title>
<updated>2021-03-27T12:26:14Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-02-21T11:34:52Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f5d4349921ded021756d6754d347420e68b23111'/>
<id>urn:sha1:f5d4349921ded021756d6754d347420e68b23111</id>
<content type='text'>
Since the library searches in several locations for a config file, the
caller does not know which of these is chosen in the usual case of
passing NULL as a config file. This changes provides an API for the
caller to retrieve the name of the config file chosen. It will be
tested in a following commit.
</content>
</entry>
<entry>
<title>CLI+lib: detect missing database in split configurations.</title>
<updated>2021-03-27T12:26:14Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-02-23T20:19:13Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=217f8196088f200972d35ee9181bfe361cccc04a'/>
<id>urn:sha1:217f8196088f200972d35ee9181bfe361cccc04a</id>
<content type='text'>
Eventually we want to do all opening of databases in the top
level (main function). This means that detection of missing databases
needs to move out of subcommands. It also requires updating the
library to use the new NO_DATABASE status code.
</content>
</entry>
</feed>
