David Bremner [Fri, 1 Jul 2011 18:12:23 +0000 (15:12 -0300)]
version: bump to 0.6
The release machinery in the build system depends on this file
being correct.
David Bremner [Fri, 1 Jul 2011 16:59:15 +0000 (13:59 -0300)]
NEWS: Update for release 0.6
Fix some typos, add some notes on python bindings, "improve" the folder searching
description, expand the discussion of crypto changes.
This includes the changes from
id:"
1309541202-4938-1-git-send-email-dmitry.kurochkin@gmail.com"
Thanks to Sebastian, Austin, and Uwe, Dmitry for the editing help.
David Bremner [Fri, 1 Jul 2011 14:48:01 +0000 (11:48 -0300)]
debian: add changelog stanza for release 0.6, install upstream docs referred to.
This perhaps breaks the "one thing at a time rule", but seems better
than leaving the changelog pointing to nothing.
David Bremner [Thu, 30 Jun 2011 14:38:28 +0000 (11:38 -0300)]
debian: move vim directory creation to notmuch-vim binary package
This step was missed during the package split of notmuch to notmuch,
notmuch-emacs, and notmuch-vim.
It seems mostly harmless in this case, but it is silly for non-vim
users to have those directories.
(cherry picked from commit
4b5875d81ef80dd7138e178f59ac67f66d5fe0ab)
Carl Worth [Fri, 1 Jul 2011 10:14:03 +0000 (03:14 -0700)]
NEWS: Add notes for (imminent) notmuch 0.6 release
By skimming through "git log 0.5..origin/release" late at
night. Hopefully everything here is accurate.
(cherry picked from commit
d173069ad9cf042458f16af00729867cb13bb3b7)
Carl Worth [Fri, 1 Jul 2011 08:44:39 +0000 (01:44 -0700)]
emacs: Fix to unconditionally display subject changes in collapsed thread view
The feature to show subject changes in the collapsed thread view was
originally added (
8ab433607) with an option
(notmuch-show-always-show-subject) to display the subject
for all messages, even when there was no change.
The subsequent commit (
4f04d273) changed the sense of the test (or to
and) and the name of the controlling variable
(notmuch-show-elide-same-subject).
But this commit is broken in a few ways:
1. The original definition of notmuch-show-always-show-subject was
left around
But the variable isn't actually used in the code at all, so it
just adds clutter and confusion to the customization interface.
2. The name and description of the controlling variable doesn't
match the implementation
The name suggests that setting the variable to t will cause
repeated subjects to be elided, (suggesting that when it is nil
all subjects will be shown).
However, when the variable is nil, no subjects are shown. So a
correct name for the variable in this sense would be
notmuch-show-subject-changes.
Showing subject changes is a useful feature, and should be on by
default. (We don't want to bury generally useful features behind
customizations that users have to find).
Rather than fixing the name of the variable and changing its default
value, here we remove the condition entirely, such that the feature is
enabled unconditionally.
So both the currently-used variable and the stale definition of the
formerly-used are removed.
Also, the one relevant test-suite result is updated, (showing the
intial subject of a collapsed thread, and no subject display for later
messages that do not change the subject).
(cherry picked from commit
580de27177de5cd6c5cbc9cc3759ce320216dd5b)
David Bremner [Thu, 30 Jun 2011 13:04:57 +0000 (10:04 -0300)]
debian: changelog stanza for first "official" release candidate
The last upload to experimental was really a release candidate too.
Switch versioning to ~rc1 as counting commits is confusing when
building from the release branch.
(cherry picked from commit
117852a5f1269e77a7f76c53236220a9ec89eba6)
David Bremner [Thu, 30 Jun 2011 11:29:07 +0000 (08:29 -0300)]
debian: don't install zsh completion files into /usr/share/zsh
as of version 4.3.12, perhaps earlier, the Debian zsh package now
ships /usr/share/zsh/functions/Completion/Unix/_notmuch, so we
shouldn't install that ourselves anymore.
My understanding is that letting zsh ship the completion scripts is
the standard thing to do.
The script is still shipped in /usr/share/doc/notmuch/examples
(cherry picked from commit
0a0f5f1bbe4bf256a14dee0ab2af3065a251a72c)
Sebastian Spaeth [Fri, 24 Jun 2011 06:44:06 +0000 (08:44 +0200)]
python: Do not implicitely call maildir_flags_to_tags etc
In order to remain consistent with the underlying C API, we do not
automatically synchronize notmuch tags and maildir flags anymore.
The underlying functions Message.maildir_flags_to_tags and
Message.tags_to_maildir_flags still exist and are available to the user.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
(cherry picked from commit
e59eaa5ddd2c23742c95e2acd34673b58ea34d2d)
Carl Worth [Wed, 29 Jun 2011 21:08:04 +0000 (14:08 -0700)]
debian/changelog: Add note that notmuch-vim description is in (bug #631974)
This note will automatically cause the bug entry to be closed as fixed when
the next package (including this change) is uploaded.
(cherry picked from commit
04b9ffa56f54976f6a3324a3673915a036646ea6)
Mark Anderson [Wed, 29 Jun 2011 20:04:45 +0000 (14:04 -0600)]
Fix folder: coherence issue
Add removal of all ZXFOLDER terms to removal of all XFOLDER terms for
each message filename removal.
The existing filename-list reindexing will put all the needed terms
back in. Test search-folder-coherence now passes.
Signed-off-by:Mark Anderson <ma.skies@gmail.com>
(cherry picked from commit
8a856e5c38b79359e4fbf9e27f58b1fe00c1e18a)
Carl Worth [Wed, 29 Jun 2011 21:11:38 +0000 (14:11 -0700)]
test: Use increment_mtime rather than sleep
The sleep was to force the directory's mtime to advance between the
previous notmuch new and the subsequent rm;notmuch new.
The current convention is to use the existing increment_mtime function
for this purpose, (which avoids the test suite being slowed down by
calls to sleep).
Thanks to Austin Clements for noticing this undesired sleep.
(cherry picked from commit
55a78d5dbd96b80939458d9d6cc8a536b1befa87)
Mark Anderson [Mon, 27 Jun 2011 17:12:24 +0000 (11:12 -0600)]
test:Folder tags shouldn't match after removal of file in given folder
Test for bug. Current stemming support for notmuch adds extra terms
to the DB which aren't removed when the file renames are detected.
When folder tags are added to a message, Xapian terms for both XFOLDER
and ZXFOLDER are generated. When one of the filenames are
renamed/removed, only the XFOLDER tags are removed, leaving it possible
for a match on a folder: tag that was previously but is no longer a
match in the maildir.
(cherry picked from commit
86e0baeb6df5509393832488c0de3520a1a5bdcb)
Mark Anderson [Fri, 24 Jun 2011 23:26:55 +0000 (17:26 -0600)]
search --output=files: Output all filenames for each matching message
Messages in the database can have multiple files associated with a
single message-id, but until now only one filename for each message
has been reported by "notmuch search --output=files"
Signed-off-by: Mark Anderson <ma.skies@gmail.com>
(cherry picked from commit
d752509abfd7697d2f8a1c5be6f96f0df4f0299d)
David Bremner [Mon, 27 Jun 2011 01:08:52 +0000 (22:08 -0300)]
libnotmuch: build symbols list without relying on gcc -aux-info.
Carl reports "gcc -aux-info notmuch.aux lib/notmuch.h" does not
generate notmuch.aux for him with Debian gcc 4.6.0-8. A small
modification of the original sed regular expression allows us to work
directly from lib/notmuch.h, rather than preprocessing with gcc.
As with most such simple regex based "parsing", this is quite
sensitive to the input format, and needs that each symbol to be
exported from libnotmuch should
- start with "notmuch_"
- be the first non-whitespace token on the line
- be followed by an open parenthesis.
(Cherry-picked from
51b7ab69687, with conflicts resolved by db)
Dmitry Kurochkin [Thu, 23 Jun 2011 23:59:33 +0000 (03:59 +0400)]
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
8bf0c1c3deb49d54e86c04826a05f0217a81cf47)
Dmitry Kurochkin [Sat, 28 May 2011 21:51:49 +0000 (14:51 -0700)]
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
ce08571428dc784e279b28527f8073a1a05d7c37)
Carl Worth [Thu, 23 Jun 2011 22:10:31 +0000 (15:10 -0700)]
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
76b54f1898e97f6d07d0eaaf04a1772e60a7c48d)
David Bremner [Thu, 23 Jun 2011 23:39:29 +0000 (20:39 -0300)]
debian: fix installation of notmuch-vim README
There was a leftover override, installing it into the wrong package.
David Bremner [Thu, 23 Jun 2011 22:41:28 +0000 (19:41 -0300)]
start new changelog stanza
David Bremner [Thu, 23 Jun 2011 22:35:35 +0000 (19:35 -0300)]
Revert "debian: Override RPATH_LDFLAGS"
This reverts commit
fc126d89b2baa479d98c864fbef4174b6da707c0.
This override of the make variable RPATH_LDFLAGS should no longer
be required since the auto-configuration was fixed
David Bremner [Thu, 23 Jun 2011 17:42:15 +0000 (14:42 -0300)]
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.
David Bremner [Thu, 23 Jun 2011 17:37:29 +0000 (14:37 -0300)]
debian: fix typo in short description of notmuch-vim
Thanks to Dirk Eddelbuettel for noticing.
David Bremner [Mon, 20 Jun 2011 22:05:53 +0000 (19:05 -0300)]
debian: update changelog for upload 0.6~254, bump standards version to 3.9.2
David Bremner [Wed, 22 Jun 2011 00:49:39 +0000 (21:49 -0300)]
debian: remove Xapian exceptions symbols from libnotmuch1.symbols
These were never intended to be public, since the library exports only
a C API.
David Bremner [Tue, 21 Jun 2011 17:31:21 +0000 (14:31 -0300)]
debian: split off vim interface to its own package
So far the package does notthing fancy with vim-addon-manager.
David Bremner [Tue, 21 Jun 2011 01:00:44 +0000 (22:00 -0300)]
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.
David Bremner [Mon, 20 Jun 2011 21:52:58 +0000 (18:52 -0300)]
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.
David Bremner [Sun, 19 Jun 2011 18:09:46 +0000 (15:09 -0300)]
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.
David Bremner [Wed, 22 Jun 2011 11:58:01 +0000 (08:58 -0300)]
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)
David Bremner [Wed, 22 Jun 2011 00:25:06 +0000 (21:25 -0300)]
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)
David Bremner [Sat, 18 Jun 2011 13:14:53 +0000 (10:14 -0300)]
debian: add changlog stanza for new snapshot 0.6~237
(cherry picked from commit
17daa480e435ad4c1d8f4f18447eff1ff36dbe00)
David Bremner [Sat, 4 Jun 2011 11:52:20 +0000 (08:52 -0300)]
debian: Changelog stanza for new git snapshot 0.6~215
(cherry picked from commit
b85a415a7bd91c360c0acd453ead39be854f63f7)
David Bremner [Wed, 1 Jun 2011 00:45:35 +0000 (21:45 -0300)]
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)
David Bremner [Wed, 1 Jun 2011 00:17:40 +0000 (21:17 -0300)]
debian: Changelog stanza for new snapshot 0.6~180
(cherry picked from commit
54a3983d3c38830e2b609be0a96c5cf6dc6de054)
David Bremner [Sat, 28 May 2011 11:53:03 +0000 (08:53 -0300)]
debian: update symbols file for libnotmuch1
This re-exports three symbols from Xapian.
(cherry picked from commit
f36c36ddd13486d1e38b4dd0efa717108f56c4f9)
David Bremner [Sat, 28 May 2011 11:48:34 +0000 (08:48 -0300)]
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)
David Bremner [Sat, 28 May 2011 10:26:50 +0000 (07:26 -0300)]
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)
David Bremner [Sat, 28 May 2011 16:31:26 +0000 (13:31 -0300)]
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)
David Bremner [Sat, 28 May 2011 10:03:31 +0000 (07:03 -0300)]
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)
Jameson Graef Rollins [Thu, 23 Jun 2011 01:14:12 +0000 (18:14 -0700)]
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'.
Carl Worth [Tue, 21 Jun 2011 21:54:10 +0000 (14:54 -0700)]
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.
Dmitry Kurochkin [Thu, 16 Jun 2011 10:32:08 +0000 (14:32 +0400)]
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).
David Bremner [Tue, 21 Jun 2011 12:03:19 +0000 (09:03 -0300)]
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)
David Bremner [Sat, 28 May 2011 09:50:11 +0000 (06:50 -0300)]
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)
David Bremner [Sun, 19 Jun 2011 19:53:43 +0000 (16:53 -0300)]
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.
Sebastian Spaeth [Thu, 16 Jun 2011 15:33:47 +0000 (17:33 +0200)]
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>
Sebastian Spaeth [Thu, 16 Jun 2011 13:51:13 +0000 (15:51 +0200)]
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>
Sebastian Spaeth [Thu, 16 Jun 2011 13:41:48 +0000 (15:41 +0200)]
python: Improve API documentation
Various API doc cleanups and improvements. No code change.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Sebastian Spaeth [Thu, 16 Jun 2011 12:41:02 +0000 (14:41 +0200)]
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>
Sebastian Spaeth [Wed, 15 Jun 2011 19:36:26 +0000 (21:36 +0200)]
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>
Dmitry Kurochkin [Wed, 15 Jun 2011 11:12:14 +0000 (15:12 +0400)]
Fix indentation in guess_from_received_header().
Dmitry Kurochkin [Wed, 15 Jun 2011 11:12:13 +0000 (15:12 +0400)]
Fix memory leak in guess_from_received_header().
Mta variable was not free()d in one case.
Dmitry Kurochkin [Wed, 15 Jun 2011 11:12:12 +0000 (15:12 +0400)]
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.
Dmitry Kurochkin [Wed, 25 May 2011 22:10:16 +0000 (02:10 +0400)]
Simplify message and headers visibility code in notmuch-show view.
Before the change, headers and message visibility functions took
extra care to correctly set `buffer-invisibility-spec'. This was
needed because headers overlay `invisible' property had only
headers' invisibility spec. So visibility of headers was
determined only by the headers invisibility spec. The patch sets
headers overlay `invisible' property a list with both the headers
and the message invisibility spec. This makes headers invisible
if either of them is added to the `buffer-invisibility-spec' and
allows to simplify the code.
Dmitry Kurochkin [Wed, 25 May 2011 22:10:15 +0000 (02:10 +0400)]
Set higher priority for headers and hidden citation overlays.
Before the patch, message, headers and hidden citation overlays
had zero priority. All these overlay have `invisible' property.
Emacs documentation says that we should not make assumptions
about which overlay will prevail when they have the same priority
[1]. It happens to work as we need, but we should not rely on
undocumented behavior.
[1] http://www.gnu.org/s/emacs/manual/html_node/elisp/Overlay-Properties.html
Dmitry Kurochkin [Wed, 25 May 2011 22:10:14 +0000 (02:10 +0400)]
Fix hiding a message while some citations are shown in notmuch-show view.
Before the change, message and citation invisibility overlays
conflicted: if some citation is made visible and then the whole
message is hidden, that citation remained visible. This happened
because the citation's overlay has an invisible property which
takes priority over the message overlay. The message
invisibility spec does not affect citation visibility, it is
determined solely by the citation overlay invisibility spec.
Hence, if citation is made visible, it is not hidden by message
invisibility spec.
The patch changes citation overlay invisibility property to be a
list which contains both the citation and the message
invisibility specs. This makes the citation invisible if either
of them is added to the `buffer-invisibility-spec'. Note that
all citation visibility states are "restored" when the message
hidden and shown again.
Dmitry Kurochkin [Wed, 25 May 2011 22:10:13 +0000 (02:10 +0400)]
Set message invisibility spec properties before inserting the body.
This would allow body-inserting code (in particular, wash
button-inserting code) to use message invisibility specs.
Dmitry Kurochkin [Wed, 25 May 2011 22:10:12 +0000 (02:10 +0400)]
Pass message to the `notmuch-show-insert-text/plain-hook' hook.
Before the change, the `notmuch-show-insert-text/plain-hook' was
given only the `depth' argument. The patch adds another one -
the message. Currently, the new message argument is not used by
any on the hooks. But it will be used later to get access to
message invisibility specs when wash buttons are inserted.
Dmitry Kurochkin [Sat, 28 May 2011 01:29:17 +0000 (05:29 +0400)]
Workaround for Emacs bug #8721.
The emacs bug is that isearch cannot search through invisible text
when the 'invisible' property is a list.
The patch adds `notmuch-isearch-range-invisible' function which
is the same as `isearch-range-invisible' but with fixed Emacs bug
#8721. Advice added for `isearch-range-invisible' which calls
`notmuch-isearch-range-invisible' instead of the original
`isearch-range-invisible' when in `notmuch-show-mode'.
Dmitry Kurochkin [Thu, 26 May 2011 21:38:34 +0000 (01:38 +0400)]
test emacs: Add tests for hiding messages in notmuch-show view
This test is expected to fail as it exposes a current bug, (which we
hope to fix soon).
Sebastian Spaeth [Wed, 15 Jun 2011 13:05:47 +0000 (15:05 +0200)]
python: Implement Message.__cmp__ and __hash__
We can now do: if msg1 == msg2, and we can use set arithmetic on
Messages():
s1, s2= msgs1, msgs2
s1.union(s2)
s2 -= s1
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Sebastian Spaeth [Wed, 15 Jun 2011 12:25:33 +0000 (14:25 +0200)]
python: Remove Messages().__len__
Messages.__len__() exhausted the iterator and list() inherently calls
len(), so we could not invoke list(msgs) without getting errors. Fix
this by implementing __nonzero__ but removing __len__ on Messages.
Use Query.count_messages() or len(list(msgs)) if you need to know the
number.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Carl Worth [Sat, 11 Jun 2011 00:18:27 +0000 (17:18 -0700)]
test: Fix from-guessing to actually span Received headers over multiple lines
The intent was always to make these Received headers span multiple
lines. But the escapes were causing the shell to ignore the newlines,
so that the result instead was long Received headers on a single line
each.
Fixing the intent here doesn't actually change the test-suite results
at all.
Stewart Smith [Tue, 17 May 2011 02:10:32 +0000 (12:10 +1000)]
Fix appending of Received headers
We're not properly concatenating the Received headers if we parse them
while requesting a header that isn't Received.
this fixes notmuch-reply address detection in a bunch of situations.
Carl Worth [Fri, 10 Jun 2011 23:53:45 +0000 (16:53 -0700)]
test: Extend from-guessing test with a test with multiple Received headers
This is much more realistic, as most messages in the wild will have multiple
Received headers. Also, this demonstrates a current bug in the Received
header parsing, (multiple Received headers are not properly concatenated
depending on the order in which headers are parsed in a message).
Carl Worth [Fri, 10 Jun 2011 23:28:26 +0000 (16:28 -0700)]
test: Add test that emacs detects and hides top-post quotes of original messages
This tests the recently-added detection/hiding of top-posted quotations and
in the testing, it takes advantage of the less-recently-added
visible-buffer-string function for emitting only the visible text
from a buffer.
David Bremner [Wed, 24 Feb 2010 18:30:06 +0000 (14:30 -0400)]
notmuch.el: hide original message in top posted replies.
This code treats top posted copies essentially like signatures, except
that it doesn't sanity check their length, since neither do their
senders.
New user-visible variables:
notmuch-wash-button-original-hidden-format
notmuch-wash-button-original-visible-format
Rebased-by: Carl Worth <cworth@cworth.org>
Daniel Kahn Gillmor [Fri, 3 Jun 2011 23:57:46 +0000 (19:57 -0400)]
Use stock GMimeSession by default
Our use of GMimeSession was unneeded boilerplate, and we weren't doing
anything with it. This simplifies and clarifies that assumption.
If we want to do anything fancier later, the examples in the gmime
source are a reasonable source to work from in defining a new
GMimeSession derivative.
Since GMimeSession is going away in GMime 2.6, though, i don't
recommend using it.
Jameson Graef Rollins [Sat, 28 May 2011 21:52:00 +0000 (14:52 -0700)]
show: Avoid inadvertently closing stdout
GMime has a nasty habit of taking ownership by default of any FILE*
handed to it va g_mime_stream_file_new. Specifically it will close the
FILE* when the stream is destroyed---even though GMime didn't open the
file itself.
To avoid this bad behavior, we have to carefully set_owner(FALSE)
after calling g_mime_stream_file_new. In the format_part_content_text
function, since commit
d92146d3a6809f8ad940302af49cd99a0820665e we've
been calling g_mime_stream_file_new unconditionally, but only calling
g_mime_stream_file_set_owner(FALSE) conditionally.
This led to the FILE* being closed early when notmuch show output was
redirected to a file.
Fixing this fixes the test-suite cases that broke with the previous
commit, (which added redirected "notmuch show" calls to the test suite
to expose this bug).
Edited-by: Carl Worth <cworth@cworth.org> with a new commit message to
explain the bug and fix.
Jameson Graef Rollins [Sat, 28 May 2011 21:16:30 +0000 (14:16 -0700)]
test: modify multipart test to use test_expect_equal_file
Again, this is a much cleaner and more thorough test, and in fact
exposes a bug in the format=text output, that will be fixed the next
commit. Because of this, some of the multipart tests currently fail.
Jameson Graef Rollins [Sat, 28 May 2011 20:46:24 +0000 (13:46 -0700)]
test: update emacs test to use test_expect_equal_file
This is a much cleaner way to do the emacs tests, since we're actually
comparing output against existing files with expected output. We also
won't miss any trailing newlines this way.
And speaking of which, one of the expected output files was actually
missing a trailing blank line that was actually in one of the original
messages, so this was fixed.
Dmitry Kurochkin [Thu, 12 May 2011 13:56:25 +0000 (17:56 +0400)]
Make `notmuch-show-clean-address' parsing-error-proof.
Mail-header-parse-address may fail for an invalid address.
Before the change, this would result in empty notmuch-show buffer
with an error message like: Scan error: "Unbalanced parentheses".
The patch wraps the function in condition-case and returns
unchanged address in case of error.
Dmitry Kurochkin [Thu, 12 May 2011 13:56:26 +0000 (17:56 +0400)]
test: add "notmuch-show for message with invalid From" test
Thomas Jost [Sat, 28 May 2011 21:51:56 +0000 (14:51 -0700)]
emacs: Cleaner interface when prompting for sender address
Most of the time, every entry in the list of identities has the same user name
part. It can then be filled in automatically, and the user can only be prompted
for the email address, which makes the interface much cleaner.
Thomas Jost [Sat, 28 May 2011 21:51:55 +0000 (14:51 -0700)]
emacs: Don't always prompt for the "From" address when replying
When replying, the From: address is already filled in by notmuch reply, so most
of the time there is no need to prompt the user for it.
Jameson Graef Rollins [Sat, 28 May 2011 21:51:54 +0000 (14:51 -0700)]
emacs: fix notmuch-show-part-button to not include newline
This makes the button cleaner, so that it doesn't include the entire
rest of the line that the button is on.
Austin Clements [Sat, 28 May 2011 21:51:53 +0000 (14:51 -0700)]
Fix misspelling in search output sanitization test.
A simple spelling fix in the text description.
Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
Daniel Kahn Gillmor [Sat, 28 May 2011 21:51:52 +0000 (14:51 -0700)]
avoid segfault when calling sanitize_string() on NULL
Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
Anton Khirnov [Sat, 28 May 2011 21:51:51 +0000 (14:51 -0700)]
lib/message-file: plug three memleaks.
Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
Dmitry Kurochkin [Sat, 28 May 2011 21:51:50 +0000 (14:51 -0700)]
Use message-field-value instead of message-fetch-field in FCC header setup.
For message-fetch-field the buffer is expected to be narrowed to
just the header of the message. That is not the case when
notmuch-fcc-header-setup is run, hence a wrong header value may be
returned. E.g. when forwarding an
email, (message-fetch-field "From") returns the From header value
of the forwarded email.
Message-field-value is the same as message-fetch-field, only
narrows the buffer to the headers first.
Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
Sebastian Spaeth [Thu, 2 Jun 2011 15:44:23 +0000 (17:44 +0200)]
bindings/python: Bump bindings version to 0.6
To match the upcoming release, and with the updated API to match the
current libnotmuch, bump the python version number (notmuch.__VERSION__)
to 0.6.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Sebastian Spaeth [Thu, 2 Jun 2011 15:28:50 +0000 (17:28 +0200)]
bindings/python: Implement Tags().__nonzero__()
Analog to Threads.__nonzero__ this allows us to perform list() on a Threads() object and to repeatedly call "if Tags():" or "bool(Tags())" without implicitly invoking len(), thus exhausting our iterator.
While touching this code, I added a small micro-optimization to the Tag next() function. There is no need to explicitly check _is_valid, as _get implicitly does check for validness and returns None, if there is no more Tag to fetch. This avoids some roundtrips into the library when iterating through Tags.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Sebastian Spaeth [Thu, 2 Jun 2011 14:28:00 +0000 (16:28 +0200)]
bindings/python: implement Threads().__nonzero__
__nonzero__ checks if Threads() contains at least one more valid thread
The existence of this function makes 'if Threads(): foo' work, as that
previously implicitely called len() exhausting the iterator. This
function makes `bool(Threads())` work repeatedly.
For further info, see http://docs.python.org/reference/datamodel.html.
Credits for the hint go to Brian May.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Sebastian Spaeth [Thu, 2 Jun 2011 07:20:56 +0000 (09:20 +0200)]
bindings/python: Include the new get_filenames in the API docs
They had accidentally been left out, so we should also include the
function docs for get_messages in the API docs.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Sebastian Spaeth [Thu, 2 Jun 2011 06:56:03 +0000 (08:56 +0200)]
bindings/python: Implement Message().get_filenames()
Message().get_filenames() will return a generator that allows to
iterator over the recorded filenames for a certain Message. Do ntoe that
as all generators, these are one-time use only. You will have to reget
them to perform various actions. So this works::
len(Message().get_filenames())
list(Message().get_filenames())
for n in Message().get_filenames():
print n
But this won't::
names = Message().get_filenames()
len(names) #uses up the iterator
list(names) #outch, already used up...
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Pieter Praet [Sun, 20 Mar 2011 10:06:22 +0000 (11:06 +0100)]
emacs: Use "message-cited-text" instead of "message-cited-text-face"
(describe-face 'message-cited-text-face)
> message-cited-text-face is an alias for the face `message-cited-text'.
> This face is obsolete since 22.1; use `message-cited-text' instead.
Signed-off-by: Pieter Praet <pieter@praet.org>
Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
Jameson Graef Rollins [Sun, 8 May 2011 23:55:07 +0000 (16:55 -0700)]
test: cleanup search-output test names (no functional change)
Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
Florian Friesdorf [Sun, 8 May 2011 23:13:15 +0000 (01:13 +0200)]
test: add test for sanitized notmuch-search output
This feature was recently added, so it of course needs a test now.
Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
Edited-by: Carl Worth <cworth@cworth.org> Fixed test to use
notmuch_search_sanitize in order to be robust against unpredictable
thread ID numbers, (due to unpredictable order in which the filesystem
presents files).
Andreas Amann [Sun, 8 May 2011 21:14:33 +0000 (23:14 +0200)]
Sanitize "Subject:" and "Author:" fields to not contain control characters in notmuch-search
When a Subject field contained encoded CRLF sequences, these sequences
would appear unfiltered in the output of notmuch search. This confused
the notmuch emacs interface leading to "Unexpected Output"
messages. This is now fixed by replacing all characters with ASCII
code less than 32 with a question mark.
Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
Thomas Jost [Wed, 30 Mar 2011 22:31:04 +0000 (00:31 +0200)]
emacs: Define several faces for the crypto-status button
Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
jrollins modified this patch to conform to recent changes in the
crypto processing since this patch was originally sent in.
Florian Friesdorf [Mon, 18 Apr 2011 17:41:39 +0000 (19:41 +0200)]
test: Create and set temporary home directory
In the master branch in test/emacs two tests access the build users home
directory, so does emacs_deliver_message in the crypto branch.
The tests should not touch the build user's home directory. The patch
creates a directory in the temporary test directory and sets home
accordingly.
In case of a non-existent home directory, the tests are failing without
this patch.
Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
Jameson Graef Rollins [Sun, 8 May 2011 21:13:05 +0000 (14:13 -0700)]
test: remove json test for search null result, since it's being more properly tested in search-output
The test in json was inferior to the one in search-output, since it
wasn't properly testing for the presence of a trailing newline.
Jameson Graef Rollins [Sun, 8 May 2011 21:04:47 +0000 (14:04 -0700)]
test: move utf-8 subject search test from json to search test script
This test doesn't have anything to do with json, and has everything to
do with testing search capability, so I'm not sure why it was in the
wrong place.
Jameson Graef Rollins [Fri, 6 May 2011 18:57:16 +0000 (11:57 -0700)]
test: Move a test from search to search-output, and add a similar json test
The "Search for non-existent message prints nothing" test fits better
with the existing tests in search-output, so move it there. Also add a
similar test for the --format=json case.
These tests also use the new test_expect_equal_file function, (to ensure
that the presence of a trailing newline is correctly tested).
Jameson Graef Rollins [Fri, 6 May 2011 19:03:04 +0000 (12:03 -0700)]
Fix missing final newline in notmuch search output
A previous commit to fix json formatting for null results
(
0b1ddc5f6652bde99d63d9d553777b3d926694cf) accidentally introduced a
regression that removed trailing newlines for non-json output. (There
wasn't a good test for this previously, but there is now). The
problem is due to the fundamental differences in formatting between
the json and non-json outputs. The only way to fix this was to add a
new formatting field that represents the string to output at the end
of a null result.
All output formatting tests should pass now, (in particular, the 4
recent test failures introduced to show this bug).
Jameson Graef Rollins [Fri, 6 May 2011 18:52:10 +0000 (11:52 -0700)]
test: modify search-output test to use the new test_expect_equal_file function
These test now properly test for the presence of a newline at the end
of all output. Right now some of these test will fail because the
search output is currently broken to *not* produce proper newlines in
some cases.
Jameson Graef Rollins [Thu, 5 May 2011 16:38:38 +0000 (09:38 -0700)]
add note about updating the debian symbols file to the RELEASE file
Carl Worth [Wed, 1 Jun 2011 20:02:58 +0000 (13:02 -0700)]
configure: Fix detection of libdir in ldconfig configuration
Ever since commit
b4b5e9ce4dac62111ec11da6d22b7e618056801f the
detection of libdir in the ldconfig configuration has been broken,
resulting in RPATH being set when not needed and not wanted.
The cause was a change from an IFS setting of:
IFS="$(printf '\n\t')"
to a new setting of:
IFS="$(printf '\n')"
That looks desirable since we want to split the output of ldconfig
based on newlines, (and not split on any filename that might have an
embedded tab in it). The subtle bug in the above is that the shell
trims any trailing newlines when performing command substitution so
the final statement above was equivalent to:
IFS=''
which prevented any splitting of the ldconfig output at all.
Fix this by avoiding command substitution and just using a literal
newline in the source file for setting this variable.
Felipe Contreras [Sun, 6 Feb 2011 12:10:53 +0000 (14:10 +0200)]
vim: add delete commands
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>