<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/notmuch-insert.c, branch 0.31.3</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.31.3</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.31.3'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2019-06-14T10:41:27Z</updated>
<entry>
<title>cli: run uncrustify</title>
<updated>2019-06-14T10:41:27Z</updated>
<author>
<name>uncrustify</name>
<email>david@tethera.net</email>
</author>
<published>2019-06-13T10:31:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=33382c2b5ba2537952a60ea378feff36961e4713'/>
<id>urn:sha1:33382c2b5ba2537952a60ea378feff36961e4713</id>
<content type='text'>
This is the result of running

     $ uncrustify --replace --config devel/uncrustify.cfg *.c *.h

in the top level source directory
</content>
</entry>
<entry>
<title>gmime-cleanup: drop all arguments unused in GMime 3</title>
<updated>2019-05-03T09:56:38Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2019-05-02T13:19:41Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b7ac4c05e118047442378f58eeb69d43bd1cbdb1'/>
<id>urn:sha1:b7ac4c05e118047442378f58eeb69d43bd1cbdb1</id>
<content type='text'>
This means dropping GMimeCryptoContext and notmuch_config arguments.

All the argument changes are to internal functions, so this is not an
API or ABI break.

We also get to drop the #define for g_mime_3_unused.

signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>cli/insert: add --world-readable flag</title>
<updated>2018-03-24T23:08:11Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2018-02-09T04:10:58Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b6e3efde05ed72fa1b9c017093aaf56d70b533c1'/>
<id>urn:sha1:b6e3efde05ed72fa1b9c017093aaf56d70b533c1</id>
<content type='text'>
In some cases (e.g. when building a publicly-visible e-mail archive)
it doesn't make any sense to restrict visibility of the message to the
current user account.

This adds a --world-readable boolean option for "notmuch insert", so
that those who want to archive their mail publicly can feed their
archiver with:

    notmuch insert --world-readable

Other local delivery agents (postfix's local, and dovecot's lda) all
default to delivery in mode 0600 rather than relying on the user's
umask, so this fix doesn't change the default.

Also, this does not override the user's umask.  if the umask is
already set tight, it will not become looser as the result of passing
--world-readable.

Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>cli: use the negating boolean support for new and insert --no-hooks</title>
<updated>2017-12-13T12:28:37Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2017-10-14T13:16:07Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e29ec5f0e9d36a8ccf335b30554408d4b6cbbc28'/>
<id>urn:sha1:e29ec5f0e9d36a8ccf335b30554408d4b6cbbc28</id>
<content type='text'>
This lets us use the positive hooks variable in code, increasing
clarity.
</content>
</entry>
<entry>
<title>cli: allow empty strings for notmuch insert --folder argument</title>
<updated>2017-11-08T14:46:44Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2017-10-14T13:15:43Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=733ccfabca350f65a1d0ba1f64792a8a436da273'/>
<id>urn:sha1:733ccfabca350f65a1d0ba1f64792a8a436da273</id>
<content type='text'>
Now that it's easy to add argument specific modifiers in opt
descriptions, add a new .allow_empty field to allow empty strings for
individual string arguments while retaining strict checks
elsewhere. Use this for notmuch insert --folder, where the empty
string means top level folder.
</content>
</entry>
<entry>
<title>cli/insert: add --try-decrypt=(true|false)</title>
<updated>2017-10-21T22:58:43Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2017-10-21T02:25:47Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c5356b9ed56e42d36ca18206155b62c94cfbd79d'/>
<id>urn:sha1:c5356b9ed56e42d36ca18206155b62c94cfbd79d</id>
<content type='text'>
Enable override of the index.try_decrypt setting on a per-message
basis when invoking "notmuch insert".

We also update the documentation and tab completion, and add more tests.
</content>
</entry>
<entry>
<title>cli: convert notmuch_bool_t to stdbool</title>
<updated>2017-10-10T01:24:02Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2017-10-07T08:44:04Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0f314c0c99befea599a68bea51d759b4133efef6'/>
<id>urn:sha1:0f314c0c99befea599a68bea51d759b4133efef6</id>
<content type='text'>
C99 stdbool turned 18 this year. There really is no reason to use our
own, except in the library interface for backward
compatibility. Convert the cli and test binaries to stdbool.
</content>
</entry>
<entry>
<title>cli: use designated initializers for opt desc</title>
<updated>2017-10-05T01:00:42Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2017-10-01T20:53:11Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4a6721970a42a9f86149fb5d395d1001fed2d305'/>
<id>urn:sha1:4a6721970a42a9f86149fb5d395d1001fed2d305</id>
<content type='text'>
Several changes at once, just to not have to change the same lines
several times over:

- Use designated initializers to initialize opt desc arrays.

- Only initialize the needed fields.

- Remove arg_id (short options) as unused.

- Replace opt_type and output_var with several type safe output
  variables, where the output variable being non-NULL determines the
  type. Introduce checks to ensure only one is set. The downside is
  some waste of const space per argument; this could be saved by
  retaining opt_type and using a union, but that's still pretty
  verbose.

- Fix some variables due to the type safety. Mostly a good thing, but
  leads to some enums being changed to ints. This is pedantically
  correct, but somewhat annoying. We could also cast, but that defeats
  the purpose a bit.

- Terminate the opt desc arrays using {}.

The output variable type safety and the ability to add new fields for
just some output types or arguments are the big wins. For example, if
we wanted to add a variable to set when the argument is present, we
could do so for just the arguments that need it.

Beauty is in the eye of the beholder, but I think this looks nice when
defining the arguments, and reduces some of the verbosity we have
there.
</content>
</entry>
<entry>
<title>cli: strip trailing "/" from the final maildir path in notmuch insert</title>
<updated>2017-10-05T01:00:19Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2017-10-01T20:53:10Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d57da17fcd30a5cbe191ccd42906e489dd2bd6a3'/>
<id>urn:sha1:d57da17fcd30a5cbe191ccd42906e489dd2bd6a3</id>
<content type='text'>
Several subtle interconnected changes here:

- If the folder name passed as argument is the empty string "" or
  slash "/", the final maildir path would end up having "//" in it. We
  should strip the final maildir path, not folder.

- The folder variable should really be const char *, another reason
  not to modify it.

- The maildir variable is only const to let us point it at db_path
  directly.

To be able to strip the maildir variable, always allocate it. Default
folder to the empty string "", and don't treat folder not being
present on the command line as anything special.

As a side effect, we also create the cur/new/tmp in the top level
directory if they're not there and --create-folder is given.
</content>
</entry>
<entry>
<title>database: add n_d_index_file (deprecates n_d_add_message)</title>
<updated>2017-08-23T10:38:37Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2017-08-17T23:14:25Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b10ce6bc23002d48916b1b2f375480e7540e3164'/>
<id>urn:sha1:b10ce6bc23002d48916b1b2f375480e7540e3164</id>
<content type='text'>
We need a way to pass parameters to the indexing functionality on the
first index, not just on reindexing.  The obvious place is in
notmuch_database_add_message.  But since modifying the argument list
would break both API and ABI, we needed a new name.

I considered notmuch_database_add_message_with_params(), but the
functionality we're talking about doesn't always add a message.  It
tries to index a specific file, possibly adding a message, but
possibly doing other things, like adding terms to an existing message,
or failing to deal with message objects entirely (e.g. because the
file didn't contain a message).

So i chose the function name notmuch_database_index_file.

I confess i'm a little concerned about confusing future notmuch
developers with the new name, since we already have a private
_notmuch_message_index_file function, and the two do rather different
things.  But i think the added clarity for people linking against the
future libnotmuch and the capacity for using index parameters makes
this a worthwhile tradeoff.  (that said, if anyone has another name
that they strongly prefer, i'd be happy to go with it)

This changeset also adjusts the tests so that we test whether the new,
preferred function returns bad values (since the deprecated function
just calls the new one).

We can keep the deprecated n_d_add_message function around as long as
we like, but at the next place where we're forced to break API or ABI
we can probably choose to drop the name relatively safely.

NOTE: there is probably more cleanup to do in the ruby and go bindings
to complete the deprecation directly.  I don't know those languages
well enough to attempt a fix; i don't know how to test them; and i
don't know the culture around those languages about API additions or
deprecations.
</content>
</entry>
</feed>
