]> git.notmuchmail.org Git - notmuch/log
notmuch
10 years agodebian: package ruby bindings
Felipe Contreras [Tue, 16 Apr 2013 19:08:39 +0000 (14:08 -0500)]
debian: package ruby bindings

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoruby: use in-tree notmuch library
Felipe Contreras [Mon, 20 May 2013 12:24:23 +0000 (07:24 -0500)]
ruby: use in-tree notmuch library

Currently it simply finds any library available, and if notmuch is
installed in the system, it would give priority to that library.

Let's implement our own helper functions to link directly to the local
library, and give priority to the local header file.

Also, add an option to properly check if there are missing symbols.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoemacs: Compute build dependencies to fix byte compile issues
Austin Clements [Fri, 17 May 2013 20:13:31 +0000 (16:13 -0400)]
emacs: Compute build dependencies to fix byte compile issues

Previously, we simply byte compiled each Elisp source file
independently.  This is actually the wrong thing to do and can lead to
issues with macros and performance issues with substitutions because
1) when the byte compiler encounters a (require 'x) form, it will load
x.elc in preference to x.el, even if x.el is newer, and as a result
may load old macro and substitution definitions and 2) if we update a
macro or substitution definition in one file, we currently won't
re-compile other files that depend on the file containing the
definition.

This patch addresses these problems by computing make dependency rules
from the (require 'x) forms in the Elisp source files, which we inject
into make's dependency database.

10 years agoruby: fix missing symbol UINT2FIX()
Felipe Contreras [Mon, 20 May 2013 12:24:24 +0000 (07:24 -0500)]
ruby: fix missing symbol UINT2FIX()

It has never existed in Ruby (maybe JRuby). Fortunately the symbols are
loaded lazily, so nobody would notice unless they try
'query::count_messages'.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agodevel: add dkg's printmimestructure script to notmuch devel scripts
David Bremner [Mon, 20 May 2013 15:59:19 +0000 (12:59 -0300)]
devel: add dkg's printmimestructure script to notmuch devel scripts

I find this script pretty useful when figuring out who to blame for
MIME rendering problems.

The notmuch repo will be the new primary home for this script, unless
and until a better home turns up.

10 years agocontrib: pick: add a target message for pick
Mark Walters [Thu, 10 Jan 2013 11:14:58 +0000 (11:14 +0000)]
contrib: pick: add a target message for pick

This adds a target message for pick which it will jump to when (if) it
appears. It adds the target to notmuch-pick-from-show-current-query so
that pick goes straight to the message that was current in the show
view and it adds target to notmuch-pick-refresh-view so that the
current message is preserved.

10 years agocontrib: pick: move save-excursion closer to message insertion
Mark Walters [Thu, 10 Jan 2013 10:41:16 +0000 (10:41 +0000)]
contrib: pick: move save-excursion closer to message insertion

Pick keeps point roughly at the top of the buffer while inserting
messages at the end as they come in (from the async
parser). Previously the save-excursion to do this was done once for
each thread inserted: now it is done for each individual message.

The advantage is that the message insertion code can decide where to
leave point. In the next patch point will be left on the target message.

Note notmuch-pick-insert-msg is unchanged as that is used by the tag
display update code.

10 years agoemacs: show: handle inline patch fake parts at top level
Mark Walters [Sat, 4 May 2013 13:01:15 +0000 (14:01 +0100)]
emacs: show: handle inline patch fake parts at top level

The inline patch fake part handler also modifies the content-type so
handle this in notmuch-show-insert-bodypart too.

10 years agoemacs:show: separate out handling of application/octet-stream
Mark Walters [Sat, 4 May 2013 13:01:14 +0000 (14:01 +0100)]
emacs:show: separate out handling of application/octet-stream

Currently mime parts are basically handled based on their mime-type
with the exception of application/octet-stream parts. Deal with these
parts at the top level (notmuch-show-insert-bodypart).

This is needed later in the series as we need to put in a part button
for each part (which means knowing its mime type) while deferring the
actual insertion of the part.

10 years agoemacs: Proper error string handling in search sentinel
Austin Clements [Fri, 17 May 2013 20:14:28 +0000 (16:14 -0400)]
emacs: Proper error string handling in search sentinel

Apparently Emacs provides a function to stringify errors properly.
Use this in the search sentinel where we have to do our own error
messaging, rather than assuming the first error argument will be the
descriptive string.

10 years agoemacs: tag: fix compile warning
Mark Walters [Tue, 14 May 2013 08:13:53 +0000 (09:13 +0100)]
emacs: tag: fix compile warning

When compiling notmuch-tag.el there is a compile warning:
notmuch-tag.el:27:1:Warning: cl package required at runtime

Since we have decided to allow runtime use of cl we suppress this
warning by adding a tail comment to the file.

10 years agoperf-test: add notmuch-memory-test
David Bremner [Wed, 15 May 2013 10:53:27 +0000 (07:53 -0300)]
perf-test: add notmuch-memory-test

Somehow this file was not added to the patch set which split the tests
into time and memory tests. Take advantage of the the "new" way of
running tests to avoid listing the explicitly.

10 years agoperf-test: run all appropriately named time tests
David Bremner [Wed, 15 May 2013 10:48:30 +0000 (07:48 -0300)]
perf-test: run all appropriately named time tests

This avoids hassle with manually adding every test to the master list.

10 years agoperf-test: rename time tests to have .sh suffix
David Bremner [Wed, 15 May 2013 10:40:08 +0000 (07:40 -0300)]
perf-test: rename time tests to have .sh suffix

This will simplify notmuch time tests

10 years agoperf-test: rename memory tests
David Bremner [Wed, 15 May 2013 10:38:09 +0000 (07:38 -0300)]
perf-test: rename memory tests

The common suffix will help running them all automatically.

10 years agoman: document search --exclude=all
Peter Wang [Sat, 11 May 2013 19:50:07 +0000 (20:50 +0100)]
man: document search --exclude=all

Document the new search --exclude=all option.

10 years agotest: add tests for search --exclude=all
Peter Wang [Sat, 11 May 2013 19:50:04 +0000 (20:50 +0100)]
test: add tests for search --exclude=all

Test the new search --exclude=all option.

10 years agocli: add --exclude=all option to notmuch-search.c
Mark Walters [Sat, 11 May 2013 19:50:03 +0000 (20:50 +0100)]
cli: add --exclude=all option to notmuch-search.c

Add a --exclude=all option to notmuch search.

10 years agolib: add --exclude=all option
Mark Walters [Sat, 11 May 2013 19:50:02 +0000 (20:50 +0100)]
lib: add --exclude=all option

Adds a exclude all option to the lib which means that excluded
messages are completely ignored (as if they had actually been
deleted).

10 years agolib/database.cc: change how the parent of a message is calculated
Aaron Ecay [Wed, 6 Mar 2013 03:31:49 +0000 (22:31 -0500)]
lib/database.cc: change how the parent of a message is calculated

Presently, the code which finds the parent of a message as it is being
added to the database assumes that the first Message-ID-like substring
of the In-Reply-To header is the parent Message ID.  Some mail clients,
however, put stuff other than the Message-ID of the parent in the
In-Reply-To header, such as the email address of the sender of the
parent.  This can fool notmuch.

The updated algorithm prefers the last Message ID in the References
header.  The References header lists messages oldest-first, so the last
Message ID is the parent (RFC2822, p. 24).  The References header is
also less likely to be in a non-standard
syntax (http://cr.yp.to/immhf/thread.html,
http://www.jwz.org/doc/threading.html).  In case the References header
is not to be found, fall back to the old behavior.

V2 of this patch, incorporating feedback from Jani and (indirectly)
Austin.

10 years agotest: add tests for the handling of References and In-Reply-To headers
Aaron Ecay [Wed, 6 Mar 2013 03:31:48 +0000 (22:31 -0500)]
test: add tests for the handling of References and In-Reply-To headers

These tests are known_broken, the following commit fixes them.

amended per

id:87txmi1zq3.fsf@nikula.org
id:87vc6yalo7.fsf@zancas.localnet

10 years agoemacs: removed code attempting to support emaces prior to version 23
Tomi Ollila [Sun, 31 Mar 2013 20:04:02 +0000 (23:04 +0300)]
emacs: removed code attempting to support emaces prior to version 23

The support for emacs version 22 has not worked at least since
September 2011 when I attempted to use it. I expanded the support in
id:yf6ippgtbn0.fsf@taco2.nixu.fi but that was not enough and then I
found it easier to switch to emacs 23.
In case one wants to resurrect emacs 22 (or earlier!) support, pick
the changes from the patch email referenced above.

10 years agoemacs/notmuch-address.el: add notmuch-address-selection-function
Tomi Ollila [Wed, 3 Apr 2013 15:08:54 +0000 (18:08 +0300)]
emacs/notmuch-address.el: add notmuch-address-selection-function

Added a customizable variable notmuch-address-selection-function
and the function with the same name to provide a way for user to
change the function called to do address selection.

By default the functionality is exactly the same as it has been so
far; completing-read is called with the same parameters as before.

Setting equivalent lambda expression in place of using
notmuch-address-selection-function function is done as follows:

(setq notmuch-address-selection-function
   (lambda (prompt collection initial-input)
     (completing-read prompt collection nil nil initial-input)))

For example drop-in replacement with ido-completing-read can be done
easily as an one alternative to the default.

10 years agocli: config: fix config file save when the file does not exist
Jani Nikula [Sun, 5 May 2013 19:18:20 +0000 (22:18 +0300)]
cli: config: fix config file save when the file does not exist

The use of realpath(3) in
commit 58ed67992d0ec1fa505026105218fa449f7980b0
Author: Jani Nikula <jani@nikula.org>
Date:   Sun Apr 7 20:15:03 2013 +0300

    cli: config: do not overwrite symlinks when saving config file

broke config file save when the file does not exist, which results in
'notmuch setup' always failing to create a new config file.

Fix by checking ENOENT from realpath(3).

10 years agotest: add basic test for notmuch setup
Jani Nikula [Sun, 5 May 2013 19:18:19 +0000 (22:18 +0300)]
test: add basic test for notmuch setup

And annotate with test_subtest_known_broken. Hooray.

10 years agoman: clarify search --exclude=flag
Peter Wang [Sat, 11 May 2013 19:50:06 +0000 (20:50 +0100)]
man: clarify search --exclude=flag

Improve the description of the search --exclude=flag option,
using text taken from the commit that introduced the option.

10 years agoman: clarify search --exclude documentation
Peter Wang [Sat, 11 May 2013 19:50:05 +0000 (20:50 +0100)]
man: clarify search --exclude documentation

Highlight "excluded messages" as a term with a meaning that
may not be obvious.

Be explicit about the effects of search --exclude=true and
--exclude=false.

10 years agoemacs: add kernel.org mail archive redirector
Jani Nikula [Thu, 2 May 2013 13:15:07 +0000 (15:15 +0200)]
emacs: add kernel.org mail archive redirector

See http://lkml.kernel.org/

10 years agopython: Add bindings for notmuch_thread_get_messages
Austin Clements [Sun, 25 Nov 2012 04:57:06 +0000 (23:57 -0500)]
python: Add bindings for notmuch_thread_get_messages

10 years agogo: use a different goconfig package
Justus Winter [Tue, 23 Apr 2013 15:13:07 +0000 (17:13 +0200)]
go: use a different goconfig package

The notmuch-addrlookup utility uses a third party library to read the
notmuch configuration file. The previously used implementation at
"github.com/kless/goconfig" vanished, so this patch switches to the
implementation at "github.com/msbranco/goconfig". As the
implementations differ at the API level, the code is updated
accordingly.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
10 years agolib/message.cc: stale pointer bug (v3)
Vladimir Marek [Thu, 2 May 2013 14:31:42 +0000 (16:31 +0200)]
lib/message.cc: stale pointer bug (v3)

Xapian::TermIterator::operator* returns std::string which is destroyed
as soon as (*i).c_str() finishes. The remembered pointer 'term' then
references invalid memory.

Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
10 years agoemacs: fixed (declare-function ...) definitions
Tomi Ollila [Wed, 10 Apr 2013 21:42:55 +0000 (00:42 +0300)]
emacs: fixed (declare-function ...) definitions

Some (declare-function ...) definitions were drifted away from the
actual (defun ...)'s. To find the drifts and to verify changes
the following command line was used:

$ emacs --batch -L emacs --eval '(check-declare-directory "emacs")'

10 years agoman: document NOTMUCH_DEBUG_QUERY
David Bremner [Mon, 15 Apr 2013 14:26:36 +0000 (11:26 -0300)]
man: document NOTMUCH_DEBUG_QUERY

This is is really functionality of the library, but CLI users might
not look at library docs even if they existed beyond notmuch.h

11 years agocli: mime node: fix compiler warning when building against gmime 2.4
Jani Nikula [Sat, 6 Apr 2013 11:47:43 +0000 (14:47 +0300)]
cli: mime node: fix compiler warning when building against gmime 2.4

commit d487ef9e58bcd193118f19f771d5ef3984616be5
Author: Jani Nikula <jani@nikula.org>
Date:   Sat Mar 30 15:53:16 2013 +0200

    cli: mime node: abstract decryption and signature verification

introduced a compiler warning, reported by Mark Walters, when building
against gmime 2.4:

mime-node.c:224:9: warning: assignment discards ‘const’ qualifier from
pointer target type [enabled by default]

Pass the non-const signature validity to the destructor to fix this.

11 years agoTODO: remove some completed todo items from the list
Jani Nikula [Sun, 7 Apr 2013 17:15:04 +0000 (20:15 +0300)]
TODO: remove some completed todo items from the list

Bash completion has been rewritten. Configuration file saves follow
symlinks. There is --config=FILE top level option to specify
configuration file.

11 years agocli: config: do not overwrite symlinks when saving config file
Jani Nikula [Sun, 7 Apr 2013 17:15:03 +0000 (20:15 +0300)]
cli: config: do not overwrite symlinks when saving config file

Use realpath to canonicalize the config path before writing.

Previously 'notmuch setup' and 'notmuch config set' overwrote the
config file even if it was a symbolic link.

11 years agotest: add some config file tests
Jani Nikula [Sun, 7 Apr 2013 17:15:02 +0000 (20:15 +0300)]
test: add some config file tests

Test the --config=FILE option, and add a broken test for writing
config file through a symbolic link.

11 years agoRevert "emacs: functions to import sender or recipient into BBDB"
David Bremner [Sat, 6 Apr 2013 19:10:28 +0000 (16:10 -0300)]
Revert "emacs: functions to import sender or recipient into BBDB"

This reverts commit 238bf4cb09423cac4efa968e70184daad39e2846.

This commit was causing a build failure.

Bad me for not checking before pushing.

11 years agoemacs: functions to import sender or recipient into BBDB
Daniel Bergey [Sun, 31 Mar 2013 18:20:15 +0000 (14:20 -0400)]
emacs: functions to import sender or recipient into BBDB

From a show buffer, notmuch-bbdb/snarf-from imports the sender into
bbdb.  notmuch-bbdb/snarf-to imports all recipients.  Newly imported
contacts are reported in the minibuffer / Messages buffer.

Both functions use the BBDB parser to recognize email address formats.

11 years agonmbug-status: only import notmuch when needed
Jani Nikula [Mon, 1 Apr 2013 09:44:02 +0000 (12:44 +0300)]
nmbug-status: only import notmuch when needed

Make it possible to use the script to query search views without
notmuch python bindings installed.

11 years agonmbug-status: add support for querying the search views
Jani Nikula [Mon, 1 Apr 2013 09:44:01 +0000 (12:44 +0300)]
nmbug-status: add support for querying the search views

Make it easy for scripts to read the views and corresponding searches.

11 years agocli: conform to same conditional build style as elsewhere in notmuch-show
Jani Nikula [Sat, 30 Mar 2013 13:53:17 +0000 (15:53 +0200)]
cli: conform to same conditional build style as elsewhere in notmuch-show

Conform to the same style for #ifdef GMIME_ATLEAST_26 conditional
builds as elsewhere.

There are no functional changes.

11 years agocli: mime node: abstract decryption and signature verification
Jani Nikula [Sat, 30 Mar 2013 13:53:16 +0000 (15:53 +0200)]
cli: mime node: abstract decryption and signature verification

The code filled with #ifdef GMIME_ATLEAST_26 is difficult to
read. Abstract the decryption and signature verification into
functions, with separate implementations for GMime 2.4 and 2.6, to
clarify the code.

There should be no functional changes.

11 years agocli: crypto: abstract gpg context creation for clarity
Jani Nikula [Sat, 30 Mar 2013 13:53:15 +0000 (15:53 +0200)]
cli: crypto: abstract gpg context creation for clarity

The code filled with #ifdef GMIME_ATLEAST_26 is difficult to
read. Abstract gpg context creation into a function, with separate
implementations for GMime 2.4 and 2.6, to clarify the code.

There should be no functional changes.

11 years agoemacs: hello: use batch count
Mark Walters [Sun, 31 Mar 2013 09:46:03 +0000 (12:46 +0300)]
emacs: hello: use batch count

This modifies notmuch hello to use the new count --batch
functionality. It should give exactly the same results as before but
under many conditions it should be much faster. In particular it is
much faster for remote use.

The code is a little ugly as it has to do some working out of the
query when asking the query and some when dealing with the result.
However, the code path is exactly the same in both local and remote
use.

11 years agotest: notmuch count --batch and --input options
Jani Nikula [Sun, 31 Mar 2013 09:46:02 +0000 (12:46 +0300)]
test: notmuch count --batch and --input options

11 years agoman: document notmuch count --batch and --input options
Jani Nikula [Sun, 31 Mar 2013 09:46:01 +0000 (12:46 +0300)]
man: document notmuch count --batch and --input options

11 years agocli: add --batch option to notmuch count
Jani Nikula [Sun, 31 Mar 2013 09:46:00 +0000 (12:46 +0300)]
cli: add --batch option to notmuch count

Add support for reading queries from stdin, one per line, and writing
results to stdout, one per line.

This will bring considerable performance improvements when utilized in
Emacs notmuch-hello, especially so when running remote notmuch.

11 years agocli: extract count printing to a separate function in notmuch count
Jani Nikula [Sun, 31 Mar 2013 09:45:59 +0000 (12:45 +0300)]
cli: extract count printing to a separate function in notmuch count

Make count printing on a query string reusable. No functional changes.

11 years agocli: remove useless talloc_strdup
Jani Nikula [Sun, 31 Mar 2013 09:45:58 +0000 (12:45 +0300)]
cli: remove useless talloc_strdup

If the condition holds, query_string_from_args() has already returned
a talloc allocated empty string. There's no need to duplicate that.

11 years agoemacs: introduce notmuch-command-to-string, replace use of shell-command-to-string
David Bremner [Fri, 8 Mar 2013 13:04:38 +0000 (09:04 -0400)]
emacs: introduce notmuch-command-to-string, replace use of shell-command-to-string

This has two benefits: unified error handling, and avoiding tramp's
hooking into shell-command-string.

This seems to be a fix for id:874nguxbvq.fsf@tu-dortmund.de

11 years agotest: notmuch tag --remove-all
Jani Nikula [Sat, 9 Mar 2013 14:56:51 +0000 (16:56 +0200)]
test: notmuch tag --remove-all

11 years agoman: document notmuch tag --remove-all
Jani Nikula [Sat, 9 Mar 2013 14:56:50 +0000 (16:56 +0200)]
man: document notmuch tag --remove-all

11 years agocli: add --remove-all option to "notmuch tag"
Jani Nikula [Sat, 9 Mar 2013 14:56:49 +0000 (16:56 +0200)]
cli: add --remove-all option to "notmuch tag"

Add --remove-all option to "notmuch tag" to remove all tags from the
messages matching query before applying the tag changes. This allows
removal of all tags and unconditional setting of the tags of a
message:

$ notmuch tag --remove-all id:foo@example.com
$ notmuch tag --remove-all +foo +bar id:foo@example.com

without having to resort to the complicated (and still quoting
broken):

$ notmuch tag $(notmuch search --output=tags '*' | sed 's/^/-/') \
  id:foo@example.com
$ notmuch tag $(notmuch search --output=tags '*' | sed 's/^/-/') \
  +foo +bar id:foo@example.com

11 years agocli: make caller check tag count in parse_tag_command_line
Jani Nikula [Sat, 9 Mar 2013 14:56:48 +0000 (16:56 +0200)]
cli: make caller check tag count in parse_tag_command_line

11 years agocompletion: update README about bash completion dependencies
Jani Nikula [Fri, 29 Mar 2013 20:38:11 +0000 (22:38 +0200)]
completion: update README about bash completion dependencies

11 years agoNEWS: bash completion
Jani Nikula [Fri, 29 Mar 2013 20:38:10 +0000 (22:38 +0200)]
NEWS: bash completion

11 years agocli: config: remove unnecessary braces from if blocks
Jani Nikula [Sat, 30 Mar 2013 14:21:20 +0000 (16:21 +0200)]
cli: config: remove unnecessary braces from if blocks

Cosmetic change to drop unnecessary braces that don't even conform to
the prevailing coding style.

11 years agolib: Fix name reordering to handle commas without spaces
Adam Wolfe Gordon [Mon, 25 Feb 2013 22:47:13 +0000 (15:47 -0700)]
lib: Fix name reordering to handle commas without spaces

Notmuch automatically re-orders names of the format "Last, First" to
"First Last" when the associated email address is
First.Last@example.com. But, if a name is of the format "Last,First"
then notmuch will format the name as "irst Last". Handle any number of
spaces after the comma, including none.

11 years agodevel: add post-release tools news2wiki.pl and man-to-mdwn.pl
Tomi Ollila [Fri, 8 Mar 2013 16:32:23 +0000 (18:32 +0200)]
devel: add post-release tools news2wiki.pl and man-to-mdwn.pl

After new notmuch release has been published the NEWS and manual
pages have been updated using these 2 programs.

Adding the tools to notmuch repository eases their use, adds more
transparency to the "process" and gives more people chance to
do the updates is one is unavailable to do it at the time being.

11 years agodevel/STYLE: information how to enable standard pre-commit hook
Tomi Ollila [Sat, 23 Mar 2013 12:07:15 +0000 (14:07 +0200)]
devel/STYLE: information how to enable standard pre-commit hook

It is easier to enable git standard pre-commit hook, when the
operation to do so is presented.

11 years agocompletion: complete bash completion rewrite
Jani Nikula [Sun, 3 Mar 2013 20:59:28 +0000 (22:59 +0200)]
completion: complete bash completion rewrite

Rewrite the bash completion script to actually do something
useful. Supported completions:

* All the notmuch commands, command line arguments, and values for
  keyword arguments.

* Tags after + and - in 'notmuch tag'.

* Config options in 'notmuch config', and some config option values.

* Search prefixes in all commands that use search terms.

* Tags after tag: prefix in search terms.

* User's email addresses after from: and to: in search terms.

This is all based on the bash-completion package [1], and will not
work without it.

[1] http://bash-completion.alioth.debian.org/

11 years agoemacs: possibility to customize the rendering of tags
Damien Cassou [Sat, 23 Mar 2013 11:29:54 +0000 (12:29 +0100)]
emacs: possibility to customize the rendering of tags

This patch extracts the rendering of tags in notmuch-show to
the notmuch-tag file.

This file introduces a `notmuch-tag-formats' variable that associates
each tag to a particular format. This variable can be customized
thanks to the work of Austin Clements. For example,

  '(("unread" (propertize tag 'face '(:foreground "red")))
    ("flagged" (notmuch-tag-format-image tag "star.svg")))

associates a red foreground to the "unread" tag and a star picture to
the "flagged" tag.

Signed-off-by: Damien Cassou <damien.cassou@gmail.com>
11 years agoemacs: Add notmuch-combine-face-text-property-string
Damien Cassou [Sat, 23 Mar 2013 11:29:53 +0000 (12:29 +0100)]
emacs: Add notmuch-combine-face-text-property-string

Signed-off-by: Damien Cassou <damien.cassou@gmail.com>
11 years agoemacs: Combine string faces and combine under existing faces
Austin Clements [Mon, 4 Feb 2013 21:37:02 +0000 (16:37 -0500)]
emacs: Combine string faces and combine under existing faces

This improves notmuch-combine-face-text-property to support both
applying faces to strings and to support combining the given face
under existing faces, rather than over.

11 years agoemacs: Handle all face forms when combining faces
Austin Clements [Mon, 4 Feb 2013 21:37:01 +0000 (16:37 -0500)]
emacs: Handle all face forms when combining faces

Previously, notmuch-combine-face-text-property assumed that any
existing face properties of the modified text were already in face
list form.  This was true as long as it was the only function
manipulating faces (since it always produced a list form face), but if
anything else has manipulated the face, it was more likely to be
either a face name or a face plist.  It also didn't correctly handle
face lists as arguments, even though the doc string claimed it did.

This patch fixes notmuch-combine-face-text-property to handle all face
forms correctly by canonicalizing both the argument face and the
existing faces into list form.  This also means we can set the face to
a simpler non-list form if there's no existing face.

11 years agoBug#703608: [PATCH] debian: tighten notmuch-mutt dependency on notmuch
Jameson Graef Rollins [Thu, 21 Mar 2013 13:51:34 +0000 (06:51 -0700)]
Bug#703608: [PATCH] debian: tighten notmuch-mutt dependency on notmuch

notmuch version 0.4 is required for the --output=files option.

11 years agoman: document the notmuch --config=FILE global option
Jani Nikula [Mon, 4 Mar 2013 19:53:15 +0000 (21:53 +0200)]
man: document the notmuch --config=FILE global option

11 years agocli: add top level --config=FILE option
Jani Nikula [Sun, 3 Mar 2013 21:55:10 +0000 (23:55 +0200)]
cli: add top level --config=FILE option

Let the user specify the config file on the command line.

11 years agocli: move config open/close to main() from subcommands
Jani Nikula [Sun, 3 Mar 2013 21:55:09 +0000 (23:55 +0200)]
cli: move config open/close to main() from subcommands

This allows specifying config file as a top level argument to notmuch,
and generally makes it possible to override config file options in
main(), without having to touch the subcommands.

If the config file does not exist, one will be created for the notmuch
main command and setup and help subcommands. Help is special in this
regard; the config is created just to avoid errors about missing
config, but it will not be saved.

This also makes notmuch config the talloc context for subcommands.

11 years agocli: config: make notmuch_config_open() "is new" parameter input only
Jani Nikula [Sun, 3 Mar 2013 21:55:08 +0000 (23:55 +0200)]
cli: config: make notmuch_config_open() "is new" parameter input only

We now have a notmuch_config_is_new() function to query whether a
config was created or not. Change the notmuch_config_open() is_new
parameter into boolean create_new to determine whether the function
should create a new config if one doesn't exist. This reduces the
complexity of the API.

11 years agocli: config: keep track of whether the config is newly created
Jani Nikula [Sun, 3 Mar 2013 21:55:07 +0000 (23:55 +0200)]
cli: config: keep track of whether the config is newly created

Keep track of whether the config is newly created, and add
notmuch_config_is_new() accessor function to query this.

This is to support anyone with a config handle to check this, instead
of just whoever called notmuch_config_open().

11 years agocli: plug main notmuch command into subcommand machinery
Jani Nikula [Sun, 3 Mar 2013 21:55:06 +0000 (23:55 +0200)]
cli: plug main notmuch command into subcommand machinery

This allows top level arguments to be added to notmuch in a way that
doesn't require special handling for the plain notmuch command without
a subcommand.

11 years agocli: abstract subcommand finding into a new function
Jani Nikula [Sun, 3 Mar 2013 21:55:05 +0000 (23:55 +0200)]
cli: abstract subcommand finding into a new function

Clean up code.

11 years agotest/README: mention the test_expect_equal_json and *sanitize* functions
Aaron Ecay [Wed, 6 Mar 2013 03:34:42 +0000 (22:34 -0500)]
test/README: mention the test_expect_equal_json and *sanitize* functions

also fix one typo

11 years agonmbug: allow empty prefix
David Bremner [Wed, 20 Feb 2013 22:24:37 +0000 (18:24 -0400)]
nmbug: allow empty prefix

Current code does not distinguish between an empty string in the
NMBPREFIX environment variable and the variable being undefined. This
makes it impossible to define an empty prefix, if, e.g. somebody wants
to dump all of their tags with nmbug.

11 years agonmbug: replace hard-coded magic hash with git-hash-object
David Bremner [Wed, 20 Feb 2013 22:24:36 +0000 (18:24 -0400)]
nmbug: replace hard-coded magic hash with git-hash-object

This is at least easier to understand than the magic hash. It may also
be a bit more robust, although it is hard to imagine these numbers
changing without many other changes in git.

11 years agonmbug: use 'notmuch tag --batch'
David Bremner [Wed, 20 Feb 2013 22:24:35 +0000 (18:24 -0400)]
nmbug: use 'notmuch tag --batch'

This should be more robust with respect to tags with whitespace and
and other special characters. It also (hopefully) fixes a remaining
bug handling message-ids with whitespace.  It should also be
noticeably faster for large sets of changes since it does one exec per
change set as opposed to one exec per tag changed.

11 years agonmbug: use dump --format=batch-tag
David Bremner [Wed, 20 Feb 2013 22:24:34 +0000 (18:24 -0400)]
nmbug: use dump --format=batch-tag

This should make nmbug tolerate tags with whitespace and other special
characters it.  At the moment this relies on _not_ passing calls to
notmuch tag through the shell, which is a documented feature of perl's
system function.

11 years agoman: show and reply --decrypt option requires gpg-agent
Jani Nikula [Fri, 1 Mar 2013 16:43:26 +0000 (18:43 +0200)]
man: show and reply --decrypt option requires gpg-agent

11 years agocli: crypto: tell gmime to use gpg-agent
Jani Nikula [Wed, 27 Feb 2013 07:40:38 +0000 (09:40 +0200)]
cli: crypto: tell gmime to use gpg-agent

For decryption, we expect there to be a functioning gpg-agent, and we
want gpg to talk to it for any needed credentials. There's a gmime
function to declare that: g_mime_gpg_context_set_use_agent() [1], [2].
Start using it.

I had gpg-agent running, but gpg "use-agent" configuration option
disabled. This resulted in an error message from 'notmuch show':

  Failed to decrypt part: Canceled.

and json had this:

  "encstatus" : [ { "status" : "bad" } ]

One could argue the "use-agent" option should be enabled, but I'd like
to use the agent only as a last resort. I think that's irrelevant
though. There's a gmime function to declare what we expect, so we
should use it. Conveniently it also fixes the problem in a user
friendly way.

[1] http://git.gnome.org/browse/gmime/commit/?id=ed985397843a9da3745a8b5de3d1d652acd24724
[2] https://bugzilla.gnome.org/show_bug.cgi?id=651826

11 years agoNEWS: one typo fixed and 0.15.1 header line tidied up
Tomi Ollila [Tue, 19 Feb 2013 17:43:17 +0000 (19:43 +0200)]
NEWS: one typo fixed and 0.15.1 header line tidied up

11 years agoMerge branch 'release'
David Bremner [Tue, 19 Feb 2013 00:33:48 +0000 (20:33 -0400)]
Merge branch 'release'

add in NEWS from 0.15.2

Conflicts:
NEWS

11 years agodevel/release-checks.sh: added check that 1st NEWS header is tidy
Tomi Ollila [Wed, 30 Jan 2013 15:01:35 +0000 (17:01 +0200)]
devel/release-checks.sh: added check that 1st NEWS header is tidy

Check that the underlining '===...' for first (header) line in NEWS
file is of the same length as the header text and it is all '=':s.

-- extra execs removed by db.

11 years agoruby: Add bindings for notmuch_thread_get_messages
Austin Clements [Sun, 25 Nov 2012 04:57:07 +0000 (23:57 -0500)]
ruby: Add bindings for notmuch_thread_get_messages

11 years agolib: Add an iterator over all messages in a thread
Austin Clements [Sun, 25 Nov 2012 04:57:05 +0000 (23:57 -0500)]
lib: Add an iterator over all messages in a thread

Previously, getting the list of all messages in a thread required
recursively traversing the thread's message hierarchy, which was both
difficult and resulted in messages being out of order.  This adds a
public function to retrieve an iterator over all of the messages in a
thread in oldest-first order.

11 years agolib: Eliminate _notmuch_message_list_append
Austin Clements [Sun, 25 Nov 2012 04:57:04 +0000 (23:57 -0500)]
lib: Eliminate _notmuch_message_list_append

This API invited micro-optimized and complicated list pointer
manipulation and is no longer used.

11 years agolib: Separate list of all messages from top-level messages
Austin Clements [Sun, 25 Nov 2012 04:57:03 +0000 (23:57 -0500)]
lib: Separate list of all messages from top-level messages

Previously, thread.cc built up a list of all messages, then
proceeded to tear it apart to transform it into a list of
top-level messages.  Now we simply build a new list of top-level
messages.

This simplifies the interface to _notmuch_message_add_reply,
eliminates the pointer acrobatics from
_resolve_thread_relationships, and will enable us to do things
with the list of all messages in the following patches.

11 years agolib: Clean up error handling in _notmuch_thread_create
Austin Clements [Sun, 25 Nov 2012 04:57:02 +0000 (23:57 -0500)]
lib: Clean up error handling in _notmuch_thread_create

Previously, there were various opportunities for memory leaks in the
error-handling paths of this function.  Use a local talloc context and
some reparenting to make eliminate these leaks, while keeping the
control flow simple.

11 years agotest/test-lib.sh: separate signaled exit
Tomi Ollila [Mon, 21 Jan 2013 03:01:46 +0000 (05:01 +0200)]
test/test-lib.sh: separate signaled exit

When execution of tests is interrupted by signal coming outside of the
test system itself, output just one line "interrupted by signal <num>"
message to standard output. This distinguishes the case from internal
exit and reduces noise.

11 years agotest/test-lib.sh: use $test_subtest_name in all tests
Tomi Ollila [Mon, 21 Jan 2013 03:01:45 +0000 (05:01 +0200)]
test/test-lib.sh: use $test_subtest_name in all tests

Set the variable '$test_subtest_name' in all functions which starts
a new test and use that variable in all functions that output
test results.

Additionally output the latest '$test_subtest_name' in case of
abnormal exit, to avoid confusion.

11 years agoemacs: show: make buttons select window
Mark Walters [Mon, 7 Jan 2013 21:07:20 +0000 (21:07 +0000)]
emacs: show: make buttons select window

Emacs has two button type objects: widgets (as used for saved searches
in notmuch-hello) and buttons as used by parts/citations and id links
in notmuch-show. These two behave subtly differently when clicked with
the mouse: widgets select the window clicked before running the
action, buttons do not.

This patch makes all of these behave the same: clicking always selects
the clicked window. It does this by defining a notmuch-button-type
supertype that the other notmuch buttons can inherit from. This
supertype binds the mouse-action to select the window and then
activate the button.

11 years agobump versions to 0.15.2 0.15.2
David Bremner [Sun, 17 Feb 2013 13:40:52 +0000 (09:40 -0400)]
bump versions to 0.15.2

11 years agodebian: changelog stanza for 0.15.2-1
David Bremner [Tue, 29 Jan 2013 23:20:11 +0000 (19:20 -0400)]
debian: changelog stanza for 0.15.2-1

11 years agoNEWS: News for 0.15.2
David Bremner [Tue, 29 Jan 2013 23:16:12 +0000 (19:16 -0400)]
NEWS: News for 0.15.2

Another couple of build fixes.

11 years agonotmuch-mutt: improve robustness of mutt macros
Kevin J. McCarthy [Fri, 15 Feb 2013 00:12:47 +0000 (16:12 -0800)]
notmuch-mutt: improve robustness of mutt macros

Details:
- $pipe_decode is turned off, to prevent message-id from being
  filtered out by "ignore" settings in the muttrc.
- Original values for $pipe_decode and $wait_key are saved and restored.
- The macros, being much longer now, are line wrapped for improved
  readability.

11 years agonotmuch-mutt: Use of uninitialized value.
Stefano Zacchiroli [Thu, 14 Feb 2013 08:37:13 +0000 (09:37 +0100)]
notmuch-mutt: Use of uninitialized value.

On Thu, Feb 14, 2013 at 12:36:58AM +0100, Profpatsch wrote:
> On 13-02-13 02:35pm, Kevin J. McCarthy wrote:
> > A more likely idea is to check whether you have $pipe_decode set.
>
> BRILLIANT!
> So much for copying a basic rc from someone else.
> Of course, that was it and I’m officially an idiot.

Neat, thanks Kevin for debugging the issue down to $pipe_decode (which
I've never used, mutt never stops to amaze me :-)).

> And apparently Mail::Internet errors out if there is no Message-ID.
> (Which mentioned in the docs at CPAN…)
>
> Mystery solved.

Right, but still a more graceful failure model would be nice.

Please find attached a patch that in such cases should 1) give a
supposedly nice error message explaining what's going on and 2) empty
the results dir to avoid showing you unrelated results. It works for me.
But extra checking never hurts, in particular for the tag action, which
I don't personally use.

I guess it would also be nice to actually disable $pipe_decode in the
relevant Mutt macros, but I'm not sure about to do that without
interfering with user desired configuration. Kevin: do you know if there
is a common Mutt trick to store the value of a variable before changing
it, and restoring it a posteriori?  More isolation for this kind of
things in Mutt would definitely be welcome...

Cheers.
--
Stefano Zacchiroli  . . . . . . .  zack@upsilon.cc . . . . o . . . o . o
Maître de conférences . . . . . http://upsilon.cc/zack . . . o . . . o o
Debian Project Leader . . . . . . @zack on identi.ca . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »

From b67ab95855ce7d279d8c0b3ddcbc20e679afc70b Mon Sep 17 00:00:00 2001
From: Stefano Zacchiroli <zack@upsilon.cc>
Date: Thu, 14 Feb 2013 09:31:37 +0100
Subject: [PATCH] notmuch-mutt: more graceful handling of missing Message-Id
 errors

in particular:
- the "thread" action would print an error and empty results dir
- the "tag action would print an error

11 years agodebian: stop building a binary package for notmuch-vim
David Bremner [Sat, 16 Feb 2013 12:06:48 +0000 (08:06 -0400)]
debian: stop building a binary package for notmuch-vim

Since it is deprecated upstream, we don't want to encourage more
users to install it.

11 years agonotmuch-vim: deprecate, move to contrib
David Bremner [Sat, 16 Feb 2013 12:03:09 +0000 (08:03 -0400)]
notmuch-vim: deprecate, move to contrib

As discussed in id:871udhcmks.fsf@zancas.localnet, notmuch-vim doesn't
really meet the standards of the CLI, emacs interface, or python
bindings in terms of being well maintained.

11 years agonmbug: move from contrib to devel
David Bremner [Sat, 16 Feb 2013 11:54:33 +0000 (07:54 -0400)]
nmbug: move from contrib to devel

There seems to be consensus to use presence in contrib as
documentation of limited support by the notmuch developers; in fact
nmbug is pretty integrated into our current development process, so
devel seems more appropriate.