]> git.notmuchmail.org Git - notmuch/log
notmuch
9 years agoCLI: set up infrastructure to make path to gpg configurable.
David Bremner [Tue, 9 Dec 2014 20:01:10 +0000 (21:01 +0100)]
CLI: set up infrastructure to make path to gpg configurable.

GMIME takes a path to gpg, but we hardcode that path.  In this commit
we set up argument passing and option storage to allow this path to
specified in the top level notmuch command.

9 years agopython: replace hardcoding of SONAME version
David Bremner [Sat, 7 Mar 2015 07:31:14 +0000 (08:31 +0100)]
python: replace hardcoding of SONAME version

Failing to update this string in globals.py causes failures when the
SONAME changes.  In order to hopefully reduce the number of such
errors, automate the process of setting the SONAME in the python
bindings.

9 years agoman: fix notmuch-emacs-mua environment section
Jani Nikula [Sat, 7 Mar 2015 14:30:20 +0000 (16:30 +0200)]
man: fix notmuch-emacs-mua environment section

It's emacsclient command, not comment. Document default values. While
at it, format the environment section similarly to other man pages.

9 years agonotmuch-emacs-mua: remove -C to keep short options compatible with mutt
Jani Nikula [Sat, 7 Mar 2015 14:30:19 +0000 (16:30 +0200)]
notmuch-emacs-mua: remove -C to keep short options compatible with mutt

Notmuch uses long options exclusively all around. The short options in
notmuch-emacs-mua are intentionally just a compatible subset of
mutt(1). Keep it this way, if only to make documenting the fact easy!

The Notmuch style --client long option remains, of course.

9 years agogo: add binding for notmuch_message_get_date
Trevor Jim [Sat, 7 Mar 2015 20:23:51 +0000 (15:23 -0500)]
go: add binding for notmuch_message_get_date

9 years agolib: bump library minor version
David Bremner [Sat, 7 Mar 2015 14:49:00 +0000 (15:49 +0100)]
lib: bump library minor version

This should have happened in commit 326e18856, but it didn't.

9 years agoparse-time-string: fix setting and rounding of seconds
Jani Nikula [Mon, 2 Mar 2015 17:47:04 +0000 (19:47 +0200)]
parse-time-string: fix setting and rounding of seconds

If seconds are not specified in the string to be parsed, they're not
set according to the reference time (in the no rounding case) nor
rounded properly (in the rounding up cases). Fix this.

The bug caused searches such as date:10:30..10:30 to match messages
with date exactly 10:30:00 only, and not in range 10:30:00..10:30:59
(inclusive) as documented.

Note that date searches referring "noon" or "5pm" will still be
interpreted as exact to the second.

9 years agotest: extract and flag second rounding tests as broken
Jani Nikula [Mon, 2 Mar 2015 17:47:03 +0000 (19:47 +0200)]
test: extract and flag second rounding tests as broken

Extract and add some more tests relating to rounding seconds into a
separate subtest, and flag it as broken. If seconds are not specified,
the time is not set or rounded according to the interface defined in
parse-time-string/parse-time-string.h. Instead, seconds are always set
to 00 in reality, which is broken.

9 years agotest: add some more time tests
Jani Nikula [Mon, 2 Mar 2015 17:47:02 +0000 (19:47 +0200)]
test: add some more time tests

Ensure the seconds are set properly.

9 years agotest: improve the time parsing tests
Jani Nikula [Mon, 2 Mar 2015 17:47:01 +0000 (19:47 +0200)]
test: improve the time parsing tests

Set the reference time to 12:13:14 instead of 11:11:00 to ensure hours
and minutes are not mixed up, and seconds are really set instead of
defaulted to 00.

9 years agocompletion: update list of commands in zsh completion.
David Bremner [Sat, 10 Jan 2015 10:23:03 +0000 (11:23 +0100)]
completion: update list of commands in zsh completion.

This is actually generated by the script in

     id:1420289900-29717-2-git-send-email-david@tethera.net

We may as well update the list of commands while we decide if it's
worth automating the process. Note that there is a bit more noise than
expected because it alphabetizes all of the commands with their own
man pages.

9 years agocli: add a tool for starting new message in the emacs ui
Jani Nikula [Sun, 22 Feb 2015 20:34:44 +0000 (21:34 +0100)]
cli: add a tool for starting new message in the emacs ui

Add a tool to start composing an email in the Notmuch Emacs UI with
the specified subject, recipients, and message body.

9 years agolib: make notmuch shared library install_name be full path on Mac OS X
J. Lewis Muir [Wed, 4 Mar 2015 22:32:49 +0000 (16:32 -0600)]
lib: make notmuch shared library install_name be full path on Mac OS X

The install_name of libnotmuch.dylib on Mac OS X is what is written
into a program that links against it.  If it is just the name of the
shared library file, as opposed to the full path, the program won't be
able to find it when it runs and will abort.  Instead, the install_name
should be the full path to the shared library (in its final installed
location).

Why does Notmuch work without this patch when installed via Homebrew?
The answer is twofold.  One, /usr/local/lib is a special location in
which the dynamic linker will look by default to find shared libraries.
Homebrew highly recommends installing to /usr/local, and, assuming it
has been configured this way, the Notmuch library will end up installed
in /usr/local/lib, and the dynamic linker will find it.  Two, Homebrew
globally corrects all install names in dynamically shared libraries and
binaries for each package it installs.  So, even if the install names in
a package's binaries and libraries are incorrect, Homebrew corrects them
automatically, and no one ever knows.

Why does Notmuch work without this patch when installed via MacPorts?
The answer is that MacPorts applies a patch just like this patch to fix
the same problem.

9 years agolib: bump SONAME minor version
David Bremner [Sat, 28 Feb 2015 08:38:26 +0000 (09:38 +0100)]
lib: bump SONAME minor version

This indicates upwardly compatible changes, namely adding new symbols.

Although we don't formally need to do this until the next release,
there is no hard in doing it now, as long as we don't bump the minor
version for every addition between now and the release.

9 years agolib: add new status reporting API for notmuch_query_search_{m,t}
David Bremner [Tue, 20 Jan 2015 07:53:41 +0000 (08:53 +0100)]
lib: add new status reporting API for notmuch_query_search_{m,t}

This at least allows distinguishing between out of memory and Xapian
exceptions. Adding finer grained status codes would allow different
Xapian exceptions to be preserved.

Adding wrappers allows people to transition gradually to the new API,
at the cost of bloating the library API a bit.

9 years agocli: fix clang build warnings
Jani Nikula [Mon, 23 Feb 2015 16:56:16 +0000 (18:56 +0200)]
cli: fix clang build warnings

Fix the following warning produced by clang 3.5.0:

notmuch-search.c:730:25: warning: initializing 'void *' with an
expression of type 'const notmuch_opt_desc_t (*)[4]' discards
qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        { NOTMUCH_OPT_INHERIT, &common_options, NULL, 0, 0 },
                               ^~~~~~~~~~~~~~~
1 warning generated.

9 years agolib: fix clang build warnings
Jani Nikula [Mon, 23 Feb 2015 16:56:15 +0000 (18:56 +0200)]
lib: fix clang build warnings

Fix the following warning produced by clang 3.5.0:

lib/message.cc:899:4: warning: comparison of constant 64 with expression of type 'notmuch_message_flag_t' (aka '_notmuch_message_flag') is always true [-Wtautological-constant-out-of-range-compare]
        ! NOTMUCH_TEST_BIT (message->lazy_flags, flag))
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./lib/notmuch-private.h:70:6: note: expanded from macro 'NOTMUCH_TEST_BIT'
    (_NOTMUCH_VALID_BIT(bit) ? !!((val) & (1ull << (bit))) : 0)
     ^~~~~~~~~~~~~~~~~~~~~~~
./lib/notmuch-private.h:68:26: note: expanded from macro '_NOTMUCH_VALID_BIT'
    ((bit) >= 0 && (bit) < CHAR_BIT * sizeof (unsigned long long))
                   ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

9 years agolib: abstract bit validity check in bit test/set/clear macros
Jani Nikula [Mon, 23 Feb 2015 16:56:14 +0000 (18:56 +0200)]
lib: abstract bit validity check in bit test/set/clear macros

Reduce duplication in the bit test/set/clear macros. No functional
changes.

9 years agodoc: update list of prefixes
David Bremner [Mon, 23 Feb 2015 20:01:00 +0000 (21:01 +0100)]
doc: update list of prefixes

'attachement' missed a colon, and 'mimetype' was not added to this table
at all.

9 years agodoc: typo fix for prefix discussion.
David Bremner [Mon, 23 Feb 2015 19:55:03 +0000 (20:55 +0100)]
doc: typo fix for prefix discussion.

9 years agodoc: add more information on operators.
David Bremner [Sun, 18 Jan 2015 12:59:31 +0000 (13:59 +0100)]
doc: add more information on operators.

More material borrowed from the wiki page on "searching"

9 years agodoc: add material on stemming and wildcards
David Bremner [Sun, 18 Jan 2015 12:59:30 +0000 (13:59 +0100)]
doc: add material on stemming and wildcards

This is lightly massaged from the searching page on the wiki.

9 years agocompletion: complete notmuch dump --gzip option
Jani Nikula [Tue, 27 Jan 2015 19:48:17 +0000 (21:48 +0200)]
completion: complete notmuch dump --gzip option

9 years agodoc: document notmuch-restore --input=filename option
Jani Nikula [Tue, 27 Jan 2015 19:48:16 +0000 (21:48 +0200)]
doc: document notmuch-restore --input=filename option

Document all options for completeness.

9 years agodoc: document notmuch-dump --output=filename option
Jani Nikula [Tue, 27 Jan 2015 19:48:15 +0000 (21:48 +0200)]
doc: document notmuch-dump --output=filename option

Document all options for completeness.

9 years agodoc: bring notmuch-dump manual page in line with the rest
Jani Nikula [Tue, 27 Jan 2015 19:48:14 +0000 (21:48 +0200)]
doc: bring notmuch-dump manual page in line with the rest

Fix indentation of options. Move search terms description before
options. Fix synopsis.

9 years agodoc: remove reference to sender,recipients from notmuch-search.1
David Bremner [Thu, 19 Feb 2015 18:03:21 +0000 (19:03 +0100)]
doc: remove reference to sender,recipients from notmuch-search.1

Apparently these were missed when notmuch-address was split to it's
own subcommand.

9 years agoconfigure: consistent command -v usage
Tomi Ollila [Wed, 18 Feb 2015 14:54:01 +0000 (16:54 +0200)]
configure: consistent command -v usage

When the shell builtin `command -v` operates normally, it either
prints the path of the arg given to it and returns zero -- or it
returns nonzero and prints nothing.
In abnormal situations something might be printed to stderr and
in that case we want to know about it; therefore the used
command -v stderr redirections to /dev/null have been removed.

The `hash` (builtin) command in ksh returns zero even the arg
given to is is not found in path. For that and for consistency
the one appearance of it has been converted to `command -v`.

9 years agonotmuch-mutt: support for messages that lack Message-ID headers
Stefano Zacchiroli [Sun, 15 Feb 2015 12:39:08 +0000 (13:39 +0100)]
notmuch-mutt: support for messages that lack Message-ID headers

For those messages, compute a synthetic Message-ID based on the SHA1
of the whole message, in the same way that notmuch would do. See:
http://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/sha1.c

To do the above, rewrite get_message_id() to accumulate header lines,
parse them to check for Message-ID, and fallback to SHA1 computation
if it is not present.

Thanks to:
- Jan N. Klug for preliminary versions of this patch
- Tomi Ollila for suggesting an elegant implementation

9 years agonotmuch-mutt README: use metacpn.org/* as deps homepages
Stefano Zacchiroli [Sun, 15 Feb 2015 12:39:07 +0000 (13:39 +0100)]
notmuch-mutt README: use metacpn.org/* as deps homepages

9 years agonotmuch-mutt: bump copyright year
Stefano Zacchiroli [Sun, 15 Feb 2015 12:39:06 +0000 (13:39 +0100)]
notmuch-mutt: bump copyright year

9 years agoemacs: Add a defcustom that specifies regexp for blocked remote images.
Jinwoo Lee [Mon, 2 Feb 2015 21:04:52 +0000 (13:04 -0800)]
emacs: Add a defcustom that specifies regexp for blocked remote images.

It's default value is ".", meaning all remote images will be blocked
by default.

9 years agoemacs: Support cid: references with shr renderer
Austin Clements [Sat, 24 Jan 2015 21:17:03 +0000 (16:17 -0500)]
emacs: Support cid: references with shr renderer

shr has really nice support for inline image rendering, but previously
we only had the hooks for w3m cid: references.

9 years agoemacs: Rewrite content ID handling
Austin Clements [Sat, 24 Jan 2015 21:17:02 +0000 (16:17 -0500)]
emacs: Rewrite content ID handling

Besides generally cleaning up the code and separating the general
content ID handling from the w3m-specific code, this fixes several
problems.

Foremost is that, previously, the code roughly assumed that referenced
parts would be in the same multipart/related as the reference.
According to RFC 2392, nothing could be further from the truth:
content IDs are supposed to be globally unique and globally
addressable.  This is nonsense, but this patch at least fixes things
so content IDs can be anywhere in the same message.

As a side-effect of the above, this handles multipart/alternate
content-IDs more in line with RFC 2046 section 5.1.2 (not that I've
ever seen this in the wild).  This also properly URL-decodes cid:
URLs, as per RFC 2392 (the previous code did not), and applies crypto
settings from the show buffer (the previous code used the global
crypto settings).

9 years agoemacs: Use generalized content caching in w3m CID code
Austin Clements [Sat, 24 Jan 2015 21:17:01 +0000 (16:17 -0500)]
emacs: Use generalized content caching in w3m CID code

Previously this did its own caching, but this is now supported by more
generally by `notmuch-get-bodypart-binary'.

9 years agoemacs: Support caching in notmuch-get-bodypart-{binary,text}
Austin Clements [Sat, 24 Jan 2015 21:17:00 +0000 (16:17 -0500)]
emacs: Support caching in notmuch-get-bodypart-{binary,text}

(The actual code change here is small, but requires re-indenting
existing code.)

9 years agoemacs: Return unibyte strings for binary part data
Austin Clements [Sat, 24 Jan 2015 21:16:59 +0000 (16:16 -0500)]
emacs: Return unibyte strings for binary part data

Unibyte strings are meant for representing binary data.  In practice,
using unibyte versus multibyte strings affects *almost* nothing.  It
does happen to matter if we use the binary data in an image descriptor
(which is, helpfully, not documented anywhere and getting it wrong
results in opaque errors like "Not a PNG image: <giant binary spew
that is, in fact, a PNG image>").

9 years agoemacs: Remove broken `notmuch-get-bodypart-content' API
Austin Clements [Sat, 24 Jan 2015 21:16:58 +0000 (16:16 -0500)]
emacs: Remove broken `notmuch-get-bodypart-content' API

`notmuch-get-bodypart-content' could do two very different things,
depending on conditions: for text/* parts other than text/html, it
would return the part content as a multibyte Lisp string *after*
charset conversion, while for other parts (including text/html), it
would return binary part content without charset conversion.

This commit completes the split of `notmuch-get-bodypart-content' into
two different and explicit APIs: `notmuch-get-bodypart-binary' and
`notmuch-get-bodypart-text'.  It updates all callers to use one or the
other depending on what's appropriate.

9 years agoemacs: Create an API for fetching parts as undecoded binary
Austin Clements [Sat, 24 Jan 2015 21:16:57 +0000 (16:16 -0500)]
emacs: Create an API for fetching parts as undecoded binary

The new function, `notmuch-get-bodypart-binary', replaces
`notmuch-get-bodypart-internal'.  Whereas the old function was really
meant for internal use in `notmuch-get-bodypart-content', it was used
in a few other places.  Since the difference between
`notmuch-get-bodypart-content' and `notmuch-get-bodypart-internal' was
unclear, these other uses were always confusing and potentially
inconsistent.  The new call clearly requests the part as undecoded
binary.

This is step 1 of 2 in separating `notmuch-get-bodypart-content' into
two APIs for retrieving either undecoded binary or decoded text.

9 years agoemacs: Track full message and part descriptor in w3m CID store
Austin Clements [Sat, 24 Jan 2015 21:16:56 +0000 (16:16 -0500)]
emacs: Track full message and part descriptor in w3m CID store

This will simplify later changes.

9 years agodoc: add details about Xapian search syntax
David Bremner [Sun, 18 Jan 2015 12:59:29 +0000 (13:59 +0100)]
doc: add details about Xapian search syntax

Questions related to the way that probabilistic prefixes and phrases
are handled come up quite often and it is nicer to have the documentation self contained.  Hopefully putting it in subsections prevents it from being overwhelming.

9 years agodoc: gzipped notmuch.3 before trying to install notmuch.3.gz
David Bremner [Sun, 25 Jan 2015 14:04:51 +0000 (15:04 +0100)]
doc: gzipped notmuch.3 before trying to install notmuch.3.gz

If HAVE_SPHINX=0 but HAVE_DOXYGEN=1, then the previous version was
trying to install notmuch.3.gz but only got as far as creating
notmuch.3

9 years agoUpdate documentation
Todd [Thu, 22 Jan 2015 23:43:40 +0000 (17:43 -0600)]
Update documentation

Adds new entry to the NEWS file, and updates the search terms section
of the man page.  The search terms section needs to be updated again
once the new section in the documentation covering probablistic terms
has been committed.

9 years agoUpdate completions for Emacs and bash
Todd [Thu, 22 Jan 2015 23:43:39 +0000 (17:43 -0600)]
Update completions for Emacs and bash

This adds completions for both Emacs and bash. ZSH does not appear to
have completions for search terms.

9 years agoAdd indexing for the mimetype term
Todd [Thu, 22 Jan 2015 23:43:38 +0000 (17:43 -0600)]
Add indexing for the mimetype term

This adds the indexing support for the "mimetype:" term and removes
the broken test flag.  The indexing is probablistic in Xapian terms,
which gives a better experience to end users.  Standard content-types
of the form "foo/bar" are automatically interpreted as phrases in
Xapian due to the embedded slash.

Assume, separate messages with application/pdf and application/x-pdf
are indexed, then:

- mimetype:application/x-pdf will find only the application/x-pdf
- mimetype:application/pdf will find only the application/pdf
- mimetype:pdf will find both of the messages

9 years agoAdd the NOTMUCH_FEATURE_INDEXED_MIMETYPES database feature
Todd [Thu, 22 Jan 2015 23:43:37 +0000 (17:43 -0600)]
Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES database feature

This feature will exist in all newly created databases, but there is
no upgrade provided for it.  If this flag exists, it indicates that
the database was created after the indexed MIME-types feature was
added.

9 years agotest: Add failing unit tests for indexed mime types
Todd [Thu, 22 Jan 2015 23:43:36 +0000 (17:43 -0600)]
test: Add failing unit tests for indexed mime types

Adds three failing unit tests for searching of mime-types.

An attempt was made at adding a negative test (i.e. searching for a
non-existent mime-type and ensuring it didn't return a message), but
that test would always pass making it pointless.

9 years agoemacs: escape % in header line format
David Bremner [Thu, 22 Jan 2015 08:37:32 +0000 (09:37 +0100)]
emacs: escape % in header line format

We set header-line-format to the message subject, but if the subject
contains percents, the next character is interpreted as a formatting
control, which is not desired.

9 years agoVIM: Improve performance of folders_render
Franz Fellner [Thu, 22 Jan 2015 20:16:47 +0000 (21:16 +0100)]
VIM: Improve performance of folders_render

Simply use query.count_[messages,threads] instead of actually running
the query and using the count attribute of the result set.

9 years agoVIM: Respect exclude_tags specified in .notmuch-config
Franz Fellner [Thu, 22 Jan 2015 12:52:47 +0000 (13:52 +0100)]
VIM: Respect exclude_tags specified in .notmuch-config

Exclude mails tagged with any tag specified in 'notmuch config get
search.exclude_tags' in folders list and search list.

9 years agodoc: remove support for rst2man
David Bremner [Sun, 18 Jan 2015 16:55:10 +0000 (17:55 +0100)]
doc: remove support for rst2man

It was becoming increasingly complicated to support rst2man, and there
were apparently not many people that relied on it.

9 years agotest: prepare test-lib.sh for possible test system debug session
Tomi Ollila [Sun, 21 Sep 2014 18:06:20 +0000 (21:06 +0300)]
test: prepare test-lib.sh for possible test system debug session

When something in tests fails one possibility to test is to run
the test script as `bash -x TXXX-testname.sh`. As stderr (fd 2) was
redirected to separate file during test execution also this set -x
(xtrace) output would also go there.
test-lib.sh saves the stderr to fd 7 from where it can be restored,
and bash has BASH_XTRACEFD variable, which is now given the same value
7, making bash to output all xtrade information (consistently) there.

This lib file used to save fd's 1 & 2 to 6 & 7 (respectively) in
test_begin_subtest(), but as those needs to be set *before* XTRACEFD
variable is set those are now saved at the beginning of the lib (once).
This is safe and simple thing to do.
To make xtrace output more verbose PS4 variable was set to contain the
source file, line number and if execution is in function, that function
name. Setting this variable has no effect when not xtracing.

As it is known that fd 6 is redirected stdout, printing status can now
use that fd, instead of saving stdout to fd 5 and use it.

9 years agolib: Fix use after free
Todd [Sat, 17 Jan 2015 15:51:46 +0000 (09:51 -0600)]
lib: Fix use after free

_thread_set_subject_from_message sometimes replaces the subject, making the
cur_subject point to free'd memory

==6550== ERROR: AddressSanitizer: heap-use-after-free on address 0x601a0000bec0 at pc 0x4464a4 bp 0x7fffa40be910 sp 0x7fffa40be908
READ of size 1 at 0x601a0000bec0 thread T0
    #0 0x4464a3 in _thread_add_matched_message /home/todd/.apps/notmuch/lib/thread.cc:369
    #1 0x443c2c in notmuch_threads_get /home/todd/.apps/notmuch/lib/query.cc:496
    #2 0x41d947 in do_search_threads /home/todd/.apps/notmuch/notmuch-search.c:131
    #3 0x40a3fe in main /home/todd/.apps/notmuch/notmuch.c:345
    #4 0x7f4e535b4ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287
    #5 0x40abe6 in _start ??:?
0x601a0000bec0 is located 96 bytes inside of 134-byte region [0x601a0000be60,0x601a0000bee6)
freed by thread T0 here:
    #0 0x7f4e54e6933a in __interceptor_free ??:?
    #1 0x7f4e54482fab in _talloc_free ??:?
previously allocated by thread T0 here:
    #0 0x7f4e54e6941a in malloc ??:?
    #1 0x7f4e54485b5d in talloc_strdup ??:?

9 years agolib: Fix potential invalid read past an empty string
Todd [Sat, 17 Jan 2015 15:51:45 +0000 (09:51 -0600)]
lib: Fix potential invalid read past an empty string

==22884== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x601600008291 at pc 0x7ff6295680e5 bp 0x7fff4ab9aa40 sp 0x7fff4ab9aa08
READ of size 1 at 0x601600008291 thread T0
    #0 0x7ff6295680e4 in __interceptor_strcmp ??:?
    #1 0x44763b in _thread_add_message /home/todd/.apps/notmuch/lib/thread.cc:255
    #2 0x4459e8 in notmuch_threads_get /home/todd/.apps/notmuch/lib/query.cc:496
    #3 0x41e2a7 in do_search_threads /home/todd/.apps/notmuch/notmuch-search.c:131
    #4 0x40a408 in main /home/todd/.apps/notmuch/notmuch.c:345
    #5 0x7ff627cb9ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287
    #6 0x40abf3 in _start ??:?
0x601600008291 is located 0 bytes to the right of 97-byte region [0x601600008230,0x601600008291)
allocated by thread T0 here:
    #0 0x7ff62956e41a in malloc ??:?
    #1 0x7ff628b8ab5d in talloc_strdup ??:?

9 years agoEmacs: Display a message when generating address completion candidates
Michal Sojka [Fri, 19 Sep 2014 18:16:40 +0000 (20:16 +0200)]
Emacs: Display a message when generating address completion candidates

The TAB-initiated address completion generates completion candidates
synchronously, blocking the UI. Since this can take long time, it is
better to let the use know what's happening.

9 years agonmbug: Add a 'help' command for folks who don't like --help
W. Trevor King [Fri, 3 Oct 2014 18:20:58 +0000 (11:20 -0700)]
nmbug: Add a 'help' command for folks who don't like --help

The 'if args.func == help' block at the end avoids:

    AttributeError: 'functools.partial' object has no attribute '__code__'

9 years agothread-naming test: Test empty subject names.
Jesse Rosenthal [Wed, 29 Oct 2014 20:51:45 +0000 (16:51 -0400)]
thread-naming test: Test empty subject names.

We test all empty subjects, and then empty subjects followed by
non-empty subjects (searching both oldest- and newest-first).

9 years agotest-lib: Add dummy subject to force empty subject
Jesse Rosenthal [Wed, 29 Oct 2014 20:51:44 +0000 (16:51 -0400)]
test-lib: Add dummy subject to force empty subject

At the moment, the test-lib fills in any missing headers. This makes
it impossible to test our handling of empty subjects. This will
allow us to use a special dummy subject -- `@FORCE_EMPTY` -- to force
the subject to remain empty.

9 years agothread.cc: Avoid empty thread names if possible.
Jesse Rosenthal [Wed, 29 Oct 2014 20:51:43 +0000 (16:51 -0400)]
thread.cc: Avoid empty thread names if possible.

Currently the thread is named based on either the oldest or newest
matching message (depending on the search order). If this message has
an empty subject, though, the thread will show up with an empty
subject in the search results. (See the thread starting with
`id:1412371140-21051-1-git-send-email-david@tethera.net` for an
example.)

This changes the behavior so it will use a non-empty name for the
thread if possible. We name threads based on (a) non-empty matches for
the query, and (b) the search order. If the search order is
oldest-first (as in the default inbox) it chooses the oldest matching
non-empty message as the subject. If the search order is newest-first
it chooses the newest one.

9 years agoemacs: add stash support for git send-email command line
Jani Nikula [Fri, 2 Jan 2015 17:48:17 +0000 (19:48 +0200)]
emacs: add stash support for git send-email command line

Stash From/To/Cc as --to/--to/--cc, respectively, and Message-Id as
--in-reply-to, suitable for pasting to git send-email command line.

9 years agoemacs: make citation function customizable.
David Bremner [Wed, 14 Jan 2015 19:57:49 +0000 (20:57 +0100)]
emacs: make citation function customizable.

Make a new customizable variable instead of relying on
message-cite-function because the default for the latter changed
between emacs releases.

The defcustom is borrowed from the message.el source, with minor
modifications.

9 years agocontrib: remove notmuch deliver
David Bremner [Wed, 14 Jan 2015 14:25:30 +0000 (15:25 +0100)]
contrib: remove notmuch deliver

contrib/notmuch-deliver is presumed obsoleted by notmuch-insert.

9 years agoemacs: Washing should use more `defcustom'.
David Edmondson [Fri, 31 Oct 2014 08:05:21 +0000 (08:05 +0000)]
emacs: Washing should use more `defcustom'.

More of the washing variables should be available through the standard
customisation interface.

9 years agoemacs: More flexible washed faces.
David Edmondson [Fri, 31 Oct 2014 08:05:20 +0000 (08:05 +0000)]
emacs: More flexible washed faces.

The faces used when washing messages should be notmuch specific and
inherit from the underlying emacs face rather than using it
directly. This allows the washed face to be modified without requiring
the modification of the underlying face.

9 years agoconfigure: add check for python interepreter name
David Bremner [Sat, 3 Jan 2015 12:58:19 +0000 (13:58 +0100)]
configure: add check for python interepreter name

Currently we hardcode "python" in several places. This makes things
hard for people who have only commands called python3 and/or
python2. We also add the name to sh.config to eventually replace the
current workaround in the test suite.

9 years agobuild: eliminate use of python execfile command
David Bremner [Sat, 3 Jan 2015 13:14:03 +0000 (14:14 +0100)]
build: eliminate use of python execfile command

As discussed in
id:8cc9dd580ad672527e12f43706f9803b2c8e99d8.1405220724.git.wking@tremily.us,
execfile is unavailable in python3.

The approach of this commit avoids modifying the python module path,
which is arguably preferable since it avoids potentially accidentally
importing a module from the wrong place.

9 years agodebian: update ./debian/.gitignore
David Bremner [Sat, 3 Jan 2015 12:26:19 +0000 (13:26 +0100)]
debian: update ./debian/.gitignore

One binary package was renamed, and notmuch-dbg was mysteriously
missing from the existing .gitignore.

9 years agocompletion: remove the broken notmuch-completion.tcsh
Jani Nikula [Fri, 2 Jan 2015 18:03:28 +0000 (20:03 +0200)]
completion: remove the broken notmuch-completion.tcsh

The tcsh completion is minimal yet doesn't work at all. We're better
off without it, it's more embarrassing than useful.

9 years agolib: convert two "iterator copy strings" into references.
David Bremner [Fri, 2 Jan 2015 16:18:42 +0000 (17:18 +0100)]
lib: convert two "iterator copy strings" into references.

Apparently this is a supported and even idiomatic way of keeping a
temporary object (e.g. like that returned from an operator
dereference) alive.

9 years agolib: another iterator-temporary/stale-pointer bug
David Bremner [Sun, 28 Dec 2014 10:45:08 +0000 (11:45 +0100)]
lib: another iterator-temporary/stale-pointer bug

Tamas Szakaly points out [1] that the bug fixed in 51b073c still
exists in at least one place. This change follows the suggestion of
[2] and creates a block scope temporary std::string to avoid the rules
of iterators temporaries.

[1]: id:20141226113755.GA64154@pamparam
[2]: id:20141226230655.GA41992@pamparam

9 years agocompletion: complete notmuch insert --folder to maildir folders only
Jani Nikula [Thu, 1 Jan 2015 14:34:30 +0000 (16:34 +0200)]
completion: complete notmuch insert --folder to maildir folders only

The --folder option expects a folder relative from maildir root, so
complete like the folder: search term.

9 years agocompletion: complete notmuch insert --keep and --no-hooks options
Jani Nikula [Mon, 10 Nov 2014 19:35:42 +0000 (21:35 +0200)]
completion: complete notmuch insert --keep and --no-hooks options

9 years agoAdd default configuration values to the man page
Sergei Shilovsky [Tue, 14 Oct 2014 14:30:56 +0000 (18:30 +0400)]
Add default configuration values to the man page

9 years agolib: drop the deprecation message for single-message mbox files
Jani Nikula [Sun, 23 Nov 2014 11:15:12 +0000 (13:15 +0200)]
lib: drop the deprecation message for single-message mbox files

We generally do not support mbox files, but for historical reasons
we've supported single-message mbox files, with a deprecation
message. We've tried dropping the support altogether, but backed out
of it because we'd need to stop indexing them, while keeping support
for previously indexed files. This would be more complicated than
simply supporting single-message mbox files. Therefore, drop the
deprecation message, and just silently accept single-message mboxes.

9 years agobindings/ruby: gitignore *.o
David Bremner [Thu, 1 Jan 2015 12:16:38 +0000 (13:16 +0100)]
bindings/ruby: gitignore *.o

9 years agolib: Use email address instead of empty real name.
Jesse Rosenthal [Sat, 22 Nov 2014 13:17:16 +0000 (08:17 -0500)]
lib: Use email address instead of empty real name.

Currently, if a From-header is of the form:

    "" <address@example.com>

the empty string will be treated as a valid real-name, and the entry
in the search results will be empty.

The new behavior here is that we treat an empty real-name field as if
it were null, so that the email address will be used in the search
results instead.

Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>
9 years agotest: Add known-broken test for empty author name
Jesse Rosenthal [Sat, 22 Nov 2014 13:17:15 +0000 (08:17 -0500)]
test: Add known-broken test for empty author name

We test for whether a quoted empty email address

    "" <address@example.com>

will show up as the address, instead of the empty string. This is
marked as known-broken, since the current behavior is to use the empty
string.

This is a new test file, since handling of unusual email addresses
doesn't seem to fit well in any of our existing tests.

Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>
9 years agoemacs: `with-current-notmuch-show-message' should not leak `coding-system-for-read'
David Edmondson [Tue, 18 Nov 2014 07:03:17 +0000 (07:03 +0000)]
emacs: `with-current-notmuch-show-message' should not leak `coding-system-for-read'

`with-current-notmuch-show-message' applies a `no-conversion' coding
system when reading a raw message from notmuch. That coding system
should _not_ be applied when the body of the macro is evaluated, as it
can cause file operations used during that evaluation to incorrectly
apply the `no-conversion' coding system.

This was discovered when a user's .signature file contained non-ASCII
characters. When a message is forwarded, the `no-conversion' coding
system was applied to the reading of the .signature file, resulting in
raw rather than UTF-8 interpretation of the data.

9 years agoNEWS & doc: typing fixes
Tomi Ollila [Sat, 15 Nov 2014 14:52:44 +0000 (16:52 +0200)]
NEWS & doc: typing fixes

Some inconsistent formatting in NEWS for 0.19, 0.18 & 0.17 fixed.

Extra `*` when making bold text in doc/man1/notmuch-search.rst removed.

9 years agoMerge tag '0.19'
David Bremner [Sat, 15 Nov 2014 07:47:00 +0000 (08:47 +0100)]
Merge tag '0.19'

notmuch 0.19 release

9 years agodebian: update debian/NEWS and debian/changelog 0.19 debian/0.19-1
David Bremner [Fri, 14 Nov 2014 19:35:40 +0000 (20:35 +0100)]
debian: update debian/NEWS and debian/changelog

Plagiarize my upstream summary for debian, and mention the new
upgrade.

9 years agoversion: bump to 0.19
David Bremner [Fri, 14 Nov 2014 18:35:02 +0000 (19:35 +0100)]
version: bump to 0.19

9 years agoNEWS: deprecate notmuch deliver
David Bremner [Thu, 13 Nov 2014 20:59:43 +0000 (21:59 +0100)]
NEWS: deprecate notmuch deliver

notmuch-deliver has no commits for about 2.5 years. notmuch-insert has
all the features that deliver does, and as far as I understand the
error handling has now caught up.

9 years agoNEWS: add short overview section
David Bremner [Thu, 13 Nov 2014 20:59:42 +0000 (21:59 +0100)]
NEWS: add short overview section

I decided to err on the side of brevity, since the details are just
below.

9 years agoNews for mark read handling
markwalters1009@gmail.com [Thu, 13 Nov 2014 17:25:21 +0000 (17:25 +0000)]
News for mark read handling

amended by db: capitalized notmuch.

9 years agodoc: Minor fixes related to notmuch-address
Michal Sojka [Wed, 12 Nov 2014 16:44:59 +0000 (17:44 +0100)]
doc: Minor fixes related to notmuch-address

- Add notmuch-address to HTML index
- Remove extra '*'

9 years agoNEWS: notmuch address
Michal Sojka [Wed, 12 Nov 2014 16:44:58 +0000 (17:44 +0100)]
NEWS: notmuch address

9 years agoNEWS: functions in emacs notmuch-show-stash-mlarchive-link-alist
Jani Nikula [Mon, 10 Nov 2014 19:27:53 +0000 (21:27 +0200)]
NEWS: functions in emacs notmuch-show-stash-mlarchive-link-alist

News for emacs: allow functions in
notmuch-show-stash-mlarchive-link-alist.

9 years agoNEWS: notmuch insert, search updates
Jani Nikula [Mon, 10 Nov 2014 19:27:52 +0000 (21:27 +0200)]
NEWS: notmuch insert, search updates

News for

- cli: add support for notmuch search --duplicate=N with --output=messages
- cli/insert: add post-insert hook
- cli/insert: require succesful message indexing for success statu

9 years agoNEWS: Database version 3, API improvements, and ghost messages
Austin Clements [Mon, 10 Nov 2014 13:13:42 +0000 (08:13 -0500)]
NEWS: Database version 3, API improvements, and ghost messages

9 years agodebian: bump standards version 0.19_rc2 debian/0.19_rc2-1
David Bremner [Sun, 9 Nov 2014 15:46:55 +0000 (16:46 +0100)]
debian: bump standards version

9 years agobump version to 0.19~rc2
David Bremner [Sun, 9 Nov 2014 15:23:58 +0000 (16:23 +0100)]
bump version to 0.19~rc2

9 years agoemacs: show: document the mark unread defcustom function
Mark Walters [Sat, 6 Sep 2014 16:22:10 +0000 (17:22 +0100)]
emacs: show: document the mark unread defcustom function

9 years agocli: notmuch address option defaults update
Tomi Ollila [Fri, 7 Nov 2014 18:31:50 +0000 (20:31 +0200)]
cli: notmuch address option defaults update

When no --output option were given, change default to display senders
only.

When only --count option is given, display senders (in contrary to not
displaying anything).

Document that --count with --sort=**order** is not supported option
combination.

Clean up some whitespace in the documentation.

One test updated to have --output=count without sender nor recipient
output option.

9 years agodoc: whitespace cleanup
Tomi Ollila [Thu, 6 Nov 2014 17:46:59 +0000 (19:46 +0200)]
doc: whitespace cleanup

Changed one tab in doc/man1/notmuch-show.rst to 8 spaces.

Removed one leading tab in doc/man5/notmuch-hooks.rst to make
the SYNOPSIS style consistent with other pages.

9 years agoNews for dump/writelock change
Mark Walters [Sat, 8 Nov 2014 08:04:56 +0000 (08:04 +0000)]
News for dump/writelock change

9 years agodebian: bump date in changelog. 0.19_rc1 debian/0.19_rc1-1
David Bremner [Wed, 5 Nov 2014 23:30:57 +0000 (00:30 +0100)]
debian: bump date in changelog.

It looks a bit riduculous to have a September date there.

9 years agolib: bump LIBNOTMUCH_MAJOR_VERSION to 4
David Bremner [Wed, 5 Nov 2014 23:10:03 +0000 (00:10 +0100)]
lib: bump LIBNOTMUCH_MAJOR_VERSION to 4

This should have been done at the same time as the SONAME bump.

9 years agoversion: update to 0.19~rc1
David Bremner [Wed, 5 Nov 2014 23:06:06 +0000 (00:06 +0100)]
version: update to 0.19~rc1

Sync NEWS debian/changelog at the same time, although in those cases it's a downgrade.

9 years agodoc: add notmuch-address.rst to sphinx config
David Bremner [Wed, 5 Nov 2014 22:41:21 +0000 (23:41 +0100)]
doc: add notmuch-address.rst to sphinx config

This is needed so that the rst docs are converted to man and info
pages.