aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* TODO: Add note for bug with message with References but no In-Reply-ToCarl Worth2011-05-23
| | | | | We recently noticed on the mailing list a case where a message wasn't properly connected to its parent. We should fix that of course.
* notmuch part: Fix part numbering to match what's reported by "notmuch show"Carl Worth2011-05-23
| | | | | | | | | Since commit c51d5b3cdb5ca0816816e88ca6f7136a24e74eee we are counting multipart containers when emitting part numbers in the "notmuch show" output. Unfortunately, "notmuch part" wasn't updated with the same numbering, (and the test suite is inadequate to catch this). Fix this by adding a similar part-numbering change to "notmuch part" here.
* pass entire format structure to various show_message functionsJameson Graef Rollins2011-05-20
| | | | | | | | | | | | | | Various show_message* functions require formatting functions, which were previously being passed individually as arguments. Since we will need to be needing to passing in more formatting function in the future (ie. for crypto support), we here modify things so that we just pass in the entire format structure. This will make things much simpler down the line as we need to pass in new format functions. We move the show_format structure into notmuch-client.c as notmuch_show_format. This also affects notmuch-reply.c, so we create a mostly-empty format_reply to pass the reply_part function to show_message_body.
* test: remove hard-coded paths from multipart testJameson Graef Rollins2011-05-20
| | | | Small oversite, easily corrected.
* Add a .dir-locals.el file for the benefit of emacs usersDaniel Kahn Gillmor2011-05-18
| | | | | | | | This file causes emacs to automatically set the correct style variables to control indentation, etc. One more thing to make it easier for everyone to collaborate with a consistent coding style. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Show cleaner `From:' addresses in the summary line.David Edmondson2011-05-18
| | | | | | | | | | Remove double quotes and flatten "foo@bar.com <foo@bar.com>" to "foo@bar.com". Edited-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> (clean up expected output for emacs tests). Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Add custom `notmuch-show-elide-same-subject'David Edmondson2011-05-18
| | | | | | | | | This controls the appearance of collapsed messages in notmuch-show mode, avoiding redundancy for repeated subject). Remove `notmuch-show-always-show-subject'. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Add `notmuch-show-always-show-subject', allowing control overDavid Edmondson2011-05-18
| | | | | | the display of collapsed messages. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Allow renderer of multipart/related parts access to non-primary parts.David Edmondson2011-05-18
| | | | | | | | | | | | | | Typically used to allow a `text/html' renderer access to images which are sent along with the HTML. This is not enabled by default, instead the user must execute `notmuch-show-setup-w3m' for it to take effect. Edited-by: Carl Worth <cworth@cworth.org> Add documentation string for notmuch-show-setup-23m and clean up warning about reference/assignment of free variable. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Optionally show all parts in multipart/alternative.David Edmondson2011-05-18
| | | | | | | | | | | Add a variable `notmuch-show-all-multipart/alternative-parts' that allows the user to indicate that all candidate sub-parts of a multipart/alternative part should be shown rather than just the preferred part. The default is `nil', showing only the preferred part. This is mostly a debugging aid. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* notmuch: Add the content-id of a part to the JSON output if it is known.David Edmondson2011-05-18
| | | | | | | It's simply one more property of a MIME part that might be useful, and json makes it so easy to add additional properties. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* test: Link to compat files when building program during "make test"Carl Worth2011-05-18
| | | | | | | The compilation of the smtp-dummy program would fail if a build was attempted on a system without getline. Fix this by simply including the existing notmuch_compat_srcs variable when constructing the list of source files for compiling smtp-dummy.
* emacs: Render text/x-vcalendar parts.David Edmondson2011-05-17
| | | | | | | Use code from icalendar.el to convert text/x-vcalendar parts to something suitable for use with the Emacs diary. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Allow indentation of multipart children.David Edmondson2011-05-17
| | | | Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Add `notmuch-show-multipart/alternative-discouraged'.David Edmondson2011-05-17
| | | | | | | Also improved implementation of indication of which parts are not shown. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: add more part handling functionsDavid Edmondson2011-05-17
| | | | | This adds new notmuch-show-insert-part functions to handle multipart/alternative and message/rfc822 parts.
* notmuch show: Properly nest MIME parts within mulipart partsCarl Worth2011-05-17
| | | | | | | | | | | | | | | | | | | | | | | Previously, notmuch show flattened all output, losing information about the nesting of the MIME hierarchy. Now, the output is properly nested, (both in the --format=text and --format=json output), so that clients can analyze the original MIME structure. Internally, this required splitting the final closing delimiter out of the various show_part functions and putting it into a new show_part_end function instead. Also, the show_part function now accepts a new "first" argument that is set not only for the first MIME part of a message, but also for each first MIME part within a series of multipart parts. This "first" argument controls the omission of a preceding comma when printing a part (for json). Many thanks to David Edmondson <dme@dme.org> for originally identifying the lack of nesting in the json output and submitting an early implementation of this feature. Thanks as well to Jameson Graef Rollins <jrollins@finestructure.net> for carefully shepherding David's patches through a remarkably long review process, patiently explaining them, and providing a cleaned up series that led to this final implementation. Jameson also provided the new emacs code here.
* notmuch show: Include output for the enclosing multipart part of a MIME mailCarl Worth2011-05-17
| | | | | | | | | | | | | | | | | Previously, the outer multipart part of any multipart/mixed, multipart/signed, etc. MIME message was silently omitted from the "notmuch show" output. This prevented any client from correctly determining to which parts a signature applies, for example. Now, we actually emit these parts as their own parts. The output is still flattened---the contained parts are not yet included "within" the multipart part---so it's still not possible to determine to which parts a signature applies, but this is one step along the path. The test suite is updated to reflect this change, (though we'll eventually want to fix the emacs interface to not display buttons for the multipart enclosure parts as there's nothing useful for the user to actually do with them).
* test: Add a test of "notmuch show" with a multipart messageCarl Worth2011-05-16
| | | | | | | | | | | | This tests "notmuch show" with both --format=text and --format=json on a message with some non-trivial MIME multipart nesting, (multiple parts within a multipart/mixed part which is within a multipart/signed part). The test captures the current behavior (where only the leaf nodes of the MIME structure are emitted as a flat list---the multipart parts are effectively ignored). We plan to soon change the json output at least to emit an actual hierarchy matching the MIME structure, (at which point we will update this test).
* Mark some structures in the library interface with visibility=default attribute.Carl Worth2011-05-11
| | | | | | | | | | | | | As of gcc 4.6, there are new warnings from -Wattributes along the lines of: warning: ‘_notmuch_messages’ declared with greater visibility than the type of its field ‘_notmuch_messages::iterator’ [-Wattributes] To squelch these, we decorate all such containing structs with __attribute__((visibility("default"))). We take care to let only the C++ compiler see this, (since the C compiler would otherwise warn about ignored visibility attributes on types).
* Remove some variables which were set but not used.Carl Worth2011-05-11
| | | | | | | | | | | | gcc (at least as of version 4.6.0) is kind enough to point these out to us, (when given -Wunused-but-set-variable explicitly or implicitly via -Wunused or -Wall). One of these cases was a legitimately unused variable. Two were simply variables (named ignored) we were assigning only to squelch a warning about unused function return values. I don't seem to be getting those warnings even without setting the ignored variable. And the gcc docs. say that the correct way to squelch that warning is with a cast to (void) anyway.
* emacs: Only compile replacement functions for emacs < emacs-23Carl Worth2011-05-11
| | | | | | This avoids the emacs lisp compiler from emitting warnings on this replacement code, (which warnings would be hard for us to eliminate since we didn't write the code but copied it verbatim from emacs 23).
* vim: parse 'from' addressFelipe Contreras2011-05-04
| | | | | | In order to pass it to sendmail. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* vim: use sendmail directlyFelipe Contreras2011-05-04
| | | | | | | | The problem with 'mailx' is that it's not standardized, and it doesn't allow the -f option, which is pretty important on many sendmail configurations. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* vim: add myself (Felipe Contreras) as contributorFelipe Contreras2011-05-04
| | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* vim: implement archive in show viewFelipe Contreras2011-05-04
| | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* vim: refactor tagging stuffFelipe Contreras2011-05-04
| | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* TODO: Add item for remembing files detected as not email.Carl Worth2011-04-25
| | | | | | As recently discussed on the mailing list. See, for example: id:"874o5m802d.fsf@servo.factory.finestructure.net"
* test: Mark the search-insufficient-from-quoting tests to expect successCarl Worth2011-04-25
| | | | | | Theses were expected failures only due to a bug in GMime (with versions of GMime before 2.4.18). As of GMime version 2.4.18 this bug is fixed and these tests now pass.
* Merge remote-tracking branch 'amdragon/eager-metadata-v4'Carl Worth2011-04-25
|\
| * Fixup string list authorAustin Clements2011-03-21
| |
| * Add the tag list to the unified message metadata pass.Austin Clements2011-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | Now each caller of notmuch_message_get_tags only gets a new iterator, instead of a whole new list. In principle this could cause problems with iterating while modifying tags, but through the magic of talloc references, we keep the old tag list alive even after the cache in the message object is invalidated. This reduces my index search from the 3.102 seconds before the unified metadata pass to 1.811 seconds (1.7X faster). Combined with the thread search optimization in b3caef1f0659dac8183441357c8fee500a940889, that makes this query 2.5X faster than when I started.
| * Add the file name list to the unified message metadata pass.Austin Clements2011-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | Even if the caller never uses the file names, there is little cost to simply fetching the file name terms. However, retrieving the full paths requires additional database work, so the expansion from terms to full paths is performed lazily. This also simplifies clearing the filename cache, since that's now handled by the generic metadata cache code. This further reduces my inbox search from 3.102 seconds before the unified metadata pass to 2.206 seconds (1.4X faster).
| * Add a generic function to get a list of terms with some prefix.Austin Clements2011-03-21
| | | | | | | | | | | | Replace _notmuch_convert_tags with this and simplify _create_filenames_for_terms_with_prefix. This will also come in handy shortly to get the message file name list.
| * Implement an internal generic string list and use it.Austin Clements2011-03-21
| | | | | | | | | | | | | | | | | | | | | | | | This replaces the guts of the filename list and tag list, making those interfaces simple iterators over the generic string list. The directory, message filename, and tags-related code now build generic string lists and then wraps them in specific iterators. The real wins come in later patches, when we use these for even more generic functionality. As a nice side-effect, this also eliminates the annoying dependency on GList in the tag list.
| * Use a single unified pass to fetch scalar message metadata.Austin Clements2011-03-21
| | | | | | | | | | | | | | | | | | | | This performs a single pass over a message's term list to fetch the thread ID, message ID, and reply-to, rather than requiring a pass for each. Xapian decompresses the term list anew for each iteration, so this reduces the amount of time spent decompressing message metadata. This reduces my inbox search from 3.102 seconds to 2.555 seconds (1.2X faster).
* | use custom-face-edit value-type in notmuch-search-line-facesJameson Graef Rollins2011-04-25
|/ | | | | This enables the proper face customization UI for notmuch-search-line-faces.
* python: Remove completed TODO itemJames Vasile2011-03-16
| | | | | | | Really just a left-over TODO item in the code, nothing spectacular to see here. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* emacs: Define notmuch-search-process-filter-data before first use.Carl Worth2011-03-10
| | | | To avoid a wraning about a reference to a free variable when compiling.
* emacs: Don't drop error messages from "notmuch search"Carl Worth2011-03-10
| | | | | | | | | | | | | With the previous commit, unexpected output before or between search results would be displayed. However, trailing junk from the "notmuch search" output would still be silently swallowed. The most common case for an error message from "notmuch search" would be an invalid command-line, and in that case, there would be no search results and the trailing error message would get swallowed. We fix the process sentinel to check for leftover data and add it to the final buffer. We also add a test case to ensure this works.
* emacs: Fix notmuch-search-process-filter to handle incomplete linesCarl Worth2011-03-10
| | | | | | | | | This fixes the recently-added emacs-large-search-buffer test. This is as simple as saving any trailing input and then pre-prepending it on the next call. MAny thanks to Thomas Schwinge <thomas@schwinge.name> for tracking down this problem and contributing a preliminary version of this fix.
* emacs: Display any unexpected output from notmuch searchCarl Worth2011-03-10
| | | | | | | | | | | | | | Rather than silently swallowing unexpected output, the emacs interface will now display it. This will allow error messages to actually arrive at the emacs interface (though not in an especially pretty way). This also allows for easier investigation of the inadvertent swallowing of search results that span page boundaries (as demonstrated by the recent added emacs-large-search-buffer test). The page-boundary bug has been present since a commit from 2009-11-24: 93af7b574598637c2766dd1f8ef343962c9a8efb Many thanks to Thomas Schwinge for tracking that bug down and contributing the test for it.
* Rename/rewrite the new emacs-forgetfulness test (to emacs-large-search-buffer)Carl Worth2011-03-10
| | | | | | | | The new name is more descriptive of the bug being tested. Also, the test is rewritten slightly so that it's much more plain to see how the bug manifests itself, (that messages are droped from the emacs result at regular intervals). Primarily, this is by collapsing the large blobs used to inflate the message subjects.
* New test: Emacs' forgetfulness.Thomas Schwinge2011-03-10
| | | | Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
* new: Update comments for add_files_recursiveCarl Worth2011-03-10
| | | | | | The most recent commit optimized the implementation of this function. This commit simply updates the relevant comments to match the new implementation.
* new: read db_files and db_subdirs only if mtime changedKarel Zak2011-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The db_files and db_subdirs are unnecessary for unchanged directories. maildir with 10000 e-mails: old version: $ time ./notmuch new No new mail. real 0m0.053s user 0m0.028s sys 0m0.026s new version: $ time ./notmuch new No new mail. real 0m0.032s user 0m0.009s sys 0m0.023s Signed-off-by: Karel Zak <kzak@redhat.com> Reviewed-by: Austin Clements <amdragon@mit.edu> Looks good (faster than, but provably equivalent to the original code! notmuch_directory_get_child_* are side-effect free, db_files/db_subdirs aren't used between where they were set in the old code and where they are set in the new code, and db_files/db_subdirs are initialized to NULL when declared). Another timing data point: Old code: ./notmuch new 0.77s user 0.28s system 99% cpu 1.051 total New code: ./notmuch new 0.09s user 0.27s system 98% cpu 0.368 total
* build: Save configure options and re-use them for automatic runs of configureCarl Worth2011-03-10
| | | | | | | | | This supports the case of a user running "configure --prefix=/foo" then later updating the soruce (including the configure script) and re-running make. In this case, the make invocation will re-run configure. Before this change, this run of configure would lose the user's carefully chosen prefix. This is now fixed so that configrue is re-run with the user's options.
* build: Fix a plain "make" to automatically run configure.Carl Worth2011-03-10
| | | | The recent change to support non-source-directory builds broke this case.
* Merge remote branch 'amdragon/search-perf-3'Carl Worth2011-03-10
|\
| * Simplify _notmuch_doc_id_set_init interface.Austin Clements2011-01-30
| | | | | | | | | | | | Don't require the caller of _notmuch_doc_id_set_init to pass in a correct bound; instead compute it from the array. This simplifies the caller and makes this interface easier to use correctly.