<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/message-file.c, branch 0.19_rc1</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.19_rc1</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.19_rc1'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2014-07-13T15:25:29Z</updated>
<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: resurrect support for single-message mbox files</title>
<updated>2014-06-14T01:59:04Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2014-06-05T06:34:09Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0cc0144875875fe974fe0851b5c2c21d63d9b06d'/>
<id>urn:sha1:0cc0144875875fe974fe0851b5c2c21d63d9b06d</id>
<content type='text'>
This is effectively a revert of

commit 6812136bf576d894591606d9e10096719054d1f9
Author: Jani Nikula &lt;jani@nikula.org&gt;
Date:   Mon Mar 31 00:21:48 2014 +0300

    lib: drop support for single-message mbox files

The intention was to drop support for indexing new single-message mbox
files (and whether that was a good idea in the first place is
arguable). However this inadvertently broke support for reading
headers from previously indexed single-message mbox files, which is
far worse.

Distinguishing between the two cases would require more code than
simply bringing back support for single-message mbox files.
</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/cli: pass GMIME_ENABLE_RFC2047_WORKAROUNDS to g_mime_init()</title>
<updated>2013-09-14T17:13:43Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2013-09-11T17:36:43Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=71521f06b00a01c5b0eaea5f5f624fe57ed7f426'/>
<id>urn:sha1:71521f06b00a01c5b0eaea5f5f624fe57ed7f426</id>
<content type='text'>
As explained by Jeffrey Stedfast, the author of GMime, quoted in [1]:

&gt; Passing the GMIME_ENABLE_RFC2047_WORKAROUNDS flag to g_mime_init()
&gt; *should* solve the decoding problem mentioned in the thread. This
&gt; flag should be safe to pass into g_mime_init() without any bad side
&gt; effects and my unit tests do test that code-path.

The thread being referred to is [2].

[1] id:87bo56viyo.fsf@nikula.org
[2] id:08cb1dcd-c5db-4e33-8b09-7730cb3d59a2@gmail.com
</content>
</entry>
<entry>
<title>lib/message-file.c: use g_malloc () &amp; g_free () in hash table values</title>
<updated>2012-12-24T23:02:05Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2012-12-21T17:52:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=27dacc7947309bb8f6f84b2cd83dc7ec280576b2'/>
<id>urn:sha1:27dacc7947309bb8f6f84b2cd83dc7ec280576b2</id>
<content type='text'>
The message-&gt;headers hash table values get data returned by
g_mime_utils_header_decode_text ().

The pointer returned by g_mime_utils_header_decode_text is from the
following line in rfc2047_decode_tokens

        return g_string_free (decoded, FALSE);

The docs for g_string_free say

 Frees the memory allocated for the GString. If free_segment is TRUE
 it also frees the character data. If it's FALSE, the caller gains
 ownership of the buffer and must free it after use with g_free().

The remaining frees and allocations referencing to message-&gt;headers hash
values have been changed to use g_free and g_malloc functions.

This combines and completes the changes started by David Bremner.
</content>
</entry>
<entry>
<title>Fix appending of Received headers</title>
<updated>2011-06-11T00:03:14Z</updated>
<author>
<name>Stewart Smith</name>
<email>stewart@flamingspork.com</email>
</author>
<published>2011-05-17T02:10:32Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c86d77b16ad03903c6ccf9e5cd18f477f2e5bf63'/>
<id>urn:sha1:c86d77b16ad03903c6ccf9e5cd18f477f2e5bf63</id>
<content type='text'>
We're not properly concatenating the Received headers if we parse them
while requesting a header that isn't Received.

this fixes notmuch-reply address detection in a bunch of situations.
</content>
</entry>
<entry>
<title>lib/message-file: plug three memleaks.</title>
<updated>2011-06-03T19:30:55Z</updated>
<author>
<name>Anton Khirnov</name>
<email>anton@khirnov.net</email>
</author>
<published>2011-05-28T21:51:51Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d3fdb76c8d5e1535ead0086821775cf7809d6e1c'/>
<id>urn:sha1:d3fdb76c8d5e1535ead0086821775cf7809d6e1c</id>
<content type='text'>
Signed-off-by: Jameson Graef Rollins &lt;jrollins@finestructure.net&gt;
</content>
</entry>
<entry>
<title>Make Received: header special in notmuch_message_file_get_header</title>
<updated>2010-04-26T21:44:06Z</updated>
<author>
<name>Dirk Hohndel</name>
<email>hohndel@infradead.org</email>
</author>
<published>2010-04-26T19:58:34Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5b8b0377cb68904eac8fc58a933d47f605a81725'/>
<id>urn:sha1:5b8b0377cb68904eac8fc58a933d47f605a81725</id>
<content type='text'>
With this patch the Received: header becomes special in the way
we treat headers - this is the only header for which we concatenate
all the instances we find (instead of just returning the first one).

This will be used in the From guessing code for replies as we need to
be able to walk ALL of the Received: headers in a message to have a
good chance to guess which mailbox this email was delivered to.

Signed-off-by: Dirk Hohndel &lt;hohndel@infradead.org&gt;
</content>
</entry>
<entry>
<title>fix notmuch_message_file_get_header</title>
<updated>2010-04-07T01:47:28Z</updated>
<author>
<name>Dirk Hohndel</name>
<email>hohndel@infradead.org</email>
</author>
<published>2010-04-06T19:45:30Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a48f3687785b2c138b2c47848bd05512fc893a0b'/>
<id>urn:sha1:a48f3687785b2c138b2c47848bd05512fc893a0b</id>
<content type='text'>
fix notmuch_message_file_get_header to always return the first instance
 of the header you are looking for

Signed-off-by: Dirk Hohndel &lt;hohndel@infradead.org&gt;
</content>
</entry>
<entry>
<title>message_file_get_header: Use break where more clear than continue.</title>
<updated>2009-11-18T02:37:45Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2009-11-18T02:37:45Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8cf72920e11c950fe7ae76cb762f79506aa8acfe'/>
<id>urn:sha1:8cf72920e11c950fe7ae76cb762f79506aa8acfe</id>
<content type='text'>
Calling continue here worked only because we set a flag before the
continue, and, check the flag at the beginning of the loop, and *then*
break. It's much more clear to just break in the first place.
</content>
</entry>
</feed>
