summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* lib: Remove the notion of TAGS_INVALIDCarl Worth2010-11-11
| | | | | | | | This rather ugly hack was recently obviated by the removal of the notmuch_database_set_maildir_sync function. Now, clients must make explicit calls to do any syncrhonization between maildir flags and tags. So the library no longer needs to worry about doing inconsistent synchronization while a message is only partially added.
* lib: Rework interface for maildir_flags synchronizationCarl Worth2010-11-11
| | | | | | | | | | | | | Instead of having an API for setting a library-wide flag for synchronization (notmuch_database_set_maildir_sync) we instead implement maildir synchronization with two new library functions: notmuch_message_maildir_flags_to_tags and notmuch_message_tags_to_maildir_flags These functions are nicely documented here, (though the implementation does not quite match the documentation yet---as plainly evidenced by the current results of the test suite).
* Avoid abbreviation, preferring notmuch_config_get_maildir_synchronize_flagsCarl Worth2010-11-11
| | | | | | | | | | | | | Since the name of the configuration parameter here is: maildir.synchronize_flags the convention is that the functions to get and set this parameter should match it in name. Hence: notmuch_config_get_maildir_synchronize_flags etc. (as opposed to notmuch_config_get_maildir_sync).
* test: Rework recently-added additional maildir-sync testsCarl Worth2010-11-11
| | | | | | | | | | | | | | | These needed to be changed to be brought up to the current state of the maildir-sync tests. This includes style changes, but also the elimination of any assumption about pre-existing message filenames, (such as msg-003) which actually don't exist anymore. Also, the known broken tests are changed to emit FAIL rather than BROKEN simply to make them easier to fix, (so that they print the current problems rather than hiding them). Finally, an additional test is added to ensure that when a duplicate file is added without flags, it doesn't invalidate flags from other duplicates, (instead the flags are effectively merged).
* test: More maildir synchronization testsMichal Sojka2010-11-11
| | | | | | | | | Add maildir synchronization tests for multiple messages with the same message-id. As this is not yet implemented in notmuch, some of these teste are marked as BROKEN. I use $(< ) operator to avoid fiddling with stripped trailing newlines from test results which happens when output+=$(command) is used.
* lib: Remove the synchronization of 'T' flag with "deleted" tag.Carl Worth2010-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tags in a notmuch database affect all messages with the identical message-ID. But maildir tags affect individual files. And since multiple files can contain the identical message-ID, there is not a one-to-one correspondence between messages affected by tags and flags. This is particularly dangerous with the 'T' (== "trashed") maildir flag and the corresponding "deleted" tag in the notmuch database. Since these flags/tags are often used to trigger irreversible deletion operations, the lack of one-to-one correspondence can be potentially dangerous. For example, consider the following sequence: 1. A third-party application is used to identify duplicate messages in the mail store, and mark all-but-one of each duplicate with the 'T' flag for subsequent deletion. 2. A "notmuch new" operation reads that 'T' flag, adding the "deleted" flag to the corresponding messages within the notmuch database. 3. A subsequent notmuch operation, (such as a "notmuch dump; notmuch restore" cycle) synchronized the "deleted" tag back to the mail store, applying the 'T' flag to all(!) filenames with duplicate message IDs. 4. A third-party application reads the 'T' flags and irreversibly deletes all mail messages which had any duplicates(!). In order to avoid this scenario, we simply refuse to synchronize the 'T' flag with the "deleted" tag. Instead, applications can set 'T' and act on it to delete files, or can set "deleted" and act on it to delete files. But in either case the semantics are clear and there is never dangerous propagation through the one-to-many mapping of notmuch message objects to files.
* test: Rework testing of maildir-synchronization feature.Carl Worth2010-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | This change reworks these tests in several ways: 1. Bring tests into "new" test style preferring test_expect_equal over test_expect_success in almost all cases. 2. Don't emit test results for intermediate items not actually being tested, (things like "no new messages", "search for message", etc.). Those things are already covered by existing tests such as "basic" or "search" and only serve to obscure what's actually being tested. 3. Change sense of the test showing failure to rename a file from "new" to "cur" when "cur" doesn't exist. In this case, notmuch should detect that this is not a maildir and should not attempt to do any renaming of the file. 4. Extend dump/restore test to also exercise addition of tag, not just removal. Both items #3 and #4 above show shortcomings in the current implementation. These are currently resulting in test results of FAIL and indicate bugs that need to be fixed.
* Tests for maildir synchronizationMichal Sojka2010-11-10
| | | | Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
* Make maildir synchronization configurableMichal Sojka2010-11-10
| | | | | | | This adds group [maildir] and key 'synchronize_flags' to the configuration file. Its value enables (true) or diables (false) the synchronization between notmuch tags and maildir flags. By default, the synchronization is disabled.
* Maildir synchronizationMichal Sojka2010-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows bi-directional synchronization between maildir flags and certain tags. The flag-to-tag mapping is defined by flag2tag array. The synchronization works this way: 1) Whenever notmuch new is executed, the following happens: o New messages are tagged with configured new_tags. o For new or renamed messages with maildir info present in the file name, the tags defined in flag2tag are either added or removed depending on the flags from the file name. 2) Whenever notmuch tag (or notmuch restore) is executed, a new set of flags based on the tags is constructed for every message and a new file name is prepared based on the old file name but with the new flags. If the flags differs and the old message was in 'new' directory then this is replaced with 'cur' in the new file name. If the new and old file names differ, the file is renamed and notmuch database is updated accordingly. The rename happens before the database is updated. In case of crash between rename and database update, the next run of notmuch new brings the database in sync with the mail store again.
* lib: Return added message even if it already was in the databaseMichal Sojka2010-11-10
|
* test: Don't strip portions of test name after '-' for temporary files.Carl Worth2010-11-10
| | | | | | | We have test names like maildir-sync now, so it's cleaner if the temporary files created are named things like maildir-sync-10.out rather than maildir-10.out. Presumably the extra stripping here came from naming conventions in git's test suite.
* Merge in ruby bindings.Carl Worth2010-11-08
|\ | | | | | | | | | | | | Thanks to Ali Polatel for these bindings. This code was fetched from the ruby branch of: git://github.com/alip/notmuch.git
| * ruby: Don't barf if an object is destroyed more than onceAli Polatel2010-06-06
| | | | | | | | | | | | Raise RuntimeError instead. Also revise Notmuch::Database a bit. Add Notmuch::Database.open singleton method.
| * ruby: Use rb_scan_args()Ali Polatel2010-06-06
| |
| * ruby: Kill garbage collection related cruft.Ali Polatel2010-06-06
| | | | | | | | | | | | | | Let the user destroy objects that she wants explicitly. It's not possible to specify the order objects are garbage collected. See id:86y6f8v838.fsf@harikalardiyari.ev on ruby-talk for more information.
| * ruby: First attempt at fixing gc for ruby-1.9Ali Polatel2010-06-06
| |
| * ruby: fix documentation of DB.upgrade!Ali Polatel2010-06-06
| |
| * Initial ruby bindingsAli Polatel2010-06-06
| |
* | vim: include own improved git-diff syntaxFelipe Contreras2010-11-08
| | | | | | | | | | | | The old one wasn't working at all on newer vims. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* | vim: run(): optimize non-debug pathFelipe Contreras2010-11-08
| | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* | vim: use mailx for sendingFelipe Contreras2010-11-08
| | | | | | | | | | | | | | Possilby used by more systems, and besides the code wasn't really working properly anyway. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* | vim: add option to mark as read + archiveFelipe Contreras2010-11-08
| | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* | vim: remove add_remove_tags_on_screen()Felipe Contreras2010-11-08
| | | | | | | | | | | | | | It's not working properly; the current message is jumping around and the tags not really added/removed properly. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* | vim: cleanup search syntaxFelipe Contreras2010-11-08
| | | | | | | | | | | | It was *sloooooow*. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* | vim: cleanup search bufferFelipe Contreras2010-11-08
| | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* | vim: add archive support from 'show'Felipe Contreras2010-11-08
| | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* | Don't use kill-this-buffer to kill notmuch emacs buffersJameson Rollins2010-11-08
| | | | | | | | | | | | | | | | kill-this-buffer appears to be a function intended specifically for use in the menu bar, and causes problem killing notmuch buffers when multiple frames have been used. This patch replaces kill-this-buffer with notmuch-kill-this-buffer, which in turn just simply calls (kill-buffer (current-buffer)).
* | emacs: Fix notmuch-show-pipe-message to use notmuch-command variableMichal Sojka2010-11-06
| | | | | | | | | | Previously notmuch command name was hardcoded into this function, which made remote use of pipe command impossible.
* | NEWS: Update NEWS files for a couple of recent changes.Carl Worth2010-11-06
| | | | | | | | These two changes since the 0.4 release are noteworthy.
* | test: Add test for viewing raw message within emacs.Carl Worth2010-11-06
| | | | | | | | | | This provides further coverage for the recently added (and recently modified) use of "notmuch show --format=raw" within emacs.
* | Rename "notmuch cat" to "notmuch show --format=raw"Carl Worth2010-11-06
| | | | | | | | | | | | | | | | | | This is part of an effort to avoid proliferation of excessive top-level notmuch commands. Also, "raw" better captures the functionality here, (as opposed to "cat" which is a fairly oblique reference to a bad Unix abbreviation whose metaphor doesn't work here since "notmuch cat" operates only on a single message and hence cannot "con'cat'enate" anything).
* | test: Add test for saving an attachment from emacsCarl Worth2010-11-06
| | | | | | | | | | This tests the use of "notmuch cat" recently added to the emacs interface.
* | emacs: Access raw messages via cat subcommandMichal Sojka2010-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies the following commands to access the messages via cat subcommand: - view/save attachments ('v', 'w'), - view a raw message ('V') and - pipe a message to a command ('|'). With this patch, it is straightforward to use notmuch emacs interface with a remote database accessed over SSH. To do this, it is sufficient to redefine notmuch-command variable to contain the name of a script containing: ssh user@host notmuch "$@" If the ssh client has enabled connection sharing (ControlMaster option in OpenSSH), the emacs interface is almost as responsive as when notmuch is invoked locally.
* | Add 'cat' subcommandMichal Sojka2010-11-05
| | | | | | | | | | | | | | | | | | | | | | | | This command outputs a raw message matched by search term to the standard output. It allows MUAs to access the messages for piping, attachment manipulation, etc. by running notmuch cat rather then directly access the file. This will simplify the MUAs when they need to operate on a remote database. Edited-by: Carl Worth <cworth@cworth.org>: Remove trailing whitespace, add missing "test_done" to new test script to avoid "Unexpected exit" error.
* | Makefile: Support "make check" as alias for "make test"Carl Worth2010-11-05
| | | | | | | | | | I'm told that some people have been trained by autotools to expect this target name.
* | test: Don't mess with user's HOME directoryCarl Worth2010-11-05
| | | | | | | | | | | | | | | | | | | | This was too rude of a thing to do and could easily introduce problems, (as reported by Rob Browning whose environment required some HOME-specific things for shell startup). Instead, implement more focused changes to ensure that particular file in $HOME don't cause problems. Specifically, we fix known problems with ~/.signature and ~/.mailrc here.
* | test: Update mail corpus with original mails (with attachments).Carl Worth2010-11-05
| | | | | | | | | | | | | | | | The original mails used to pupulate the mail corpus had had their attachments (obnoxiously) scrubbed by the pipermail mail archiver. Since we actually want to test the handling of attachments, this is less than useful. Restore these files from my own collection, (with some Received and similar headers pruned).
* | test: Clear the "BROKEN" flag on an existing emacs testCarl Worth2010-11-05
| | | | | | | | | | | | | | | | | | | | | | I still don't know everything about how I want search order to be customizable, but I do like the current defaults, (namely, performing a new search gives results newest first, but performing a saved search like "tag:inbox" gives results as oldest first). Until we come up with a better plan for people to select what *they* want, (rather than just getting what I want), let's codify the current results in the test suite.
* | test: Generate a little run_emacs script to help debug any failures.Carl Worth2010-11-05
| | | | | | | | | | | | | | | | After any emacs test failure, the tmp.emacs directory will have this run_emacs script in it which the user can use to run emacs within the test suite environment, (pointing at the test suite's notmuch database, using the local notmuch command-line program, and the local notmuch emacs lisp code).
* | TODO: Add idea for notmuch-bcc and notmuch-cc variables.Carl Worth2010-11-05
| | | | | | | | | | To more easily support those folks that want to Bcc with every message.
* | Print nothing when search result is emptyMichal Sojka2010-11-04
| | | | | | | | | | | | | | This change affects both text and json formats. Now, text format behaves as before commit 6dcb7592, but json format is changed. Earlier, the empty search returned '[]', now it returns ''. The emacs interface seems not to be affected by this change.
* | test: Search for non-existent message should return nothingMichal Sojka2010-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | My scripts expect that empty search result is actually empty. Since commit 6dcb7592, even empty search prints a newline character and this breaks my scripts. This patch adds a test for this bug. In the test I cannot use test_expect_equal function as $() operator suppresses the final newline and this kind of difference is not detected. test/search | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
* | debian: Add a file stating the intended symbols to appear in the library0.4Carl Worth2010-11-01
| | | | | | | | | | | | | | This is almost totally clearn. The (mangled) names of the Xapian exception classes appear here. That's not actually desired, as the notmuch library is never intended to throw any exceptions. But Xapian does not currently provide a mechanism for us to avoid these.
* | Makefile: Move the -Wl,-as-needed option earlier in the command line.Carl Worth2010-11-01
| | | | | | | | | | | | | | This option wasn't having the desired effect, and sure enough, the documentation states that it only affects the linking of libraries that appear after this option on the command line. So put it early for the desired effect.
* | lib: Eliminate some redundant includes of xapian.hCarl Worth2010-11-01
| | | | | | | | | | Most files including this already include database-private.h which includes xapian.h already.
* | lib: Add GCC visibility(hidden) pragmas to private header files.Carl Worth2010-11-01
| | | | | | | | | | | | This prevents any of the private functions from being leaked out through the library interface (at least when compiling with a recent-enough gcc to support the visibility pragma).
* | lib: Add some missing static qualifiers.Carl Worth2010-11-01
| | | | | | | | | | | | These various functions and data are all used only locally, so should be marked static. Ensuring we get these right will avoid us accidentally leaking unintended symbols through the library interface.
* | debian: Use the correct maintainer address for the package upload.Carl Worth2010-11-01
| | | | | | | | Otherwise, Debian tools think this is an NMU.
* | debian: Declare conformance with Standard-Version 3.9.1.0Carl Worth2010-11-01
| | | | | | | | | | I ran through the upgrading-checklist and found nothing needing to be changed for this package.