aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* vim plugin: fix displaying attachments with non-ascii namesHEADvimAnton Khirnov2012-10-05
|
* vim plugin: fix vim_get_tags() with non-ascii tag names.Anton Khirnov2012-08-10
|
* vim plugin: more explicitly format the tags list in search results.Anton Khirnov2012-08-10
| | | | | Use ' '.join() instead of just calling str(). This also fixes printing non-ASCII tag names.
* vim plugin: refresh the threads list also on CursorHold event.Anton Khirnov2012-08-10
|
* vim plugin: incremental printing of search results.Anton Khirnov2012-08-06
| | | | Inspired by the same feature in the ruby plugin by Felipe Contreras.
* Merge remote-tracking branch 'origin/master' into vimAnton Khirnov2012-08-06
|\
| * NEWS: discuss changes for dump and restore syntax.David Bremner2012-08-06
| | | | | | | | | | The duplication in NEWS.Debian is so that Debian users will be warned during upgrade.
| * notmuch-restore: replace positional argument for input with optionDavid Bremner2012-08-06
| | | | | | | | | | Since notmuch dump doesn't use positional arguments anymore, it seems better to be consistent.
| * notmuch-dump: remove deprecated positional argument for output fileDavid Bremner2012-08-06
| | | | | | | | | | | | The syntax --output=filename is a smaller change than deleting the output argument completely, and conceivably useful e.g. when running notmuch under a debugger.
| * debian: alternately depend on emacs24 for notmuch-emacs, buildDavid Bremner2012-08-05
| | | | | | | | | | | | This should allow users to install notmuch-emacs with only emacs24 installed on their system. For good measure, allow building with emacs24 as a 4th choice.
| * show: Remove now unused fields from notmuch_show_formatAustin Clements2012-08-03
| | | | | | | | | | The message_set_{begin,sep,end} and null_message fields are no longer used because we now use the structure printer provided by the format.
| * show: Convert do_show to use sprinterAustin Clements2012-08-03
| |
| * show: Convert show_message to use sprinterAustin Clements2012-08-03
| | | | | | | | | | | | | | | | | | | | Unlike the previous patches, this function is used for all formats. However, for formats other than the JSON format, the sprinter methods used by show_message are all no-ops, so this code continues to function correctly for all of the formats. Converting show_message eliminates show_null_message in the process, since this maps directly to an sprinter method.
| * show: Convert envelope format_part_json to use sprinterAustin Clements2012-08-03
| |
| * show: Convert non-envelope format_part_json to use sprinterAustin Clements2012-08-03
| |
| * show: Convert format_part_sigstatus_json to use sprinterAustin Clements2012-08-03
| |
| * show: Convert format_headers_json to use sprinterAustin Clements2012-08-03
| | | | | | | | | | | | This no longer requires a talloc context (not that it really did before since it didn't return anything), so we remove its context argument.
| * show: Feed the sprinter down to part formattersAustin Clements2012-08-03
| | | | | | | | | | | | There are several levels of function calls between where we create the sprinter and the call to the part formatter in show_message. This feeds the sprinter through all of them and into the part formatters.
| * reply: Create a JSON sprinterAustin Clements2012-08-03
| |
| * show: Associate an sprinter with each formatAustin Clements2012-08-03
| | | | | | | | | | | | | | This associates an sprinter constructor with each show format and uses this to construct the appropriate sprinter. Currently nothing is done with this sprinter, but the following patches will weave it through the layers of notmuch show.
| * sprinter: Add a string_len methodAustin Clements2012-08-03
| | | | | | | | | | | | | | This method allows callers to output strings with specific lengths. It's useful both for strings with embedded NULs (which JSON can represent, though parser support is apparently spotty), and non-terminated strings.
| * test: Remove unnecessary JSON canonicalizationAustin Clements2012-08-03
| | | | | | | | | | | | Format canonicalization of JSON output is no longer necessary, so remove it. Value canonicalization (e.g., normalizing thread IDs) is still necessary, so all of the sanitization functions remain.
| * test: Uniformly canonicalize actual and expected JSONAustin Clements2012-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we used a variety of ad-hoc canonicalizations for JSON output in the test suite, but were ultimately very sensitive to JSON irrelevancies such as whitespace. This introduces a new test comparison function, test_expect_equal_json, that first pretty-prints *both* the actual and expected JSON and the compares the result. The current implementation of this simply uses Python's json.tool to perform pretty-printing (with a fallback to the identity function if parsing fails). However, since the interface it introduces is semantically high-level, we could swap in other mechanisms in the future, such as another pretty-printer or something that does not re-order object keys (if we decide that we care about that). In general, this patch does not remove the existing ad-hoc canonicalization because it does no harm. We do have to remove the newline-after-comma rule from notmuch_json_show_sanitize and filter_show_json because it results in invalid JSON that cannot be pretty-printed. Most of this patch simply replaces test_expect_equal and test_expect_equal_file with test_expect_equal_json. It changes the expected JSON in a few places where sanitizers had placed newlines after commas inside strings.
| * debian: close notmuch-mutt bug in changelogDavid Bremner2012-08-02
| | | | | | | | | | Apparently Stefano and I forgot to finish that discussion about how to patch the changelog.
| * emacs: show: exclude bug fixMark Walters2012-08-02
| | | | | | | | | | | | The pipe message function (when used with a prefix) uses a search of the form "id:<id1> or id:<id2>" etc. Since the user says precisely which messages are wanted by opening them it should not use excludes.
| * debian packaging: new depends for duplicate removals in mutt contribStefano Zacchiroli2012-08-02
| | | | | | | | both new hard dependency for File::Which and soft dependency on fdupes
| * Add duplicate message removal for notmuch-mutt.Kevin McCarthy2012-08-02
| | | | | | | | | | | | | | | | Add a --remove-dups flag which removes duplicate files from search and thread results. Uses fdupes if installed. Otherwise it runs a size and Digest::SHA scan on each file to detect duplicates. Signed-off-by: Stefano Zacchiroli <zack@upsilon.cc>
| * emacs: fix a bug introduced by the recent search cleanups.Mark Walters2012-08-02
| | | | | | | | | | | | | | In commit 5d0883e the function notmuch-search-next-thread was changed. In particular it only goes to the next message if there is a next message. This breaks notmuch-show-archive-thread-then-next. Fix this by going to the "next" message whenever we are on a current message.
| * debian: update changelog for cleaning changesDavid Bremner2012-08-02
| |
| * build system: remove configure output in Make distclean.David Bremner2012-08-02
| | | | | | | | | | | | | | | | | | | | | | | | Create a variable DISTCLEAN which contains a list of things to clean in the distclean target (in addition to running the clean target). The deleted comment seems to be false these days, since we do create files during configuration. Use "rm -rf" here as well in case we want to add directories to DISTCLEAN.
| * build system: remove directories created by tests in "make clean"David Bremner2012-08-02
| | | | | | | | | | | | | | | | | | These extra directories cause problems for building on Debian twice in a row. In order to remove directories, we need to us "rm -rf" instead of "rm -f". So now we should be extra careful what we add to the variable CLEAN.
| * configure: check whether shell is capable of parameter substring processingTomi Ollila2012-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'configure' script uses parameter substring extensively. It is Posix shell feature. Original Bourne shell does not have such features. Some systems still ships such shells as /bin/sh (for compatibility reasons -- shell scripts written on those platforms are expected to work on 1990's systems). Just testing whether parameter substring processing works will make the shell exit due to syntax error if it is not compatible. Therefore the test is executed in a subshell -- subshell exits with nonzero value when the operation in question fails. As 'if ! ...' does not work in Bourne shell, Short-circuiting construct '||' is used to print information message and exit when expected.
| * man: show: update man page for entire-thread and json.Mark Walters2012-07-25
| | | | | | | | | | | | Previously in notmuch show --format=json implied --entire-thread. This is still the default but it is now possible to disable this. Update the manpage to reflect this.
| * schemata: update for --body=true|false optionMark Walters2012-07-24
| | | | | | | | | | | | Previously body: was a compulsory field in a message. The new --body=false option causes notmuch show to omit this field so update schemata to reflect this.
| * man: update man page for the new --body=true|false optionMark Walters2012-07-24
| |
| * test: add tests for the new --body=true|false optionMark Walters2012-07-24
| |
| * cli: add --body=true|false option to notmuch-show.cMark Walters2012-07-24
| | | | | | | | | | | | | | | | | | | | This option allows the caller to suppress the output of the bodies of the messages. Currently this is only implemented for format=json. This is used by notmuch-pick.el (although not needed) because it gives a speed-up of at least a factor of a two (and in some cases a speed up of more than a factor of 8); moreover it reduces the memory usage in emacs hugely.
| * Use the structured formatters in notmuch-search.c.craven@gmx.net2012-07-24
| | | | | | | | | | | | | | | | | | | | This patch switches from the current ad-hoc printer to the structured formatters in sprinter.h, sprinter-text.c and sprinter-json.c. The JSON tests are changed slightly in order to make them PASS for the new structured output formatter. The text tests pass without adaptation.
| * Add structured output formatter for JSON and plain text (but don't use them ↵craven@gmx.net2012-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | yet). Using the new structured printer support in sprinter.h, implement sprinter_json_create, which returns a new JSON structured output formatter. The formatter prints output similar to the existing JSON, but with differences in whitespace (mostly newlines, --output=summary prints the entire message summary on one line, not split across multiple lines). Also implement a "structured" formatter for plain text that prints prefixed strings, to be used with notmuch-search.c plain text output.
| * Add support for structured output formatters.craven@gmx.net2012-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new struct type sprinter_t, which is used for structured formatting, e.g. JSON or S-Expressions. The structure printer is heavily based on code from Austin Clements (id:87d34hsdx8.fsf@awakening.csail.mit.edu). It includes the following functions: /* Start a new map/dictionary structure. This should be followed by * a sequence of alternating calls to map_key and one of the * value-printing functions until the map is ended by end. */ void (*begin_map) (struct sprinter *); /* Start a new list/array structure. */ void (*begin_list) (struct sprinter *); /* End the last opened list or map structure. */ void (*end) (struct sprinter *); /* Print one string/integer/boolean/null element (possibly inside a * list or map, followed or preceded by separators). * For string, the char * must be UTF-8 encoded. */ void (*string) (struct sprinter *, const char *); void (*integer) (struct sprinter *, int); void (*boolean) (struct sprinter *, notmuch_bool_t); void (*null) (struct sprinter *); /* Print the key of a map's key/value pair. The char * must be UTF-8 * encoded. */ void (*map_key) (struct sprinter *, const char *); /* Insert a separator (usually extra whitespace) for improved * readability without affecting the abstract syntax of the * structure being printed. * For JSON, this could simply be a line break. */ void (*separator) (struct sprinter *); /* Set the current string prefix. This only affects the text * printer, which will print this string, followed by a colon, * before any string. For other printers, this does nothing. */ void (*set_prefix) (struct sprinter *, const char *); To support the plain text format properly, the following additional function must also be implemented: /* Set the current string prefix. This only affects the text * printer, which will print this string, followed by a colon, * before any string. For other printers, this does nothing. */ void (*set_prefix) (struct sprinter *, const char *); The structure also contains a flag that should be set to FALSE in all custom printers and to TRUE in the plain text formatter. /* True if this is the special-cased plain text printer. */ notmuch_bool_t is_text_printer; The printer can (and should) use internal state to insert delimiters and syntax at the correct places. Example: format->begin_map(format); format->map_key(format, "foo"); format->begin_list(format); format->integer(format, 1); format->integer(format, 2); format->integer(format, 3); format->end(format); format->map_key(format, "bar"); format->begin_map(format); format->map_key(format, "baaz"); format->string(format, "hello world"); format->end(format); format->end(format); would output JSON as follows: {"foo": [1, 2, 3], "bar": { "baaz": "hello world"}}
| * News for search cleanupsAustin Clements2012-07-24
| |
| * emacs: Fix navigation of multi-line search result formatsAustin Clements2012-07-24
| | | | | | | | | | | | | | | | | | | | | | At this point, the only remaining functions that don't support multi-line search result formats are the thread navigation functions. This patch fixes that by rewriting them in terms of notmuch-search-result-{beginning,end}. This changes the behavior of notmuch-search-previous-thread slightly so that if point isn't at the beginning of a result, it first moves point to the beginning of the result.
| * emacs: Allow custom tags formattingAustin Clements2012-07-24
| | | | | | | | | | | | | | | | | | | | | | | | Previously we ignored any notmuch-search-result-format customizations for tag formatting because we needed to be able to parse back in the result line and update the tags in place. We no longer do either of these things, so we can allow customization of this format. (Coincidentally, previously we still allowed too much customization of the tags format, since moving it earlier on the line or removing it from the line would interfere with the tagging mechanism. There is now no problem with doing such things.)
| * emacs: Replace other search text properties with result propertyAustin Clements2012-07-24
| | | | | | | | | | | | Since the result object contains everything that the other text properties recorded, we can remove the other text properties and simply look in the plist of the appropriate result object.
| * emacs: Use result text properties for search result iterationAustin Clements2012-07-24
| | | | | | | | | | | | | | | | | | | | | | | | This simplifies the traversal of regions of results and eliminates the need for save-excursions (which tend to get in the way of maintaining point when we make changes to the buffer). It also fixes some strange corner cases in the old line-based code where results that bordered the region but were not included in it could be affected by region commands. Coincidentally, this also essentially enables multi-line search result formats; the only remaining non-multi-line-capable functions are notmuch-search-{next,previous}-thread, which are only used for interactive navigation.
| * emacs: Update tags by rewriting the search result line in placeAustin Clements2012-07-24
| | | | | | | | | | | | | | | | | | Now that we keep the full thread result object, we can refresh a result after any changes by simply deleting and reconstructing the result line from scratch. A convenient side-effect of this wholesale replacement is that search now re-applies notmuch-search-line-faces when tags change.
| * emacs: Use text properties instead of overlays for tag coloringAustin Clements2012-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, tag-based search result highlighting was done by creating an overlay over each search result. However, overlays have annoying front- and rear-advancement semantics that make it difficult to manipulate text at their boundaries, which the next patch will do. They also have performance problems (creating an overlay is linear in the number of overlays between point and the new overlay, making highlighting a search buffer quadratic in the number of results). Text properties have neither problem. However, text properties make it more difficult to apply multiple faces since, unlike with overlays, a given character can only have a single 'face text property. Hence, we introduce a utility function that combines faces into any existing 'face text properties. Using this utility function, it's straightforward to apply all of the appropriate tag faces in notmuch-search-color-line.
| * emacs: Record thread search result object in a text propertyAustin Clements2012-07-24
| | | | | | | | | | This also provides utility functions for working with this text property that get its value, find its start, and find its end.
| * emacs: Fix notmuch-message-mark-replied.Ingo Lohmar2012-07-24
| | | | | | | | | | | | | | | | | | notmuch-message-mark-replied used "apply" to change message tags according to notmuch-message-replied-tags after sending a reply. This works if the latter is a single-element list. But with the recently changed format of tag changes, it breaks for multiple-element lists. Use "funcall" to properly pass the list of tag changes as a single argument.
| * debian: finalize changelogDavid Bremner2012-07-12
| | | | | | | | It turns out the "debian-snapshot" target needs a valid changelog.