Commit graph

6192 commits

Author SHA1 Message Date
Dmitry Kurochkin
de1ed86b79 test: remove useless test_emacs call from an emacs FCC test
This was inadvertently left over when debugging an early version of
this commit. -Carl Worth <cworth@cworth.org>
(cherry picked from commit 8bf0c1c3de)
2011-06-23 22:01:35 -03:00
Dmitry Kurochkin
d012827890 Fix wrong-type-argument lisp error in `notmuch-fcc-header-setup'
This error occurs when `notmuch-fcc-dirs' is set to a list.  The error
was in the `notmuch-fcc-dirs' format check which was changed in an
incompatible way from 0.4 to 0.5.

The fix was extracted from a bigger patch series by David
Edmondson id:"1290682750-30283-2-git-send-email-dme@dme.org".

Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
(cherry picked from commit ce08571428)
2011-06-23 22:00:17 -03:00
Carl Worth
72d70ec60f test: Test emacs message composing with various values for notmuch-fcc-dirs
We exercise each of the documented values (nil, a string, and a
list). For the list, we test matching a specific entry, matching a
catch-all regular expression, and no match at all (in which case there
is no FCC set).
(cherry picked from commit 76b54f1898)
2011-06-23 21:58:10 -03:00
David Bremner
68a2c7a8b0 Merge remote-tracking branch 'origin/master' 2011-06-23 21:54:50 -03:00
Dmitry Kurochkin
8bf0c1c3de test: remove useless test_emacs call from an emacs FCC test
This was inadvertently left over when debugging an early version of
this commit. -Carl Worth <cworth@cworth.org>
2011-06-23 17:11:04 -07:00
David Bremner
d6f05fde23 debian: fix installation of notmuch-vim README
There was a leftover override, installing it into the wrong package.
2011-06-23 20:39:29 -03:00
Austin Clements
53c5578c7a Add dir-locals style variables for C++, Elisp, and shell code.
Also, slightly reformat dir-locals.el so that the settings align and
to make it friendlier for future additions.
2011-06-23 16:34:57 -07:00
Pieter Praet
b4c9ee2809 fix sum moar typos [test-case data]
Various typo fixes in some test-case data.

Signed-off-by: Pieter Praet <pieter@praet.org>

Edited-by: Carl Worth <cworth@cworth.org> Restricted to just
test-case data.
2011-06-23 15:59:11 -07:00
Pieter Praet
607a73010a fix sum moar typos [error messages]
Various typo fixes in error messages within the source code.

Signed-off-by: Pieter Praet <pieter@praet.org>

Edited-by: Carl Worth <cworth@cworth.org> Restricted to just error messages.
2011-06-23 15:59:03 -07:00
Pieter Praet
432e091924 fix sum moar typos [user-visible documentation in code]
Various typo fixes in documentation within the code that can be made
available to the user, (emacs function help strings, "notmuch help"
output, notmuch man page, etc.).

Signed-off-by: Pieter Praet <pieter@praet.org>

Edited-by: Carl Worth <cworth@cworth.org> Restricted to just
documentation and fixed fix of "comman" to "common" rather than
"command".
2011-06-23 15:58:50 -07:00
Pieter Praet
8bb6f7869c fix sum moar typos [comments in source code]
Various typo fixes in comments within the source code.

Signed-off-by: Pieter Praet <pieter@praet.org>

Edited-by: Carl Worth <cworth@cworth.org> Restricted to just
source-code comments, (and fixed fix of "descriptios" to "descriptors"
rather than "descriptions").
2011-06-23 15:58:39 -07:00
Pieter Praet
730acd4764 fix sum moar typos [build scripts, Makefiles]
Various typo fixes in comments within the Makefile and other build scripts.

Signed-off-by: Pieter Praet <pieter@praet.org>

Edited-by: Carl Worth <cworth@cworth.org> Restricted to just build files.
2011-06-23 15:44:59 -07:00
David Bremner
9acdabfe73 start new changelog stanza 2011-06-23 19:42:15 -03:00
Pieter Praet
18bf91def9 fix sum moar typos [text files]
Various typo fixes in auxiliary text files included with the source,
(README, TODO, etc.).

Signed-off-by: Pieter Praet <pieter@praet.org>

Edited-by: Carl Worth <cworth@cworth.org> Restricted to just text files.
2011-06-23 15:40:50 -07:00
David Bremner
3381ae4176 Revert "debian: Override RPATH_LDFLAGS"
This reverts commit fc126d89b2.

This override of the make variable RPATH_LDFLAGS should no longer
be required since the auto-configuration was fixed
2011-06-23 19:35:35 -03:00
Dmitry Kurochkin
ce08571428 Fix wrong-type-argument lisp error in `notmuch-fcc-header-setup'
This error occurs when `notmuch-fcc-dirs' is set to a list.  The error
was in the `notmuch-fcc-dirs' format check which was changed in an
incompatible way from 0.4 to 0.5.

The fix was extracted from a bigger patch series by David
Edmondson id:"1290682750-30283-2-git-send-email-dme@dme.org".

Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
2011-06-23 15:19:06 -07:00
Carl Worth
76b54f1898 test: Test emacs message composing with various values for notmuch-fcc-dirs
We exercise each of the documented values (nil, a string, and a
list). For the list, we test matching a specific entry, matching a
catch-all regular expression, and no match at all (in which case there
is no FCC set).
2011-06-23 15:19:06 -07:00
David Bremner
1c396673f3 debian: Set conflicts from package split to point to an existing version.
The previous version was harmless, since there were no versions
uploaded between ~237 and ~254, but this is less confusing.
2011-06-23 14:42:15 -03:00
David Bremner
9e7c40543b debian: fix typo in short description of notmuch-vim
Thanks to Dirk Eddelbuettel for noticing.
2011-06-23 14:37:29 -03:00
David Bremner
1126732ece debian: update changelog for upload 0.6~254, bump standards version to 3.9.2 2011-06-23 07:58:31 -03:00
David Bremner
19f0ca7ee2 debian: remove Xapian exceptions symbols from libnotmuch1.symbols
These were never intended to be public, since the library exports only
a C API.
2011-06-23 07:58:27 -03:00
David Bremner
33330dc050 debian: split off vim interface to its own package
So far the package does notthing fancy with vim-addon-manager.
2011-06-23 07:54:40 -03:00
David Bremner
6f3d3c68a0 debian: split off emacs interface into its own package.
- rename emacsen-install/remove files, and change embedded package
  name

- split notmuch.install, notmuch.dirs

- add Breaks/Replaces for previous notmuch packages with overlapping
  files.
2011-06-23 07:54:40 -03:00
David Bremner
ffa88554d5 debian: Build depend on emacs-nox instead of emacs.
Nothing in the build process needs X, and the number of dependencies
that need to be installed is much smaller.
2011-06-23 07:13:32 -03:00
David Bremner
0fdc28cd6b debian: build package for python-bindings.
This uses dh_python2 (included with sufficiently recent versions of
the python/python-all packages). python-all brings in all of the
supported versions of python. The double calls to dh_auto_install and
friends are to avoid looping over python versions ourselves.
2011-06-23 07:13:32 -03:00
David Bremner
fba968dbfa tests: add a test for symbol hiding side effects
The worry here is that a binary linking with libnotmuch might lose
access to Xapian::Error symbols because libnotmuch hides them.

We are careful here to create ./fakedb/.notmuch in order to trigger a
Xapian exception, and not just a missing file check.

Thanks to jrollins and amddragon for suggestions.
(cherry picked from commit 66f37f5f6864a988f94ddb893e3a176af57f6c8e)
2011-06-23 07:05:25 -03:00
David Bremner
cdf1c70ab3 libnotmuch: add linker script to declare only notmuch_* symbols as global.
This is closely tied to gcc and particularly gnu ld, but I guess the
shared library linking code would need to be adjusted to work on a
non-gnu linker anyay.

I had to make a few not-obviously related changes to the
lib/Makefile.local to make this work: libnotmuch_modules is defined
with := and used in place of $^
(cherry picked from commit 014bf85b1c06ff49be2bde5a26433d2cf376cf70)
2011-06-23 07:04:56 -03:00
David Bremner
de35a0e7f9 debian: add changlog stanza for new snapshot 0.6~237
(cherry picked from commit 17daa480e435ad4c1d8f4f18447eff1ff36dbe00)
2011-06-22 22:45:33 -03:00
David Bremner
b2f0b8a186 debian: Changelog stanza for new git snapshot 0.6~215
(cherry picked from commit b85a415a7bd91c360c0acd453ead39be854f63f7)
2011-06-22 22:45:12 -03:00
David Bremner
a411eb4d1c debian: update symbols file for libnotmuch1
One of the Xapian exception symbols has gone missing.  Hopefully this
doesn't mean we should be bumping the SONAME.
(cherry picked from commit e8260d63f1f5a37094801ecd5d110bf48f22ee45)
2011-06-22 22:44:50 -03:00
David Bremner
bd35e57052 debian: Changelog stanza for new snapshot 0.6~180
(cherry picked from commit 54a3983d3c38830e2b609be0a96c5cf6dc6de054)
2011-06-22 22:44:34 -03:00
David Bremner
e4e72cfd49 debian: update symbols file for libnotmuch1
This re-exports three symbols from Xapian.
(cherry picked from commit f36c36ddd13486d1e38b4dd0efa717108f56c4f9)
2011-06-22 22:44:13 -03:00
David Bremner
fc126d89b2 debian: Override RPATH_LDFLAGS
Probably there is a nicer way to do this; perhaps it should be a
configure option.
(cherry picked from commit 387dc520dd68cc805e390f3a1399f85b5d5bd83a)
2011-06-22 22:43:21 -03:00
David Bremner
933ef53411 debian: Add changelog stanza for new snapshot 0.6~171
After some debate, we settled on 0.6~$num as a snapshot version
number, at least until 0.6 is released. This has the needed property
of sorting after 0.5+nmu$num.
(cherry picked from commit 54f7766febc3fa3c9dc475f6ec6718c5e87a189e)
2011-06-22 22:43:01 -03:00
David Bremner
fcbf21587c debian: Add myself (David Bremner) as an uploader
This avoids having to mark every upload as a non-maintainer upload.
(cherry picked from commit e849851d2d38cbf985f3fd884226100b93f3044f)
2011-06-22 22:42:44 -03:00
David Bremner
6eec8d02e3 debian: Incorporate changelog entries from post 0.5 uploads
These uploads added the timeout to the tests to fix build failures.
(cherry picked from commit 0901faabd90a689728d8079b3163bd76b29d29aa)
2011-06-22 22:41:46 -03:00
Jameson Graef Rollins
2ba880d59e emacs: Show all multipart/alternative parts by default.
This is patch is a temporary work-around for a slight regression that
popped up in the part handling reorganization.  Currently, text/plain
parts are always preferred, if present, over other non-text/plain
parts in multipart/alternative.  However, this means that if there is
a blank text/plain part, no content will be displayed.

One way to get around this is to set the
"notmuch-show-all-multipart/alternative-parts" customization variable
to True ('t'), which will cause all parts to always be displayed.

Since we want to move forward with the next release, we're going to
set this variable true by default, to make sure that no content is
unretrievably hidden from the user.  Once we come up with a better
solution for easy display of hidden parts we can set this back to a
default value of 'nil'.
2011-06-22 22:28:12 -03:00
Carl Worth
b0ba84f9e7 smtp-dummy: Prefer return rather than exit() in main.
The main() function should be written as just another function with a
return value. This allows for more reliable code reuse. Imagine that
main() grows too large and needs to be factored into multiple
functions. At that point, exit() is probably the wrong thing, yet can
also be hard to notice as it's in less-frequently-tested exceptional
cases.
2011-06-22 06:38:33 -07:00
Dmitry Kurochkin
41a094624a Fix compilation warnings in test/smtp-dummy.c.
* Remove unused variables in main(): buf, bytes and greeting.
* Replace return with no value in main() with exit(3).
2011-06-22 06:38:33 -07:00
David Bremner
2b76283b52 debian: Generate version from debian/changelog
This avoids patching the version file once per Debian upload.
Original version file is saved and restored.
(cherry picked from commit 2938a98bf4c4abe0426caee4555d889d655bc0df)
2011-06-22 08:11:54 -03:00
David Bremner
114eb1c520 tests: Add optional use of timeout utility, if present.
Each top level test (basic, corpus, etc...) is run with a fixed
timeout of 2 minutes.

The goal here is to treat a hung test as a failure. The emacs test for
sending mail is known to be problematic on the Debian
autobuilders. This is both a bandaid fix for that, and a sensible long
term feature.
(cherry picked from commit 5f99c80e02736c90495558d9b88008a768876b29)
2011-06-22 08:11:32 -03:00
David Bremner
c39b492c19 Do not import notmuch in setup.py.
Importing notmuch loads the notmuch shared library. When building
without a system install of notmuch, this requires e.g. setting
LD_LIBRARY_PATH for building and fails completely for cleaning.
2011-06-20 09:45:43 +02:00
Sebastian Spaeth
12d6f90e77 Simplify (& fix) Message().__str__()
We were still using len(self.get_replies()) for the __str__ summary of a
mail, but 1) len(Messages()) has just gone away 2) the number of replies
can not be retrieved when we got the message via search_messages()
anyway, and 3) it is likely quite expensive to pull all replies for all
messages that we display a summary of.

So we fix this by simplifying str(Message()) to omit the number of replies.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-06-16 17:33:47 +02:00
Sebastian Spaeth
995303c21b python: Bulletproof Database() path parameter
libnotmuch (and python) crashed when I accidently passed in an invalid
value as path argument to the Database() instantiation.

Therefore, we now check via assert that the handed in path is actually a
real string (or None).

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-06-16 15:51:13 +02:00
Sebastian Spaeth
0817f0e168 python: Improve API documentation
Various API doc cleanups and improvements. No code change.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-06-16 15:41:48 +02:00
Sebastian Spaeth
d8c0e0c72d Implement Message.tags_to_maildir_flags
and also maildir_flags_to_tags. The methods will be invoked by
db.add_message() and also (if not overridden via function parameter) by
add|remove_tag and remove_all_tags. Documentation on the usage has been
updated.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-06-16 14:41:02 +02:00
Sebastian Spaeth
b4049316cc python: Improve documentation
Improve the documentation with regard to the new __cmp__ and __hash__
methods and the implications of doing set arithmetic with Messages()
objects.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-06-15 21:36:26 +02:00
Dmitry Kurochkin
917e87415e Fix indentation in guess_from_received_header(). 2011-06-15 07:08:28 -07:00
Dmitry Kurochkin
eeffa305eb Fix memory leak in guess_from_received_header().
Mta variable was not free()d in one case.
2011-06-15 07:08:25 -07:00
Dmitry Kurochkin
565d87c2aa Fix double free in guess_from_received_header().
Before the change, the last loop in guess_from_received_header()
did not reset domain and tld variables to NULL.  This leads to
double free error in some cases and possibly other bugs.
2011-06-15 07:08:18 -07:00