aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-insert.c
Commit message (Collapse)AuthorAge
* cli/insert: require succesful message indexing for success statusGravatar Jani Nikula2014-10-18
| | | | | | 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.
* cli/insert: add fail path to add_file_to_databaseGravatar Jani Nikula2014-10-18
| | | | | | | 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.
* cli/insert: rehash file writing functionsGravatar Jani Nikula2014-09-24
| | | | | | | 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.
* cli/insert: abstract temporary filename generationGravatar Jani Nikula2014-09-24
| | | | | | 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.
* cli/insert: use a single recursive mkdir functionGravatar Jani Nikula2014-09-24
| | | | | | | 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.
* cli/insert: clean up sync_dirGravatar Jani Nikula2014-09-24
| | | | | Clarify the code slightly, improve error messages. Apart from the error message changes, no functional changes.
* cli/insert: rename file copy functionGravatar Jani Nikula2014-09-24
| | | | | | 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.
* cli/insert: move add_file_to_database to a better placeGravatar Jani Nikula2014-09-24
| | | | | | Move add_file_to_database around to keep the filesystem related functions grouped together, improving readability. No functional changes.
* cli/insert: rename check_folder_name to is_valid_folder_nameGravatar Jani Nikula2014-09-24
| | | | | | 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.
* cli: refactor insertGravatar Peter Wang2014-09-16
| | | | | | Change insert_message into write_message and move its responsibilities for indexing the message into the main function, to simplify the control flow.
* cli: make sure notmuch new and insert don't add invalid tagsGravatar Jani Nikula2014-03-06
| | | | | Check new.tags configuration values before doing anything, and bail out on invalid values.
* cli: clean up exit status code returned by the cli commandsGravatar Jani Nikula2014-01-18
| | | | | | 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.
* insert: respect maildir.synchronize_flagsGravatar Jani Nikula2014-01-03
| | | | Don't synchronize maildir flags if the user doesn't want it.
* insert: add --create-folder optionGravatar Peter Wang2013-07-04
| | | | | Allow the insert command to create the maildir folder into which the new message should be delivered.
* insert: add --folder optionGravatar Peter Wang2013-07-01
| | | | | Allow the new message to be inserted into a folder within the Maildir hierarchy instead of the top-level folder.
* cli: add insert commandGravatar Peter Wang2013-06-29
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.