aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-05-27Use empty strings instead of NULL in format_reply structure.Jameson Graef Rollins
This keeps things consistent with notmuch-show, and prevents having to check for the existence of the field pointer for simple string output formats.
2011-05-27Integrate reply_part_content function into reply_part function.Jameson Graef Rollins
After the last patch to eliminate some redundant code paths in reply_part, the reply_part_content function was only being called once. Disolving the function and integrating its contents into the reply_part function makes things a little simpler, and frees up some name space that will be needed in the next patch.
2011-05-27Simplify reply_part function to eliminate redundant code paths.Jameson Graef Rollins
This is the same logic but with less code.
2011-05-27test: use `princ' instead of `message' calls in emacs testsDmitry Kurochkin
The patch replaces all (message (buffer-string)) calls in emacs tests with (princ (buffer-string)). This avoids accidentally interpreting '%' as format specifiers and makes code simpler because we do not need to capture stderr. Also, the patch works around an Emacs (23.3+1-1 on current Debian Unstable) segfault in "Ensure that emacs doesn't drop results" test. Note: the segfault does not happen on every test run. Though, it seems to be consistently reproducible if the test uses 300 messages instead of 30. Hopefully, it is the crash described in Emacs bug #8545 [1] which is already fixed. [1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8545
2011-05-27Update some more recent tests to use /usr/bin/env to find bashCarl Worth
The recentl-applied patch had grown stale, so update the tests that had been created since it was originally written.
2011-05-27test: change "#!/bin/bash" to "#!/usr/bin/env bash" enhances portabilityJoel Borggrén-Franck
Change #!/bin/bash at start of tests to "#!/usr/bin/env bash". That way systems running on bash < 4 can prepend bash >= 4 to path before running the tests.
2011-05-26Fix check of sysconf return in get_name/username_from_passwd_fileMatthias Guedemann
Fix to check the value returned by sysconf(_SC_GETPW_R_SIZE_MAX) before using the value. This fixes a core dump on DragonFlyBSD where this function returns -1.
2011-05-26emacs: Make the queries used in the all-tags section configurableDaniel Schoepe
This patch adds a customization variable that controls what queries are used to construct the all-tags section in notmuch-hello. It allows the user to specify a function to construct the query given a tag or a string that is used as a filter for each tag. It also adds a variable to hide various tags from the all-tags section. Signed-off-by: Daniel Schoepe <daniel.schoepe@googlemail.com>
2011-05-26test: add test-lib.el file with `visible-buffer-string' functionDmitry Kurochkin
The patch adds test-lib.el file for Emacs tests auxiliary stuff. Currently, it implements two functions: `visible-buffer-string' and `visible-buffer-substring'. These are similar to standard counterparts without "visible-" prefix but exclude invisible text. The functions are not used anywhere at the moment but should be useful for testing hiding/showing in the Emacs interface. Edited-by: Carl Worth <cworth@cworth.org> Fixed "basic" test to ignore new test-lib.el file.
2011-05-26emacs: Add a customization allowing to always prompt for the "From" address when composing a new messageThomas Jost
2011-05-26emacs: Allow the user to choose the "From" address when replying to a messageThomas Jost
When pressing C-u r, the user will be prompted for the identity to use.
2011-05-26emacs: Allow the user to choose the "From" address when forwarding a messageThomas Jost
When pressing C-u f, the user will be prompted for the identity to use.
2011-05-26emacs: Allow the user to choose the "From" address when composing a new messageThomas Jost
When pressing C-u m, the user will be prompted for the identity to use.
2011-05-26emacs: Helpers needed for the user to be able to choose the "From" address when composing a new messageThomas Jost
This adds functions and variables needed for this feature to be implemented. Once it's done, the user will be able to use a prefix argument (e.g. pressing C-u m instead of m) and be able to select a From address. By default the list of names/addresses to be used during completion will be automatically generated by the settings in the notmuch configuration file. The user can customize the notmuch-identities variable to provide an alternate list. This is based on a previous patch by Carl Worth (id:"87wrhfvk6a.fsf@yoom.home.cworth.org" and follow-ups).
2011-05-24Carefully manage save/restore of point in `notmuch-wash-toggle-invisible-action'.Dmitry Kurochkin
Before the change, save-excursion was used to save the point. But the marker saved by save-excursion was inside a region that was deleted, so that approach is unreliable, (leading to point jumping to a new position past the button). This patch instead saves point in an integer variable, and when restoring, carefully avoids moving point past the button, (in case the new button label is shorter than the old button label).
2011-05-24test: add test for hiding/showing signature in notmuch-show viewDmitry Kurochkin
2011-05-24test: fix expected output for emacs tests after the wash button label changesDmitry Kurochkin
2011-05-24Use different labels for wash buttons when text is visible or hidden.Dmitry Kurochkin
Before the change, citation and signature wash buttons used the same label in both visible and hidden states. Sometimes it is very convenient when you can determine if the text is hidden or shown without reading the context and/or clicking the button. The patch makes it easy to see if the text is shown or hidden by explicitly saying what the button does (shows or hides the text).
2011-05-24emacs: Add an accessor function for emacs code to get at user.other_emailCarl Worth
This is like the other notmuch-config accessor functions except that it converts the newline-separated string into an actual lisp list.
2011-05-24emacs: add notmuch-before- and notmuch-after-tag-hookDaniel Schoepe
This patch adds hooks that are run before/after messages are tagged From the emacs interface. In order to implement this and to avoid having hooks parse all the arguments to the notmuch binary again, I created a `notmuch-tag' function that other modules should use instead of running (notmuch-call-notmuch-process "tag" ...) directly.
2011-05-24python: Update README to talkabout notmuch, not cnotmuchCarl Worth
The old instructions were telling users to do "easy_install cnotmuch" which installed some old, stale bindings. The new instructions should be much more effective.
2011-05-24man page: Eliminate two warningsCarl Worth
Manually turn off both filling and justification for the one exceedingly-long URL which was blowing groff's mind. Also, adjust the position of 'text' to not be at the beginning of a line so it is not mistaken for a macro.
2011-05-24notmuch: Implement search-tags as an alias for "search --output=tags *"Carl Worth
Ever since we added support for "notmuch search --output=tags" the "notmuch search-tags" command has been redundant. The recent addition of alias support makes it easy to drop the explicit search-tags command in favor of a simple alias that runs "notmuch search --output=tags *". So there's no longer any documentation of the search-tags command, but existing scripts will not break at all.
2011-05-24test: Expand multipart test to cover "notmuch reply" as wellCarl Worth
This gives coverage for the segmentation fault in "notmuch reply" that was just fixed with the previous commit.
2011-05-24notmuch reply: Avoid segmentation fault when printing multiple partsCarl Worth
The code was previously trying to print a NULL string in this case, which is obviously what we don't want to do.
2011-05-24test: Expand multipart test to cover part output in all formats.Jameson Graef Rollins
The example multipart message is made a bit more complicated by adding a message/rfc822 message, and the all parts are output and tested in all output formats.
2011-05-24emacs: update notmuch-show.el to use new part outputJameson Graef Rollins
The command-line interface for extracting a single part from a message recently changed from: notmuch part --part=X to: notmuch show --format=raw --part=X
2011-05-24Fix handling of message/rfc822 partsJameson Graef Rollins
Since message/rfc822 parts are really just a special kind of multipart, we here normalize the handling of the two. This will provide access to sub-parts of message/rfc822 parts, which was previously unavailable.
2011-05-24notmuch show: Update documentation for default --format=raw for --partCarl Worth
We recently made the --part option to "notmuch show" trigger a default format of "raw", (since the previous default of "text" is not often useful with a single part---especially a non-text part). Here, we update the documentation to match.
2011-05-24use format=raw by default when requesting part with --part=Jameson Graef Rollins
This makes part retrieval a little more intuitive, since generally one will always want to retrieve parts in raw form.
2011-05-24throw error if mbox format specified with --partJameson Graef Rollins
These formats are incompatible, since mbox format requires full messages.
2011-05-24notmuch: Support "notmuch part" as an alias for "notmuch show --format=raw"Carl Worth
We unifed the "notmuch part" functionality into "notmuch show" where the implementation is both simpler and more powerful. But there's no good reason to break users of the old interface. Add support for aliases, which are undocumented means of getting at functionality through deprecated names. The first such alias is "notmuch part" as implemented here.
2011-05-23New part output handling as option to notmuch-show.Jameson Graef Rollins
Outputting of single MIME parts is moved to an option of notmuch show, instead of being handled in it's own sub-command. The recent rework of multipart mime allowed for this change but consolidating part handling into a single recursive function (show_message_part) that includes formatting. This allows for far simpler handling single output of a single part, including formatting.
2011-05-23Normalize part counting and formatting in show_message_part function.Jameson Graef Rollins
Simplify the function by moving part counting and formatting outside of conditionals, thereby eliminating redundant code. This also wraps message part output handling with proper part formatting.
2011-05-23rename do_show_raw to do_show_single, and create params.raw for raw message outputJameson Graef Rollins
We rename here in order to make do_show_single into a generic function for handling output of just a single message, or which format=raw is a special case. The raw case is handled by setting a new parameter, params.raw, which is used to tell do_show_single to output a single message as a raw file. This is mostly in preparation for much improved part handling to follow imminently.
2011-05-23add part_sep formatter to replace "first" argument to part format functionsJameson Graef Rollins
A new field "part_sep" is added to the notmuch_show_format structure, to be used for part separation. This is cleaner than the "first" argument that was being passed around to the part arguments, and allows the function that handles overall part output formatting (show_message_part) to directly handle when outputting the separator.
2011-05-23create notmuch_show_params_t structure for holding parameters passed to show functions.Jameson Graef Rollins
This simplifies the passing of arguments to the show functions. This will be very useful as we accumulate more parameters that will need to be passed. Currently only the entire_thread parameter is passed this way.
2011-05-23test: force deletion of test remnantsJameson Graef Rollins
This keeps the test from failing if only a subset of the remnants were available for deletion, because e.g. only a subset of the tests were run.
2011-05-23test: allow specifying tests to run with NOTMUCH_TESTS env varJameson Graef Rollins
This is useful for just running a specific subset of tests, ie: NOTMUCH_TESTS=crypto make test
2011-05-23TODO: Add note for bug with message with References but no In-Reply-ToCarl Worth
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.
2011-05-23notmuch part: Fix part numbering to match what's reported by "notmuch show"Carl Worth
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.
2011-05-20pass entire format structure to various show_message functionsJameson Graef Rollins
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.
2011-05-20test: remove hard-coded paths from multipart testJameson Graef Rollins
Small oversite, easily corrected.
2011-05-18Add a .dir-locals.el file for the benefit of emacs usersDaniel Kahn Gillmor
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>
2011-05-18emacs: Show cleaner `From:' addresses in the summary line.David Edmondson
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>
2011-05-18emacs: Add custom `notmuch-show-elide-same-subject'David Edmondson
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>
2011-05-18emacs: Add `notmuch-show-always-show-subject', allowing control overDavid Edmondson
the display of collapsed messages. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
2011-05-18emacs: Allow renderer of multipart/related parts access to non-primary parts.David Edmondson
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>
2011-05-18emacs: Optionally show all parts in multipart/alternative.David Edmondson
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>
2011-05-18notmuch: Add the content-id of a part to the JSON output if it is known.David Edmondson
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>