<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/notmuch-private.h, branch 0.19_rc2</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.19_rc2</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.19_rc2'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2014-10-25T17:26:54Z</updated>
<entry>
<title>lib: Internal support for querying and creating ghost messages</title>
<updated>2014-10-25T17:26:54Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2014-10-23T12:30:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=bc9c50602d20ce712188ea2cc3c5d30647d4d3f5'/>
<id>urn:sha1:bc9c50602d20ce712188ea2cc3c5d30647d4d3f5</id>
<content type='text'>
This updates the message abstraction to support ghost messages: it
adds a message flag that distinguishes regular messages from ghost
messages, and an internal function for initializing a newly created
(blank) message as a ghost message.
</content>
</entry>
<entry>
<title>lib: Introduce macros for bit operations</title>
<updated>2014-10-25T17:26:43Z</updated>
<author>
<name>Austin Clements</name>
<email>aclements@csail.mit.edu</email>
</author>
<published>2014-10-24T12:49:15Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d99491f27440d83f937131a861ca547bffb8bdf1'/>
<id>urn:sha1:d99491f27440d83f937131a861ca547bffb8bdf1</id>
<content type='text'>
These macros help clarify basic bit-twiddling code and are written to
be robust against C undefined behavior of shift operators.
</content>
</entry>
<entry>
<title>lib: Move message ID compression to _notmuch_message_create_for_message_id</title>
<updated>2014-10-11T05:09:54Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2014-10-06T23:17:07Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=54ec8a0fd87ae7a32c8208be67a345c0eeea7f69'/>
<id>urn:sha1:54ec8a0fd87ae7a32c8208be67a345c0eeea7f69</id>
<content type='text'>
Previously, this was performed by notmuch_database_add_message.  This
happens to be the only caller currently (which is why this was safe),
but we're about to introduce more callers, and it makes more sense to
put responsibility for ID compression in the lower-level function
rather than requiring each caller to handle it.
</content>
</entry>
<entry>
<title>lib: Start all function names in notmuch-private.h with</title>
<updated>2014-07-13T15:25:29Z</updated>
<author>
<name>Charles Celerier</name>
<email>cceleri@cs.stanford.edu</email>
</author>
<published>2014-05-13T09:44:05Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=df8885f62c13f77b2b16cbb211e3a727945870b0'/>
<id>urn:sha1:df8885f62c13f77b2b16cbb211e3a727945870b0</id>
<content type='text'>
As noted in devel/STYLE, every private library function should start
with _notmuch. This patch corrects function naming that did not adhere
to this style in lib/notmuch-private.h. In particular, the old function
names that now begin with _notmuch are

    notmuch_sha1_of_file
    notmuch_sha1_of_string
    notmuch_message_file_close
    notmuch_message_file_get_header
    notmuch_message_file_open
    notmuch_message_get_author
    notmuch_message_set_author

Signed-off-by: Charles Celerier &lt;cceleri@cs.stanford.edu&gt;
</content>
</entry>
<entry>
<title>lib: replace the header parser with gmime</title>
<updated>2014-04-05T15:53:04Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2014-03-30T21:21:49Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=473930bb6fb167078a9428ad85f53accf7d4559f'/>
<id>urn:sha1:473930bb6fb167078a9428ad85f53accf7d4559f</id>
<content type='text'>
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 changes:

* Gmime stops header parsing at the first invalid header, and presumes
  the message body starts from there. The current parser is quite
  liberal in accepting broken headers. The change means we will be
  much pickier about accepting invalid messages.

* The current parser converts tabs used in header folding to
  spaces. Gmime preserve the tabs. Due to a broken python library used
  in mailman, there are plenty of mailing lists that produce headers
  with tabs in header folding, and we'll see plenty of tabs. (This
  change has been mitigated in preparatory patches.)

* For pure header parsing, the current parser is likely faster than
  gmime, which parses the whole message rather than just the
  headers. Since we parse the message and its headers using gmime for
  indexing anyway, this avoids and extra header parsing round when
  adding new messages. In case of duplicate messages, we'll end up
  parsing the full message although just headers would be
  sufficient. All in all this should still speed up 'notmuch new'.

* Calls to notmuch_message_get_header() may be slightly slower than
  previously for headers that are not indexed in the database, due to
  parsing of the whole message. Within the notmuch code base, notmuch
  reply is the only such user.
</content>
</entry>
<entry>
<title>lib: make folder: prefix literal</title>
<updated>2014-03-11T22:51:22Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2014-02-08T19:20:42Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=1fa8e40561aafb0ac4f51e0aba171a702b66fd86'/>
<id>urn:sha1:1fa8e40561aafb0ac4f51e0aba171a702b66fd86</id>
<content type='text'>
In xapian terms, convert folder: prefix from probabilistic to boolean
prefix, matching the paths, relative from the maildir root, of the
message files, ignoring the maildir new and cur leaf directories.

folder:foo matches all message files in foo, foo/new, and foo/cur.

folder:foo/new does *not* match message files in foo/new.

folder:"" matches all message files in the top level maildir and its
new and cur subdirectories.

This change constitutes a database change: bump the database version
and add database upgrade support for folder: terms. The upgrade also
adds path: terms.

Finally, fix the folder search test for literal folder: search, as
some of the folder: matching capabilities are lost in the
probabilistic to boolean prefix change.
</content>
</entry>
<entry>
<title>lib: fix clang build</title>
<updated>2013-09-01T10:06:54Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2013-08-17T21:30:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=db465e443f3cd5ef3ba52304ab8b5dc6e0d7e620'/>
<id>urn:sha1:db465e443f3cd5ef3ba52304ab8b5dc6e0d7e620</id>
<content type='text'>
Long story short, fix build on recent (3.2+) clang.

The long story for posterity follows.

gcc 4.6 added new warnings about structs with greater visibility than
their fields. The warnings were silenced by adjusting visibility in

commit d5523ead90b6be2b07d4af745b8ed9b980a6b9f1
Author: Carl Worth &lt;cworth@cworth.org&gt;
Date:   Wed May 11 13:23:13 2011 -0700

    Mark some structures in the library interface with visibility=default attribute.

Later on,

commit 3b76adf9e2c026dd03b820f4c6eab50e25444113
Author: Austin Clements &lt;amdragon@MIT.EDU&gt;
Date:   Sat Jan 14 19:17:33 2012 -0500

    lib: Add support for automatically excluding tags from queries

changed visibility of struct _notmuch_string_list for the same reason, and

commit 1a53f9f116fa7c460cda3df532be921baaafb082
Author: Mark Walters &lt;markwalters1009@gmail.com&gt;
Date:   Thu Mar 1 22:30:38 2012 +0000

    lib: Add the exclude flag to notmuch_query_search_threads

split the struct _notmuch_string_list and its typedef
notmuch_string_list_t as a way to make a forward declaration for
_notmuch_thread_create().

The subtle difference was that the struct definition now had 'visible'
in it, while the typedef didn't, and it was within the #pragma GCC
visibility push(hidden) block. This went unnoticed, as the then common
versions of clang didn't care about this.

A later change in clang (I did not dig into when this change was
introduced) caused the following error:

CXX  -O2 lib/database.o
In file included from lib/database.cc:21:
In file included from ./lib/database-private.h:33:
./lib/notmuch-private.h:479:8: error: visibility does not match previous declaration
struct visible _notmuch_string_list {
       ^
./lib/notmuch-private.h:67:33: note: expanded from macro 'visible'
                                ^
./lib/notmuch-private.h:52:13: note: previous attribute is here
            ^
1 error generated.
make: *** [lib/database.o] Error 1

This is slightly misleading due to the reference to the #pragma. The
real culprit is the typedef within the #pragma.

We could just add 'visible' to the typedef, or move the typedef
outside of the #pragma, and be done with it, but juggle the
declarations a bit to accommodate moving the typedef back with the
struct, and keep the visibility attribute in one place.

The problem was originally reported by Simonas Kazlauskas
&lt;s@kazlauskas.me&gt; in id:20130418102507.GA23688@godbox but I was only
able to reproduce and investigate now that I upgraded clang.
</content>
</entry>
<entry>
<title>lib: Document which strings are returned in UTF-8</title>
<updated>2013-08-13T15:43:34Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2013-08-12T18:40:35Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=3fbb518335fe2271a31a6c4779affa4df42cf203'/>
<id>urn:sha1:3fbb518335fe2271a31a6c4779affa4df42cf203</id>
<content type='text'>
Any string that ultimately comes from notmuch_message_file_get_header
is in UTF-8.
</content>
</entry>
<entry>
<title>lib: add --exclude=all option</title>
<updated>2013-05-14T00:32:03Z</updated>
<author>
<name>Mark Walters</name>
<email>markwalters1009@gmail.com</email>
</author>
<published>2013-05-11T19:50:02Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=38698d86596af64fa25c118dafef0249155ca7a4'/>
<id>urn:sha1:38698d86596af64fa25c118dafef0249155ca7a4</id>
<content type='text'>
Adds a exclude all option to the lib which means that excluded
messages are completely ignored (as if they had actually been
deleted).
</content>
</entry>
<entry>
<title>lib: Eliminate _notmuch_message_list_append</title>
<updated>2013-02-19T00:20:38Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-11-25T04:57:04Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d6e3905df7cacb14832cd045280347f36fb0be19'/>
<id>urn:sha1:d6e3905df7cacb14832cd045280347f36fb0be19</id>
<content type='text'>
This API invited micro-optimized and complicated list pointer
manipulation and is no longer used.
</content>
</entry>
</feed>
