summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-10-14cli: delete directory documents on directory removal0.21_rc0Jani Nikula
There was a problem with the directory documents being left behind when the filesystem directory was removed. This was worked around in [1]. However, that ignored the fact that the directory documents are also still listed by notmuch_directory_get_child_directories() leading to confusing results when running notmuch new. The directory documents are found and queued for removal over and over again. Fix the problem for real by removing the directory documents. This fixes the tests flagged as broken in [2]. The (non-deterministic) hack test from [3] also still passes with this change. [1] commit acd66cdec075312944e527febd46382e54d99367 [2] commit ed9ceda623d3f22fb66365b33db63c5c982067d3 [3] id:1441445731-4362-1-git-send-email-jani@nikula.org
2015-10-10lib: add interface to delete directory documentsJani Nikula
As mentioned in acd66cdec075312944e527febd46382e54d99367 we don't have an interface to delete directory documents, and they're left behind. Add the interface.
2015-10-10test: flag one more notmuch new test as brokenJani Nikula
Drop the test update added in [1] and mark the test as broken, like the tests flagged as broken in [2]. These all reflect the same underlying breakage with (lack of) directory deletion. [1] commit e4e04bbc328f990e36b77f508aef904d156029b1 [2] commit ed9ceda623d3f22fb66365b33db63c5c982067d3
2015-10-05lib: update doxygen comments to add @since for the new _st APIDavid Bremner
We should probably to this for all new functions introduced from now on.
2015-10-05ruby: use new query_search APIDavid Bremner
These changes should not be too surprising for users because the routines were already potentially throwing exceptions.
2015-10-05lib: migrate thread.cc to new query_search APIDavid Bremner
here we rely on thread_id_query being attached to the local talloc context, so no new cleanup code is needed.
2015-10-05lib: migrate notmuch_database_upgrade to new query_search APIDavid Bremner
Here we depend on the error path cleaning up query
2015-10-05python: update bindings for new count APIDavid Bremner
Note that any mismatches are not detected until runtime (if at all) with the python bindings, so tests are crucial
2015-10-05ruby: use new count APIDavid Bremner
This change of replacing ignoring errors with exceptions is intended, and indeed one of the main motivations for the libnotmuch API changes.
2015-10-05cli: update to use new count APIDavid Bremner
Essentially replace each call to notmuch_count_* with the corresponding _st call, followed by print_status_query.
2015-10-05lib: add versions of n_q_count_{message,threads} with status returnDavid Bremner
Although I think it's a pretty bad idea to continue using the old API, this allows both a more gentle transition for clients of the library, and allows us to break one monolithic change into a series
2015-10-05cli/count: simplify and document return value of print_countDavid Bremner
Essentially a cosmetic change.
2015-10-05lib: move query variable to function scopeDavid Bremner
This is a prelude to deallocating it (if necessary) on the error path.
2015-10-04nmbug-status: print config errors to stderrJani Nikula
Particularly scripted usage with stdout redirection can be confusing if errors are printed to stdout instead of stderr.
2015-10-01notmuch-emacs-mua: make --auto-daemon imply --create-frameTomi Ollila
Before this change with --auto-daemon but without --create-frame emacs server was started but no clients stay connected to it (in both graphical and terminal displays). Note that this changes how --client --auto-daemon works on graphical display; New emacs frame is now created for the message (and message-exit-actions hook appended).
2015-09-29notmuch-emacs-mua: do not create a frame by default with --clientJani Nikula
Make the default behaviour for --client the same as emacsclient default: do not create a new frame. Add a new option --create-frame, passing the same option to emacsclient to create a frame.
2015-09-29notmuch-emacs-mua: add --auto-daemon option to start Emacs daemon as neededJani Nikula
Automatically starting Emacs in daemon mode if the Emacs server is not running is a matter of preference better not hard coded in notmuch-emacs-mua. Add an option to control the behaviour.
2015-09-29notmuch-emacs-mua: move --client option handling aroundJani Nikula
Move --client handling to a more suitable location. No functional changes.
2015-09-29notmuch-emacs-mua: support --no-window-system also for non-clientJani Nikula
Clearly --no-window-system should be applicable without --client as well. Prepare for future changes with the naming of the variables.
2015-09-29man: clean up notmuch-emacs-mua man pageJani Nikula
Move --client description to a more suitable location, stylistic changes.
2015-09-29cli: use designated initializer to initialize add_files_stateJani Nikula
The side effect is that all of add_files_state will be initialized to zero, removing any lingering doubt that some of it might not be initialized. It's not a small struct, and the initialization is scattered around a bit, so this makes the code more readable.
2015-09-29nmbug-status: add support for specifying sort order for each viewJani Nikula
Let each view have a "sort" key, typically used with values "oldest-first" or "newest-first" (although all values in Query.SORT are accepted), and sort the results accordingly. Oldest first remains the default. The dynamic approach of mapping sort values is as suggested by W. Trevor King <wking@tremily.us>.
2015-09-26Merge branch 'release'David Bremner
bring debian specific changes into master
2015-09-26debian: changelog stanza for 0.20.2-2debian/0.20.2-2David Bremner
2015-09-26debian: fix linking in emacsen-install scriptDavid Bremner
When upgrading emacs, the install file can (apparently) be called with the lisp files already linked into the flavour specific directories. In this case we should not fail.
2015-09-26cli: do not sort addresses on --output=count or --deduplicate=addressJani Nikula
The order of the results with --output=count and --deduplicate=address are unspecified as they're based on a hash table traversal. This being the case, optimize the query by explicitly requesting unsorted results. Clarify the documentation accordingly.
2015-09-26man: document notmuch address --deduplicate=address optionJani Nikula
Document the deduplication based on case insensitive address.
2015-09-26test: add notmuch address --deduplicate=(no|mailbox|address) testsJani Nikula
First a simple smoke test first, next generate messages with multiple email address variants and check the behaviour of deduplication schemes with these.
2015-09-26cli: add support for deduplicating based on case insensitive addressJani Nikula
Consider all variants of an email address as one, and print the most common variant.
2015-09-26cli: change the data structure for notmuch address deduplicationJani Nikula
Currently we key the address hash table with the case sensitive "name <address>". Switch to case insensitive keying with just address, and store the case sensitive name and address in linked lists. This will be helpful in adding support for different deduplication schemes in the future. There will be a slight performance penalty for the current full case sensitive name + address deduplication, but this is simpler as a whole when other deduplication schemes are added, and I expect the schemes to be added to become more popular than the current default. Aparet from the possible performance penalty, the only user visible change should be the change in the output ordering for --output=count. The order is not guaranteed (and is based on hash table traversal) currently anyway, so this should be of no consequence.
2015-09-26util: add strcmp_null, a strcmp that handles NULL parametersJani Nikula
Add strcmp_null, a strcmp that handles NULL strings; in strcmp terms a NULL string is considered to be less than a non-NULL string.
2015-09-25lib: add support for date:<expr>..! to mean date:<expr>..<expr>Jani Nikula
It doesn't seem likely we can support simple date:<expr> expanding to date:<expr>..<expr> any time soon. (This can be done with a future version of Xapian, or with a custom query query parser.) In the mean time, provide shorthand date:<expr>..! to mean the same. This is useful, as the expansion takes place before interpetation, and we can use, for example, date:yesterday..! to match from beginning of yesterday to end of yesterday. Idea from Mark Walters <markwalters1009@gmail.com>.
2015-09-25test suite: don't consider skipped individual tests as failingDavid Bremner
It isn't completely clear what we want to do here, but 1) We currently don't fail if we skip a whole test file (mainly because we neglect to count those skipped tests properly). This change at least makes the two kinds of skipping consistent. 2) Automated build environments may have good reasons for building with a minimal set of prereqs, and we don't want to discourage running our test suite by breaking builds.
2015-09-25make test: NOTMUCH_TEST_QUIET=1 is now the defaultTomi Ollila
make test V=1 (or any other value than 0) and make test V=0 works similar way as build in general
2015-09-24man: document notmuch address --deduplicate=(no|mailbox) optionJani Nikula
Document the deduplication of results.
2015-09-24test: notmuch address --deduplicate=no testsJani Nikula
Test not using address deduplication. Incorporate some trivial output sorting tests here, as they seem to lack tests.
2015-09-24cli: add support for not deduplicating notmuch address resultsJani Nikula
Make it possible to use notmuch address as part of a | sort | uniq -c pipe instead of forcing --output=count. This is useful for combining results from multiple notmuch address queries.
2015-09-24test: check argc in symbol-testJani Nikula
Check argc mainly to fix unused parameter warning: test/symbol-test.cc:7:14: warning: unused parameter ‘argc’ [-Wunused-parameter] int main(int argc, char** argv) { ^ This makes more sense than telling the compiler it's unused on purpose.
2015-09-23lib: constify arguments to notmuch_query_get_*David Bremner
These functions are all just accessors, and it's pretty clear they don't modify the query struct. This also fixes one warning I created when I introduced status.c.
2015-09-23cli: convert remainder of CLI to n_q_search_{messages,threads}_stDavid Bremner
I think it would be no real problem to cut and paste the gdb based error message test from count to the other clients modified here, but I'm not currently convinced it's worth the trouble since the code path being tested is almost the the same, and the tests are relatively heavyweight.
2015-09-20cli/count: update to use notmuch_query_search_messages_stDavid Bremner
This brings back status information that may have been hidden by the great library logging conversion. Note the change of the internal API / return-value for count_files. The other count calls to the lib will also get error handling when that API is updated in the lib.
2015-09-20cli: add utility routine to print error status.David Bremner
No attention to formatting here, initially just focus on getting the relevant strings out of the library.
2015-09-09cli/count: apply uncrustify changesDavid Bremner
Leave the indentation alone because I don't know how to duplicate it with Emacs.
2015-09-07cli/count: remove unused argument handling for output=modificationsDavid Bremner
In the end this UI was rejected, but bits of it stayed in the code to confuse future generations.
2015-09-07util: move strcase_equal and strcase_hash to utilJani Nikula
For future use in both cli and lib.
2015-09-07cli: abstract new mailbox creationJani Nikula
We'll be needing more mailbox creation soon, so abstract it away. While at it, check for allocation failures. No other functional changes.
2015-09-07cli: g_hash_table_lookup_extended is overkillJani Nikula
Switch to normal glib hash table lookup. The extended version is only required if the values may contain NULL.
2015-09-07test: fix whitespace/indentation in symbol-testJani Nikula
Not of much consequence, but makes it nicer to do further edits.
2015-09-07cli: reset db directory mtime upon directory removalJani Nikula
The library does not have a function to remove a directory document for a path. Usually this doesn't matter except for a slight waste of space. However, if the same directory gets added to the filesystem again, the old directory document is found with the old mtime. Reset the directory mtime on removal to avoid problems. The corner case that can hit this problem is renaming directories back and forth. Renaming does not change the mtime of the directory in the filesystem, and thus the old db directory document mtime may match the fs mtime of the directory. The long term fix might be to add a library function to remove a directory document, however this is a much simpler and faster fix for the time being.
2015-09-07emacs: wrap current search in parens when filteringUli Scholler
When filtering the current search further with notmuch-search-filter, wrap the current search in parens (if necessary). This fixes unexpected behavior when the current search is complex (like "(tag:this and date:one_week_ago..) or tag:that").