aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* test: emacs: new tests "notmuch-show: {add,remove} multiple tags {to,from} ↵Gravatar Pieter Praet2012-12-11
| | | | | | | | | | | | | | | | single message" * test/emacs: - Rename subtests "{Add,Remove} tag from notmuch-show view" to "notmuch-show: {add,remove} single tag {to,from} single message" to be consistent with the following tests. - New subtest "notmuch-show: add multiple tags to single message": `notmuch-show-add-tag' ("+") can add multiple tags to a message. - New subtest "notmuch-show: remove multiple tags from single message": `notmuch-show-remove-tag' ("-") can remove multiple tags from a message.
* contrib: pick: bugfix for pick splitting the window excessivelyGravatar Mark Walters2012-12-11
| | | | | | | | | | Previously if you carried on past the last message in a pick view pick would get confused and `forget' about the split pane and would try and re-split when moving up again. This was due to faulty logic in notmuch-pick-show-message: something that should have been in the (when message) clause was not. Thanks to jrollins for the bug report.
* NEWS: under-the-hood Emacs interface fixesGravatar Tomi Ollila2012-12-10
| | | | | | | | | | | Added the following Emacs Interface NEWS entries: Catch errors bodypart insertions may throw, Improved text/calendar content handling and Disabled coding conversions when reading in `with-current-notmuch-show-message`. Thanks to Austin and David for content improvements.
* emacs: add support for stashing the thread id in show viewGravatar Jani Nikula2012-12-09
| | | | | Add a prefix argument to notmuch-show-stash-message-id to stash thread id instead of message id.
* tag-util: optimization of tag applicationGravatar David Bremner2012-12-09
| | | | | | | | | The idea is not to bother with restore operations if they don't change the set of tags. This is actually a relatively common case. In order to avoid fancy datastructures, this method is quadratic in the number of tags; at least on my mail database this doesn't seem to be a big problem.
* notmuch-{dump,restore}.1: document new format optionsGravatar David Bremner2012-12-09
| | | | | More or less arbitrarily, notmuch-dump.1 gets the more detailed description of the format.
* test/dump-restore: add test for warning/error messagesGravatar David Bremner2012-12-09
| | | | | | We want to test both that error/warning messages are generated when they should be, and not generated when they should not be. This varies between restore and batch tagging.
* test: second set of dump/restore --format=batch-tag testsGravatar David Bremner2012-12-09
| | | | | | | | These one need the completed functionality in notmuch-restore. Fairly exotic tags are tested, but no weird message id's. We test each possible input to autodetection, both explicit (with --format=auto) and implicit (without --format).
* test: update dump-restore roundtripping test for batch-tag formatGravatar David Bremner2012-12-09
| | | | | Now we can actually round trip these crazy tags and and message ids. hex-xcode is no longer needed as it's built in.
* notmuch-restore: normalize case of error messages.Gravatar David Bremner2012-12-09
| | | | | In English, (unlike German) one does not capitalize the first word after a colon.
* notmuch-restore: add support for input format 'batch-tag'Gravatar David Bremner2012-12-09
| | | | | | | | | | | | | | | | | | | | | | This can be enabled with the new --format=batch-tag command line option to "notmuch restore". The input must consist of lines of the format: +<tag>|-<tag> [...] [--] id:<msg-id> Each line is interpreted similarly to "notmuch tag" command line arguments. The delimiter is one or more spaces ' '. Any characters in <tag> and <search-terms> MAY be hex encoded with %NN where NN is the hexadecimal value of the character. Any ' ' and '%' characters in <tag> and <msg-id> MUST be hex encoded (using %20 and %25, respectively). Any characters that are not part of <tag> or <search-terms> MUST NOT be hex encoded. Leading and trailing space ' ' is ignored. Empty lines and lines beginning with '#' are ignored. Commit message mainly stolen from Jani's batch tagging commit, to follow.
* tag-util.[ch]: New files for common tagging routinesGravatar David Bremner2012-12-09
| | | | | | | | | These are meant to be shared between notmuch-tag and notmuch-restore. The bulk of the routines implement a "tag operation list" abstract data type act as a structured representation of a set of tag operations (typically coming from a single tag command or line of input).
* util: add string-util.[ch]Gravatar David Bremner2012-12-08
| | | | | | This is to give a home to strtok_len. It's a bit silly to add a header for one routine, but it needs to be shared between several compilation units (or at least that's the most natural design).
* test: add sanity check for dump --format=batch-tag.Gravatar David Bremner2012-12-08
| | | | | It's important this does not rely on restore, since it hasn't been written yet.
* notmuch-dump: add --format=(batch-tag|sup)Gravatar David Bremner2012-12-08
| | | | | | | | | | | | | | | | sup is the old format, and remains the default, at least until restore is converted to parse this format. Each line of the batch-tag format is modelled on the syntax of notmuch tag: - "notmuch tag" is omitted from the front of the line - The dump format only uses query strings of a single message-id. - Each space seperated tag/message-id is 'hex-encoded' to remove trouble-making characters. - It is permitted (and will be useful) for there to be no tags before the query. In particular this format won't have the same problem with e.g. spaces in message-ids or tags; they will be round-trip-able.
* Updating man pages for new S-Expression output format.Gravatar Peter Feigl2012-12-08
| | | | | Add sections about the new S-Expression output format (--format=sexp) to the notmuch-search, notmuch-reply and notmuch-show man pages.
* Adding tests for --format=sexp.Gravatar Peter Feigl2012-12-08
| | | | | Add basic tests, the same as for json, for the S-Expression output format.
* Use the S-Expression structured printer in notmuch-show, notmuch-reply and ↵Gravatar Peter Feigl2012-12-08
| | | | | | | notmuch-search. This patch uses the new S-Expression printer in the notmuch CLI (show, search and reply). You can now use --format=sexp for any of them.
* Rename the -json printer functions in notmuch-reply and notmuch-show to ↵Gravatar Peter Feigl2012-12-08
| | | | | | | | | generic -sprinter functions. All the structured output functions in notmuch-reply and notmuch-show are renamed to a generic name (as they do not contain any json-specific code anyway). This patch is a preparation to actually using the new S-Expression sprinter in notmuch-reply and notmuch-show.
* Adding an S-expression structured output printer.Gravatar Peter Feigl2012-12-08
| | | | | | | | | | | | | | | This commit adds a structured output printer for Lisp S-Expressions. Later commits will use this printer in notmuch search, show and reply. The structure is the same as json, but: - arrays are written as lists: ("foo" "bar" "baaz" 1 2 3) - maps are written as p-lists: (:key "value" :other-key "other-value") - true is written as t - false is written as nil - null is written as nil [ whitespace changes by db ]
* test: use perl instead of sed -r for portabilityGravatar Jani Nikula2012-12-08
| | | | | Our OS X users report -r is not a supported option for sed. Use perl instead.
* test: wrap 'wc -l' results in arithmetic evaluation to strip whitespaceGravatar Jani Nikula2012-12-08
| | | | | This is for portability, as 'wc -l' emits whitespace on some BSD variants. Suggested by Tomi Ollila <tomi.ollila@iki.fi>.
* test: fix count testGravatar Jani Nikula2012-12-08
| | | | | | | The quoting for ${SEARCH} is broken when it's supposed to be '*', and it seems tricky to get it right. Just drop the variable and use '*' directly. Before this, none of the messages ever matched, and the test was comparing zeros.
* test: Fix UTF-8 JSON tests in Python 3Gravatar Austin Clements2012-12-08
| | | | | | | | | | | test_expect_equal_json uses json.tool from the system Python. While Python 2 wasn't picky about the encoding of stdin, Python 3 decodes stdin strictly according to the environment. Since we set LC_ALL=C for the tests, Python 3's json.tool was assuming stdin would be in ASCII and aborting when it couldn't decode the UTF-8 characters from some of the JSON tests. This patch sets the PYTHONIOENCODING environment variable to utf-8 when invoking json.tool to override Python's default encoding choice.
* Changing build tool for test/random-corpus to CXX instead of CC.Gravatar Peter Feigl2012-12-06
| | | | | | | | | | Without this change, GCC complains as follows: gcc test/random-corpus.o test/database-test.o notmuch-config.o command-line-arguments.o lib/libnotmuch.a util/libutil.a parse-time-string/libparse-time-string.a -o test/random-corpus -lgmime-2.6 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -Wl,-rpath,/usr/lib -ltalloc -lxapian /usr/bin/ld: lib/libnotmuch.a(database.o): undefined reference to symbol '_ZNSs4_Rep10_M_destroyERKSaIcE@@GLIBCXX_3.4' /usr/bin/ld: note: '_ZNSs4_Rep10_M_destroyERKSaIcE@@GLIBCXX_3.4' is defined in DSO /usr/lib/libstdc++.so.6 so try adding it to the linker command line /usr/lib/libstdc++.so.6: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make: *** [test/random-corpus] Error 1
* Adding parse-time to test/.gitignoreGravatar Peter Feigl2012-12-06
| | | | test/parse-time is a binary that is generated when running make test. It should be ignored by git.
* NEWS: removal of notmuch-foldersGravatar Jani Nikula2012-12-06
|
* emacs: show: refresh buffer did not remove overlaysGravatar Mark Walters2012-12-06
| | | | | | | | | Previously refreshing the notmuch show buffer did not remove overlays which meant that if the user refreshed a message with images the images would remain and then the new text was added after. One might have guessed that erase-buffer would have removed them but it seems not. Thus force the removal of overlays with remove-overlays.
* emacs: stash bugfixGravatar Mark Walters2012-12-06
| | | | | | Currently an attempt to stash a non-existent field (eg cc when not present) throws an error. Catch this case and give the user a warning message.
* cli: convert "notmuch new" to the argument parserGravatar Jani Nikula2012-12-04
| | | | | | Use the notmuch argument parser to handle arguments in "notmuch new". As a side effect, this fixes broken STRNCMP_LITERAL usage that accepts, for example, --verbosefoo for --verbose.
* cli: fix notmuch top level argument parsingGravatar Jani Nikula2012-12-04
| | | | | Use strcmp instead of STRNCMP_LITERAL, which matches the prefix instead of the whole argument.
* emacs: drop support for deprecated notmuch-foldersGravatar Jani Nikula2012-12-04
| | | | | | | | | | | | Remove notmuch-folders which has been deprecated since commit a4669217600e4536dc0c49f0255af5e2d9bc183f Author: Carl Worth <cworth@cworth.org> Date: Mon Apr 26 22:42:07 2010 -0700 emacs: Rip out all of the notmuch-folder code. This lets us simplify the notmuch-saved-searches code slightly.
* test: fix an evident copy-paste error in argument parsing testGravatar Jani Nikula2012-12-04
|
* contrib: pick: use notmuch-clean-addressGravatar Mark Walters2012-12-03
| | | | | Now notmuch-clean-address is split out in show pick can use that (with a small wrapper).
* test: add broken roundtrip testGravatar David Bremner2012-12-02
| | | | | | | | | | We demonstrate the current notmuch restore parser being confused by message-id's and tags containing non alpha numeric characters (particularly space and parentheses are problematic because they are not escaped by notmuch dump). We save the files as hex escaped on disk so that terminal emulators will not get confused if the test fails (as we mostly expect it to do).
* test: add generator for random "stub" messagesGravatar David Bremner2012-12-02
| | | | | | | | | | | | | | | | Initial use case is testing dump and restore, so we only have message-ids and tags. The message ID's are nothing like RFC compliant, but it doesn't seem any harder to roundtrip random UTF-8 strings than RFC-compliant ones. Tags are UTF-8, even though notmuch is in principle more generous than that. updated for id:m2wr04ocro.fsf@guru.guru-group.fi - talk about Unicode value rather some specific encoding - call talloc_realloc less times
* test: add database routines for testingGravatar David Bremner2012-12-02
| | | | | | | | Initially, provide a way to create "stub" messages in the notmuch database without corresponding files. This is essentially cut and paste from lib/database.cc. This is a seperate file since we don't want to export these symbols from libnotmuch or bloat the library with non-exported code.
* test/hex-escaping: new test for hex escaping routinesGravatar David Bremner2012-12-02
| | | | | | These are more like unit tests, to (try to) make sure the library functionality is working before building more complicated things on top of it.
* test/hex-xcode: new test binaryGravatar David Bremner2012-12-02
| | | | | | This program is used both as a test-bed/unit-tester for ../util/hex-escape.c, and also as a utility in future tests of dump and restore.
* hex-escape: (en|de)code strings to/from restricted character setGravatar David Bremner2012-12-02
| | | | | | | The character set is chosen to be suitable for pathnames, and the same as that used by contrib/nmbug [With additions by Jani Nikula]
* contrib: pick: use async parser from libGravatar Mark Walters2012-12-01
| | | | | This moves notmuch-pick to use the newly split out async json parser from notmuch-lib.el.
* contrib: pick: remove some debug timing messagesGravatar markwalters10092012-12-01
| | | | | When I submitted notmuch-pick I deleted most of the debug messages but I missed two cases. Remove them now.
* emacs: Split the function notmuch-show-clean-addressGravatar Mark Walters2012-12-01
| | | | | | | | This function is also used by pick so split it out in preperation for moving to lib. In fact, pick and show want a slightly different combination of name and email on return so make the separated function return them as a pair, and let show or pick extract the combination they want from that.
* lib: fix warnings when building with clangGravatar Jani Nikula2012-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | Building notmuch with CC=clang and CXX=clang++ produces the warnings: CC -O2 lib/tags.o lib/tags.c:43:5: warning: expression result unused [-Wunused-value] talloc_steal (tags, list); ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/talloc.h:345:143: note: expanded from: ...__location__); __talloc_steal_ret; }) ^~~~~~~~~~~~~~~~~~ 1 warning generated. CXX -O2 lib/message.o lib/message.cc:791:5: warning: expression result unused [-Wunused-value] talloc_reference (message, message->tag_list); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/talloc.h:932:36: note: expanded from: ...(_TALLOC_TYPEOF(ptr))_talloc_reference_loc((ctx),(ptr), __location__) ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Check talloc_reference() return value, and explicitly ignore talloc_steal() return value as it has no failure modes, to silence the warnings.
* news: add news entry for notmuch-pickGravatar markwalters10092012-12-01
|
* configure: really expand libdir_expandedGravatar David Bremner2012-12-01
| | | | | | | | | It turns out that if people really use configure in autotools style and pass libdir containing '${prefix}/foo' then the ldconfig previously failed. This uses sed for portability (versus bash parameter expansion with substitution) and hopefully a bit more robustness than blindly parameter expanding the string.
* performance-test: add units to In and OutGravatar David Bremner2012-11-29
| | | | | Austin Read enough Fine Manuals to figure out this is in multiples of 512 bytes.
* performance-test/README: update instructions for fetching corpus.Gravatar David Bremner2012-11-29
| | | | It turns out not everybody on the planet has my gpg key.
* test: Don't print 'nil' at the beginning of emacs-subject-to-filenameGravatar Austin Clements2012-11-29
|
* test: Use associative arrays to track external prereqsGravatar Austin Clements2012-11-29
| | | | | | | | | | | | | Previously, the test framework generated a variable name for each external prereq as a poor man's associative array. Unfortunately, prereqs names may not be legal variable names, leading to unintelligible bash errors like test_missing_external_prereq_emacsclient.emacs24_=t: command not found Using proper associative arrays to track prereqs, in addition to being much cleaner than generating variable names and using grep to carefully construct unique string lists, removes restrictions on prereq names.