]> git.notmuchmail.org Git - notmuch/log
notmuch
11 years agoNEWS: Insert markdown formatting commands
Tomi Ollila [Thu, 26 Apr 2012 19:52:31 +0000 (22:52 +0300)]
NEWS: Insert markdown formatting commands

To make updating the notmuchmail.org wiki 'news' section more
straightforward the content of the NEWS file has now been brought
to almost the same as the *.mdwn files in the wiki page.

The changes are basically insertion of mdwn formatting "commands".

More effort has been put into formatting the newer release entries
(0.12, 0.11 & 0.10) than older. Commit to format 0.13 entries will
be made available separately.

11 years agoNEWS: spacing changes
Tomi Ollila [Thu, 26 Apr 2012 19:52:30 +0000 (22:52 +0300)]
NEWS: spacing changes

With these whitespace changes the spacing looks generally
the same throughout the whole file.

11 years agoNEWS: untabified and added file local variables block
Tomi Ollila [Thu, 26 Apr 2012 19:52:29 +0000 (22:52 +0300)]
NEWS: untabified and added file local variables block

Changed all tabs to 8 spaces (M-x untabify over region of the
whole file).

Now this looks uniformly on all viewers (using fixed-width font)
and the observed difference between this "source" file and markdown
generated html output on browser window is smaller. In markdown to
html conversions tab and 8 spaces indents differently.

Also the "Local variables:" block added to the end of this file
attempts to ensure tabs are always expanded; whether the used editor
is Emacs or Vi.

11 years agogo: Update to the current notmuch_database_find_message API
Austin Clements [Sat, 28 Apr 2012 21:45:18 +0000 (17:45 -0400)]
go: Update to the current notmuch_database_find_message API

The signature of notmuch_database_find_message was changed in 02a30767
to report errors and the Go bindings were never updated.  This brings
the Go bindings in sync with that change and at least makes them
compile with Go r60.3, the last release before Go 1.

11 years agopython: remove a note stating wrong things about the memory management
Justus Winter [Mon, 30 Apr 2012 17:51:16 +0000 (19:51 +0200)]
python: remove a note stating wrong things about the memory management

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: document the Database.close function
Justus Winter [Mon, 30 Apr 2012 17:48:45 +0000 (19:48 +0200)]
python: document the Database.close function

Put a prominent warning into the docstring of Database.close, make the
function show up in the sphinx doc and refer to the warning in the
paragraph mentioning the context manager protocol.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: deprecate code formatting messages as text and json
Justus Winter [Mon, 30 Apr 2012 16:48:29 +0000 (18:48 +0200)]
python: deprecate code formatting messages as text and json

This code adds functionality at the python level that is unlikely to
be useful for anyone. Furthermore the python bindings strive to be a
thin wrapper around libnotmuch, so this code will be removed in
notmuch 0.14.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: cleanup the __nonzero__ implementations
Justus Winter [Mon, 30 Apr 2012 17:12:36 +0000 (19:12 +0200)]
python: cleanup the __nonzero__ implementations

Cleanup the code, reword the docstring and use the same implementation
in the Threads, Tags and Messages classes.

__nonzero__ implements truth value testing. If __nonzero__ is not
implemented, the python runtime would fall back to `len(..) > 0` thus
exhausting the iterator.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: fix NULL pointer tests
Justus Winter [Mon, 30 Apr 2012 16:52:35 +0000 (18:52 +0200)]
python: fix NULL pointer tests

Fix the NULL pointer tests in the destructors of all classes and
Database.create.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: update the docstrings of Filenames.{__len__,__unicode}
Justus Winter [Mon, 30 Apr 2012 16:43:02 +0000 (18:43 +0200)]
python: update the docstrings of Filenames.{__len__,__unicode}

Formerly the documentation was overly verbose. Reword the comment and
use the same for both functions.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: update the docstring of class Filenames
Justus Winter [Mon, 30 Apr 2012 16:39:06 +0000 (18:39 +0200)]
python: update the docstring of class Filenames

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: fix the documentation
Justus Winter [Mon, 30 Apr 2012 16:32:32 +0000 (18:32 +0200)]
python: fix the documentation

Remove the reference to Filenames.as_generator in the sphinx
documentation.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: fix Message.get_filenames
Justus Winter [Mon, 30 Apr 2012 16:27:15 +0000 (18:27 +0200)]
python: fix Message.get_filenames

Do not to use the removed function Filenames.as_iterator.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: remove the deprecated function Filenames.as_generator
Justus Winter [Mon, 30 Apr 2012 16:13:31 +0000 (18:13 +0200)]
python: remove the deprecated function Filenames.as_generator

Remove the function Filenames.as_generator that has been marked as
deprecated in 0.12.

The class Filenames implements the iterator protocol so you can
directly iterate over such objects instead.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agoemacs: eliminate search-tag-thread in favor of just search-tag
Jameson Graef Rollins [Sat, 14 Apr 2012 18:52:54 +0000 (11:52 -0700)]
emacs: eliminate search-tag-thread in favor of just search-tag

notmuch-search-tag-thread is now completely redundant with
notmuch-search-tag so we eliminate it to simplify the interface.

11 years agoemacs: modify show tag functions to use new notmuch-tag interface
Jameson Graef Rollins [Sat, 14 Apr 2012 18:52:53 +0000 (11:52 -0700)]
emacs: modify show tag functions to use new notmuch-tag interface

The main change here is to modify argument parsing so as to not force
tag-changes to be a list, and to let notmuch-tag handle prompting the
user when required.  doc strings are also updated and cleaned up.

11 years agoemacs: modify search tag functions to use new notmuch-tag interface
Jameson Graef Rollins [Sat, 14 Apr 2012 18:52:52 +0000 (11:52 -0700)]
emacs: modify search tag functions to use new notmuch-tag interface

The main change here is to modify argument parsing so as to not force
tag-changes to be a list, and to let notmuch-tag handle prompting the
user when required.  doc strings are also updated and cleaned up.

11 years agoemacs: allow notmuch-tag to accept string inputs and prompt for tags
Jameson Graef Rollins [Sat, 14 Apr 2012 20:49:07 +0000 (13:49 -0700)]
emacs: allow notmuch-tag to accept string inputs and prompt for tags

notmuch-tag is extended to accept various formats of the tag changes.
In particular, user prompting for tag changes is now incorporated
here, so it is common for modes.

The tag binary and the notmuch-{before,after}-tag-hooks are only
called if tag changes is non-nil.

In all cases tag-changes is returned as a list.

11 years agoemacs: create notmuch-tag.el, and move appropriate functions from notmuch.el
Jameson Graef Rollins [Sat, 14 Apr 2012 18:52:50 +0000 (11:52 -0700)]
emacs: create notmuch-tag.el, and move appropriate functions from notmuch.el

Tagging functions are used in notmuch.el, notmuch-show.el, and
notmuch-message.el.  There are enough common functions for tagging
that it makes sense to put them all in their own library.

No code is modified, just moved around.

11 years agoemacs: fix archive thread/message function documentation.
Jameson Graef Rollins [Tue, 17 Jan 2012 18:43:16 +0000 (10:43 -0800)]
emacs: fix archive thread/message function documentation.

This removes an inaccuracy in the thread archiving function, and adds
a clarification to the message archiving function.

11 years agoemacs: Don't move to the next thread unless the cursor is at the end of the buffer.
David Edmondson [Tue, 31 Jan 2012 08:01:54 +0000 (08:01 +0000)]
emacs: Don't move to the next thread unless the cursor is at the end of the buffer.

When using the spacebar to scroll through a thread, hitting 'space'
when the bottom of the last message is visible should take the cursor
to the end of the buffer rather than immediately archiving the thread
and moving to the next thread.

11 years agoemacs-show: open excluded matches if no other matches
Mark Walters [Thu, 15 Mar 2012 18:28:10 +0000 (18:28 +0000)]
emacs-show: open excluded matches if no other matches

Currently emacs show does not open matching but excluded
messages. This is normally the desired behaviour but is probably not
ideal if only excluded messages match. This patch opens all the
matching (necessarily excluded) messages in this case and goes to the
first one.

11 years agoNEWS: add news item for 'config list'
Peter Wang [Sun, 29 Apr 2012 01:26:10 +0000 (11:26 +1000)]
NEWS: add news item for 'config list'

11 years agopython: strip superfluous single quote from copyright notices
Justus Winter [Sun, 29 Apr 2012 14:33:06 +0000 (16:33 +0200)]
python: strip superfluous single quote from copyright notices

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: add copyright and licensing information to setup.py
Justus Winter [Sun, 29 Apr 2012 14:30:38 +0000 (16:30 +0200)]
python: add copyright and licensing information to setup.py

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: stylistic and pep8 fixes in setup.py
Justus Winter [Sun, 29 Apr 2012 14:28:50 +0000 (16:28 +0200)]
python: stylistic and pep8 fixes in setup.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: update the long description in setup.py
Justus Winter [Sun, 29 Apr 2012 14:26:36 +0000 (16:26 +0200)]
python: update the long description in setup.py

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: fix the test asserting that reading the version succeeded
Justus Winter [Sun, 29 Apr 2012 14:21:32 +0000 (16:21 +0200)]
python: fix the test asserting that reading the version succeeded

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: simplify a path expression in setup.py
Justus Winter [Sun, 29 Apr 2012 14:18:52 +0000 (16:18 +0200)]
python: simplify a path expression in setup.py

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agopython: Remove unused import from setup.py
Justus Winter [Sun, 29 Apr 2012 14:15:41 +0000 (16:15 +0200)]
python: Remove unused import from setup.py

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agoemacs: do not modify subject in search or show
Jameson Graef Rollins [Sun, 15 Apr 2012 02:17:52 +0000 (19:17 -0700)]
emacs: do not modify subject in search or show

A previous patch [0] replaced blank subject lines with '[No Subject]'
in search and show mode.  Apparently this was needed to circumvent
some bug in the printing code, but there was no need for it search or
show, and it is definitely not desirable, so we undo it here (a revert
is no longer feasible).  We should not be modifying strings in the
original message without good reason, or without a clear indication
that we are doing so, neither of which apply in this case.  For
further discussion see [0].

[0] id:"1327918561-16245-3-git-send-email-dme@dme.org"

11 years agoman: Document 'config list' command
Peter Wang [Sat, 14 Apr 2012 01:41:06 +0000 (11:41 +1000)]
man: Document 'config list' command

Document the 'config list' command and its output.

11 years agoconfig: Add 'config list' command
Peter Wang [Sat, 14 Apr 2012 01:41:05 +0000 (11:41 +1000)]
config: Add 'config list' command

Add a command to list all configuration items with their associated
values.

One use is as follows: a MUA may prefer to store data in a central
notmuch configuration file so that the data is accessible across
different machines, e.g. an addressbook.  The list command helps
to implement features such as tab completion on the keys.

11 years agotest: Add broken test for 'config list'
Peter Wang [Sat, 14 Apr 2012 01:41:04 +0000 (11:41 +1000)]
test: Add broken test for 'config list'

Proposed functionality.

11 years agotest: Add tests for 'config' command
Peter Wang [Sat, 14 Apr 2012 01:41:03 +0000 (11:41 +1000)]
test: Add tests for 'config' command

Start a new test script.

11 years agoconfig: Check 'config get' arity exactly
Peter Wang [Sat, 14 Apr 2012 01:41:02 +0000 (11:41 +1000)]
config: Check 'config get' arity exactly

Require that 'config get' is passed exactly one additional argument,
instead of silently ignoring extra arguments. As a side-effect, produce
more specific error messages for the 'config' command as a whole.

11 years agopython: wrap and use notmuch_database_destroy as destructor
Justus Winter [Sun, 22 Apr 2012 12:07:57 +0000 (14:07 +0200)]
python: wrap and use notmuch_database_destroy as destructor

Adapt the python bindings to the notmuch_database_close split.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agoruby: Use notmuch_database_destroy instead of notmuch_database_close
Justus Winter [Sun, 22 Apr 2012 12:07:56 +0000 (14:07 +0200)]
ruby: Use notmuch_database_destroy instead of notmuch_database_close

Adapt the ruby bindings to the notmuch_database_close split.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agogo: Use notmuch_database_destroy instead of notmuch_database_close
Justus Winter [Sun, 22 Apr 2012 12:07:55 +0000 (14:07 +0200)]
go: Use notmuch_database_destroy instead of notmuch_database_close

Adapt the go bindings to the notmuch_database_close split.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agoUse notmuch_database_destroy instead of notmuch_database_close
Justus Winter [Sun, 22 Apr 2012 12:07:54 +0000 (14:07 +0200)]
Use notmuch_database_destroy instead of notmuch_database_close

Adapt notmuch-deliver to the notmuch_database_close split.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agoUse notmuch_database_destroy instead of notmuch_database_close
Justus Winter [Sun, 22 Apr 2012 12:07:53 +0000 (14:07 +0200)]
Use notmuch_database_destroy instead of notmuch_database_close

Adapt the notmuch binaries source to the notmuch_database_close split.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agoNEWS: Document the notmuch_database_close split
Justus Winter [Sun, 22 Apr 2012 12:07:52 +0000 (14:07 +0200)]
NEWS: Document the notmuch_database_close split

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agoSplit notmuch_database_close into two functions
Justus Winter [Wed, 25 Apr 2012 13:20:16 +0000 (15:20 +0200)]
Split notmuch_database_close into two functions

Formerly notmuch_database_close closed the xapian database and
destroyed the talloc structure associated with the notmuch database
object. Split notmuch_database_close into notmuch_database_close and
notmuch_database_destroy.

This makes it possible for long running programs to close the xapian
database and thus release the lock associated with it without
destroying the data structures obtained from it.

This also makes the api more consistent since every other data
structure has a destructor function.

The comments in notmuch.h are a courtesy of Austin Clements.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
11 years agoemacs: Put notmuch-hello-sections in custom group notmuch-hello
Austin Clements [Mon, 16 Apr 2012 02:57:36 +0000 (22:57 -0400)]
emacs: Put notmuch-hello-sections in custom group notmuch-hello

11 years agonew: Fix missing end_atomic in remove_filename on error
Austin Clements [Sun, 22 Apr 2012 15:50:52 +0000 (11:50 -0400)]
new: Fix missing end_atomic in remove_filename on error

Previously, if we failed to find the message by filename in
remove_filename, we would return immediately from the function without
ending its atomic block.  Now this code follows the usual goto DONE
idiom to perform cleanup.

11 years agonew: Print final fatal error message to stderr
Austin Clements [Sun, 22 Apr 2012 15:50:51 +0000 (11:50 -0400)]
new: Print final fatal error message to stderr

This was going to stdout.  I removed the newline at the beginning of
printing the fatal error message because it wouldn't make sense if you
were only looking at the stderr stream (e.g., you had redirected
stdout to /dev/null).

11 years agonew: Handle fatal errors in remove_filename and _remove_directory
Austin Clements [Sun, 22 Apr 2012 15:50:50 +0000 (11:50 -0400)]
new: Handle fatal errors in remove_filename and _remove_directory

Previously such errors were simply ignored.  Now they cause an
immediate cleanup and abort.

11 years agonew: Consistently treat fatal errors as fatal
Austin Clements [Sun, 22 Apr 2012 15:50:49 +0000 (11:50 -0400)]
new: Consistently treat fatal errors as fatal

Previously, fatal errors in add_files_recursive were not treated as
fatal by its callers (including itself!).  This makes
add_files_recursive errors consistently fatal and updates all callers
to treat them as fatal.

11 years agoemacs: Put notmuch-print-mechanism in custom group notmuch-show
Austin Clements [Mon, 16 Apr 2012 02:57:45 +0000 (22:57 -0400)]
emacs: Put notmuch-print-mechanism in custom group notmuch-show

11 years agoconfig: Fix free in 'config get' implementation.
Peter Wang [Sat, 14 Apr 2012 01:41:01 +0000 (11:41 +1000)]
config: Fix free in 'config get' implementation.

The array returned by g_key_file_get_string_list() should be freed with
g_strfreev(), not free().

11 years agoemacs: modify help message for notmuch-search-line-faces to reflect preferred "delete...
Jameson Graef Rollins [Tue, 17 Jan 2012 19:02:47 +0000 (11:02 -0800)]
emacs: modify help message for notmuch-search-line-faces to reflect preferred "deleted" tag name.

No functional change here.  The help message previously referred to
the "delete" tag, but "deleted" is now preferred, so hopefully this
will reduce any potential confusion.

11 years agovim: simplify build
Felipe Contreras [Wed, 22 Feb 2012 16:57:56 +0000 (18:57 +0200)]
vim: simplify build

There should be no functional changes, except that you don't need to
make the directories before installing.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
11 years agovim: fix regex after "notmuch show" output change
Jakob [Thu, 29 Mar 2012 22:02:53 +0000 (15:02 -0700)]
vim: fix regex after "notmuch show" output change

The new field "excluded" was added to the output and made this regex fail.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
12 years agolib: work around talloc_steal usage from C++ code
Jani Nikula [Thu, 12 Apr 2012 20:57:39 +0000 (23:57 +0300)]
lib: work around talloc_steal usage from C++ code

Implicit typecast from 'void *' to 'T *' is okay in C, but not in
C++. In talloc_steal, an explicit cast is provided for type safety in
some GCC versions. Otherwise, a cast is required. Provide a template
function for this to maintain type safety, and redefine talloc_steal
to use it.

The template must be outside the extern "C" block (NOTMUCH_BEGIN_DECLS
and NOTMUCH_END_DECLS), but keep it within the GCC visibility #pragma.

No functional changes, apart from making the library build with
compilers other than recent GCC.

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agoRecord dependencies during build instead of before
Austin Clements [Wed, 11 Apr 2012 20:38:39 +0000 (16:38 -0400)]
Record dependencies during build instead of before

Previously, the makefile created dependency files in a separate, first
pass.  In particular, include-ing the dependency files would cause
make to attempt to rebuild those files using the dependency-generation
rules in the makefile.  Unfortunately, this approach required obtuse
rules and silently delayed the start of the build process (by quite a
bit on a clean tree without any dependency files).  Worse, this
required the dependency files to themselves depend on all of the
headers the source file depended on, which meant that, if a header
file was removed, the depedency file could not be updated because of a
missing dependency (!), which would cause make to silently fail.

This patch eliminates the dependency generation rules and instead
generates dependency files as a side-effect of the regular build rule.
On the first build, we don't need to know the dependencies beforehand;
the object file doesn't exist, so it will be built anyway.  On
subsequent builds, if a header file is updated, the dependency rules
generated by the previous build will force a rebuild.  If a source
file is updated, the dependency rules may be stale, but it doesn't
matter because the updated source file will force a rebuild.

In the final case above, the stale dependency rules may refer to a
header file that no longer exists but is also no longer needed.  In
order to prevent this from breaking the build, we also pass gcc the
-MP option, which generates phony targets for every depended-on header
file, so make won't complain if it can't find them during a later
build.

12 years agoshow: Remove empty message_set_{start,sep,end} fields
Austin Clements [Sun, 8 Apr 2012 00:57:50 +0000 (20:57 -0400)]
show: Remove empty message_set_{start,sep,end} fields

Setting these to NULL is equivalent to the empty string now.

12 years agoshow: Support NULL values for message_set_{start, sep, end}
Austin Clements [Sun, 8 Apr 2012 00:57:49 +0000 (20:57 -0400)]
show: Support NULL values for message_set_{start, sep, end}

Many formats don't need these, so it's more convenient if they don't
have to set them at all.

12 years agoshow: Remove unused fields from notmuch_show_format
Austin Clements [Sun, 8 Apr 2012 00:57:48 +0000 (20:57 -0400)]
show: Remove unused fields from notmuch_show_format

These fields were only used by old-style formatters.

12 years agoRemove show-message.c
Austin Clements [Sun, 8 Apr 2012 00:57:47 +0000 (20:57 -0400)]
Remove show-message.c

There are no more calls to show_message_body.

12 years agoshow: Remove support for old-style formatters in show_message
Austin Clements [Sun, 8 Apr 2012 00:57:46 +0000 (20:57 -0400)]
show: Remove support for old-style formatters in show_message

show_message used to have a compatibility path for old-style
formatters.  This removes that.

12 years agoSync schemata with current code structure
Austin Clements [Sun, 8 Apr 2012 00:57:45 +0000 (20:57 -0400)]
Sync schemata with current code structure

The schema itself hasn't changed, but many of the references to
functions in notmuch-show.c were out of date.

12 years agoemacs: have tag-completion return all tags for nil input
Jameson Graef Rollins [Mon, 9 Apr 2012 18:36:18 +0000 (11:36 -0700)]
emacs: have tag-completion return all tags for nil input

Previously the function would fail if the initial input was nil.  Now
it will return a list of all tags, which obviously makes much more
sense.

12 years agoNews for raw format changes
Austin Clements [Sun, 8 Apr 2012 01:09:56 +0000 (21:09 -0400)]
News for raw format changes

12 years agodebian: add gnupg-agent to notmuch recommends
Jameson Graef Rollins [Wed, 11 Apr 2012 17:23:51 +0000 (10:23 -0700)]
debian: add gnupg-agent to notmuch recommends

gnupg-agent is required for message decryption, so this should help
stem some issues encountered by users trying to decrypt messages.

12 years agoemacs: include tags from excluded messages in tag tab completion
Jameson Graef Rollins [Mon, 9 Apr 2012 18:36:17 +0000 (11:36 -0700)]
emacs: include tags from excluded messages in tag tab completion

The new message exclude functionality will hide tags that only exist
on excluded messages.  However, one might very well want to manually
modify excluded tags.  This makes sure tags from excluded messages are
always available in tab completion.

12 years agoemacs: update call in tag-completion function
Jameson Graef Rollins [Mon, 9 Apr 2012 18:36:16 +0000 (11:36 -0700)]
emacs: update call in tag-completion function

"search-tags" is deprecated, so use the more modern and supported
"search --output=tags".

12 years agoemacs: get rid of trailing spaces in notmuch-hello view
Dmitry Kurochkin [Sat, 10 Mar 2012 03:54:15 +0000 (07:54 +0400)]
emacs: get rid of trailing spaces in notmuch-hello view

This patch removes trailing spaces in notmuch-hello view.

A side effect of this change is that tag/query buttons no longer
include a space at the end.  This means that pressing RET when the
point is at the first character after the tag/query button no longer
works (note that this is the standard behavior for buttons).  We may
change this behavior in the future (without adding trailing spaces
back) if people would find this change inconvenient.

12 years agoemacs: make show set --exclude=false
Mark Walters [Sat, 7 Apr 2012 16:10:08 +0000 (17:10 +0100)]
emacs: make show set --exclude=false

Show has to set --exclude=false to deal with cases where it is asked
to show a single excluded message. It uses JSON so it can easily pass
the exclude information to the user.

12 years agotest: add some exclude tests
Mark Walters [Sat, 7 Apr 2012 16:10:07 +0000 (17:10 +0100)]
test: add some exclude tests

Systematically test the exclude options for search. Also move the
search existing exclude tests into the new test. There is some overlap
between the two sets of tests but many of the existing ones are there
because they triggered bugs in the past so I have kept them to ensure
coverage.

12 years agocli: move show to the new --exclude= option naming scheme.
Mark Walters [Sat, 7 Apr 2012 16:10:06 +0000 (17:10 +0100)]
cli: move show to the new --exclude= option naming scheme.

This moves notmuch show to the --exclude=(true|false) naming
scheme. When exclude=false show returns all threads that match
including those that only match in an excluded message. The excluded
messages are flagged.

When exclude=true the behaviour depends on whether --entire-thread is
set. If it is not set then show only returns the messages which match
and are not excluded. If it is set then show returns all messages in
the threads that match in a non-excluded message, flagging the excluded
messages in these threads. The rationale is that it is awkward to use
a thread with some missing messages.

12 years agocli: move search to the new --exclude= naming scheme.
Mark Walters [Sat, 7 Apr 2012 16:10:05 +0000 (17:10 +0100)]
cli: move search to the new --exclude= naming scheme.

This commit replaces the --no-exclude option with a
--exclude=(true|false|flag) option. The default is to omit the
excluded messages.

The flag option only makes sense if output=summary (as otherwise there
is nowhere to print the flag). In summary output exclude=false and
exclude=flag give almost identical output:
they differ in that with the exclude=flag option the match count
(i.e., the x in [x/n] in the output) is the number of matching
non-excluded messages rather than the number of matching messages.

Note this changes the default for output=summary when no --exclude=
option is given: it used to default to flag and now defaults to true
(i.e. omit excluded messages). This is neccesary to keep the cli
output uncluttered and for speed reasons.

12 years agocli: move count to the new --exclude=(true|false|flag) naming scheme.
Mark Walters [Sat, 7 Apr 2012 16:10:04 +0000 (17:10 +0100)]
cli: move count to the new --exclude=(true|false|flag) naming scheme.

Move the option --no-exclude to the --exclude= scheme. Since there is
no way to flag messages only true and false are implemented. Note
that, for consistency with other commands, this is implemented as a
keyword option rather than a boolean option.

12 years agolib: change default for notmuch_query_set_omit_excluded
Mark Walters [Sat, 7 Apr 2012 16:10:03 +0000 (17:10 +0100)]
lib: change default for notmuch_query_set_omit_excluded

12 years agoemacs: do not modify the alist passed to notmuch-sort-saved-searches
Jani Nikula [Sun, 1 Apr 2012 14:51:23 +0000 (17:51 +0300)]
emacs: do not modify the alist passed to notmuch-sort-saved-searches

Sort modifies its input as a side effect. Pass it a copy in
notmuch-sort-saved-searches to not modify the notmuch-saved-searches
alist.

12 years agoconfigure: change gmime version in help message to 2.6
David Bremner [Thu, 5 Apr 2012 11:01:32 +0000 (08:01 -0300)]
configure: change gmime version in help message to 2.6

Since GMime 2.6 is now the stable version upstream, and probably the
most tested by notmuch developers, it makes sense to suggest that to
users to install.

12 years agoconfigure: print info about required gmime 2.4 or 2.6 versions
Tomi Ollila [Wed, 21 Mar 2012 19:18:50 +0000 (21:18 +0200)]
configure: print info about required gmime 2.4 or 2.6 versions

In case required gmime (2.4 or 2.6) version if not found print information
about both alternatives (and currently minimal 2.6 version that is needed).

12 years agoconfigure: add empty line after each missing component message
Tomi Ollila [Tue, 20 Mar 2012 22:16:50 +0000 (00:16 +0200)]
configure: add empty line after each missing component message

Currently whenever message about missing GMime, Glib or talloc is
printed the message is 2 lines, component info and its http location
in next line. In the future the amount of lines will vary. To ease
reading in these cases newline is added after each message.

12 years agoemacs: fix off-by-one error in notmuch-hello column alignment
Dmitry Kurochkin [Fri, 9 Mar 2012 07:34:53 +0000 (11:34 +0400)]
emacs: fix off-by-one error in notmuch-hello column alignment

Expected results for few tests are fixed, the relevant test is
unmarked broken.

12 years agotest: add broken test for long names in Emacs notmuch-hello view
Dmitry Kurochkin [Fri, 9 Mar 2012 07:34:52 +0000 (11:34 +0400)]
test: add broken test for long names in Emacs notmuch-hello view

Currently, the column alignment in Emacs notmuch-hello is broken for
tags/queries with long names.

12 years agoemacs: Fix the References header in reply
Adam Wolfe Gordon [Sun, 1 Apr 2012 15:24:23 +0000 (09:24 -0600)]
emacs: Fix the References header in reply

In the new reply code, the References header gets inserted by
message.el using a function called message-shorten-references. Unlike
all the other header-inserting functions, it doesn't put a newline
after the header, causing the next header to end up on the same
line. In our case, this header happened to be User-Agent, so it's hard
to notice. This is probably a bug in message.el, but we need to work
around it.

This fixes the problem by wrapping message-shorten-references in a
function that inserts a newline after if necessary. This should
protect against the message.el bug being fixed in the future.

12 years agotest: Show all headers in emacs reply tests
Adam Wolfe Gordon [Sun, 1 Apr 2012 15:24:22 +0000 (09:24 -0600)]
test: Show all headers in emacs reply tests

By default, emacs hides the User-Agent and References headers when
composing mail. This is a good thing for users, but a bad thing for
testing, since we can create ugly or invalid headers and not have it
show up in the tests.

By setting message-hidden-headers to an empty list, we force emacs to
show all the headers, so we can check that they're correct. Users
won't see this, but it will let us catch future bugs.

As a side-effect, this breaks all the reply tests, since there is a
bug with the References and User-Agent headers, fixed in the next commit.

12 years agoemacs: Fix two bugs in reply
Adam Wolfe Gordon [Sun, 1 Apr 2012 15:24:21 +0000 (09:24 -0600)]
emacs: Fix two bugs in reply

Bug 1: Replying from alternate addresses
----------------------------------------

The reply code was inconsistent in its use of symbols and strings for
header names being passed to message.el functions. This caused the
From header to be lookup up incorrectly, causing an additional From
header to be added with the user's primary address instead of the
correct alternate address.

This is fixed by using symbols everywhere, i.e. never using strings
for header names when interacting with message.el.

This change also removes our use of `mail-header`, since we don't use
it anywhere else, and using assq makes it clear how the header lists
are expected to work.

Bug 2: Duplicate headers in emacs 23.2
--------------------------------------

The message.el code in emacs 23.2 assumes that header names will
always be passed as symbols, so our use of strings caused
problems. The symptom was that on 23.2 (and presumably on earlier
versions) the reply message would end up with two of some headers.

Converting everything to symbols also fixes this issue.

12 years agotest: Tests for reply from alternate addresses in emacs
Adam Wolfe Gordon [Sun, 1 Apr 2012 15:24:20 +0000 (09:24 -0600)]
test: Tests for reply from alternate addresses in emacs

Since the recent reply changes were pushed, there has been a bug that
causes emacs to always reply from the primary address, even if the
JSON or default CLI reply output uses an alternate address.

This adds two tests to the emacs test library based on the two "Reply
form..." tests in the reply test library. One is currently marked
broken.

12 years agonotmuch-mutt: fix typo in manpage
Stefano Zacchiroli [Sat, 31 Mar 2012 08:35:25 +0000 (10:35 +0200)]
notmuch-mutt: fix typo in manpage

12 years agoNEWS: document inclusion of contrib/notmuch-mutt
Stefano Zacchiroli [Sat, 31 Mar 2012 08:33:24 +0000 (10:33 +0200)]
NEWS: document inclusion of contrib/notmuch-mutt

12 years agoemacs: Fix mis-named argument to notmuch-get-bodypart-internal
Austin Clements [Tue, 27 Mar 2012 01:40:26 +0000 (21:40 -0400)]
emacs: Fix mis-named argument to notmuch-get-bodypart-internal

Previously, this function took an argument called "message-id", even
though it was a general query, rather than a message ID.  This changes
it to "query".

12 years agoreply: Move reply citation printing to the recursive MIME walk
Austin Clements [Tue, 27 Mar 2012 21:59:52 +0000 (17:59 -0400)]
reply: Move reply citation printing to the recursive MIME walk

This makes more logical sense, since it makes the recursive printer
responsible for the entire reply body and lets it start at the root of
the MIME tree instead of the first child.  (We could move reply header
creation in there, too, but if we ever support proper reply to
multiple messages, we'll want just one set of reply headers computed
from the entire message set and many bodies.)

12 years agoreply: Convert default reply format to self-recursive style
Austin Clements [Tue, 27 Mar 2012 21:59:51 +0000 (17:59 -0400)]
reply: Convert default reply format to self-recursive style

This re-arranges the default reply formatter code to use the
mime_node_t abstraction.  There are no semantic changes.

12 years agoshow/reply: Unify the code that extracts text parts
Austin Clements [Tue, 27 Mar 2012 21:59:50 +0000 (17:59 -0400)]
show/reply: Unify the code that extracts text parts

Previously, show and reply had separate implementations of decoding
and printing text parts.  Now both use show's implementation, which
was more complete.  Show's implementation has been extended with an
option to add reply quoting to the extracted part (this is implemented
as a named flag to avoid naked booleans, even though it's the only
flag it can take).

12 years agoemacs: Escape all message ID queries
Austin Clements [Tue, 27 Mar 2012 01:37:16 +0000 (21:37 -0400)]
emacs: Escape all message ID queries

This adds a lib function to turn a message ID into a properly escaped
message ID query and uses this function wherever we previously
hand-constructed ID queries.  Wherever this new function is used,
documentation has been clarified to refer to "id: queries" instead of
"message IDs".

This fixes the broken test introduced by the previous patch.

12 years agotest: Add Emacs test for messages with quotes in their message ID
Austin Clements [Tue, 27 Mar 2012 01:37:15 +0000 (21:37 -0400)]
test: Add Emacs test for messages with quotes in their message ID

Currently this is broken because Emacs doesn't properly escape double
quotes in message IDs.

12 years agocli: refactor "notmuch restore" message tagging into a separate function
Jani Nikula [Mon, 26 Mar 2012 21:04:11 +0000 (00:04 +0300)]
cli: refactor "notmuch restore" message tagging into a separate function

Refactor to make tagging code easier to reuse in the future. No
functional changes.

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agocli: refactor "notmuch tag" query tagging into a separate function
Jani Nikula [Mon, 26 Mar 2012 21:04:10 +0000 (00:04 +0300)]
cli: refactor "notmuch tag" query tagging into a separate function

Refactor to make tagging code easier to reuse in the future. No
functional changes.

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agocli: refactor "notmuch tag" data structures for tagging operations
Jani Nikula [Mon, 26 Mar 2012 21:04:09 +0000 (00:04 +0300)]
cli: refactor "notmuch tag" data structures for tagging operations

To simplify code, keep all tagging operations in a single array
instead of separate add and remove arrays. Apply tag changes in the
order specified on the command line, instead of first removing and
then adding the tags.

This results in a minor functional change: If a tag is both added and
removed, the last specified operation is now used. Previously the tag
was always added. Change the relevant test to reflect the new
behaviour.

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agotest: add test for both adding and removing a tag at the same time
Jani Nikula [Mon, 26 Mar 2012 21:04:08 +0000 (00:04 +0300)]
test: add test for both adding and removing a tag at the same time

The current behaviour is that regardless of the order in which the
addition and removal of a tag are specified, the tag is added.

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agoemacs: content-type comparison should be case insensitive.
Mark Walters [Sun, 25 Mar 2012 00:43:28 +0000 (00:43 +0000)]
emacs: content-type comparison should be case insensitive.

The function notmuch-match-content-type was comparing content types
case sensitively. Fix it so it tests case insensitively.

This fixes a bug where emacs would not include any body when replying
to a message with content-type TEXT/PLAIN.

12 years agodebian packaging: new binary package notmuch-mutt
Stefano Zacchiroli [Mon, 26 Mar 2012 08:51:44 +0000 (10:51 +0200)]
debian packaging: new binary package notmuch-mutt

12 years agocontrib: new mutt-notmuch utility for Mutt integration
Stefano Zacchiroli [Mon, 26 Mar 2012 08:45:58 +0000 (10:45 +0200)]
contrib: new mutt-notmuch utility for Mutt integration

12 years agoNEWS: consistent 2-space indentation in new content
Tomi Ollila [Wed, 21 Mar 2012 19:32:29 +0000 (21:32 +0200)]
NEWS: consistent 2-space indentation in new content

Some 0.12 NEWS items descriptions were indented with 3 spaces whereas
all other lines are indented with 2 spaces. Brought those
escaped lines back in line with others.

12 years agoMerge tag 'debian/0.12-1'
David Bremner [Tue, 20 Mar 2012 22:07:36 +0000 (19:07 -0300)]
Merge tag 'debian/0.12-1'

notmuch Debian 0.12-1 upload (same as 0.12 + debian changelog fix)