| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
Add --keep option to keep any remaining stuff in index or file. We
could distinguish between failures to index and failures to apply tags
or maildir sync, but for simplicity just have one.
|
|
|
|
|
|
|
| |
Handle failures gracefully in add_file_to_database, renamed simply
add_file while at it. Add keep option to not remove the message from
database if tagging or tag syncing to maildir flags fails. Expand the
function documentation to cover the changes.
|
|
|
|
|
|
|
| |
Make the function calls make more sense as independent building blocks
of the big picture, with clear inputs and outputs. Split up
write_message into two. Improve function documentation. Cleanup and
clarify the error paths.
|
|
|
|
|
|
| |
This will clean up the usage. There's the slight functional change of
potentially ending up doing extra gethostname and getpid calls, but
this is neglible.
|
|
|
|
|
|
|
| |
Combine make_directory() and make_directory_and_parents() into a
single recursive mkdir_recursive() function. Clarify the code and
improve error handling. Improve error messages. Switch to using the
new function in maildir_create_folder(). Constify talloc context.
|
|
|
|
|
| |
Clarify the code slightly, improve error messages. Apart from the
error message changes, no functional changes.
|
|
|
|
|
|
| |
The copying has nothing to do with stdin, so call it copy_fd
instead. While at it, improve documentation and reverse the
parameters, as destination is traditionally the first parameter.
|
|
|
|
|
|
| |
Move add_file_to_database around to keep the filesystem related
functions grouped together, improving readability. No functional
changes.
|
|
|
|
|
|
| |
An "is something" predicate conveys the meaning better. While at it,
improve the function documentation and error message. Besides the
error message change, no functional changes.
|
|
|
|
|
|
| |
Change insert_message into write_message and move its responsibilities
for indexing the message into the main function, to simplify the control
flow.
|
|
|
|
|
| |
Check new.tags configuration values before doing anything, and bail
out on invalid values.
|
|
|
|
|
|
| |
Apart from the status codes for format mismatches, the non-zero exit
status codes have been arbitrary. Make the cli consistently return
either EXIT_SUCCESS or EXIT_FAILURE.
|
|
|
|
| |
Don't synchronize maildir flags if the user doesn't want it.
|
|
|
|
|
| |
Allow the insert command to create the maildir folder
into which the new message should be delivered.
|
|
|
|
|
| |
Allow the new message to be inserted into a folder within the Maildir
hierarchy instead of the top-level folder.
|
|
The notmuch insert command reads a message from standard input,
writes it to a Maildir folder, and then incorporates the message into
the notmuch database. Essentially it moves the functionality of
notmuch-deliver into notmuch.
Though it could be used as an alternative to notmuch new, the reason
I want this is to allow my notmuch frontend to add postponed or sent
messages to the mail store and notmuch database, without resorting to
another tool (e.g. notmuch-deliver) nor directly modifying the maildir.
|