]> git.notmuchmail.org Git - notmuch/log
notmuch
10 years agotest: Add some missing maildir synchronization tests
Michal Sojka [Wed, 19 Dec 2012 21:32:26 +0000 (22:32 +0100)]
test: Add some missing maildir synchronization tests

As mentioned by Jani Nikula in id:87vcccp4y3.fsf@nikula.org, some cases
of maildir synchronization are not covered by our tests. Let's add the
missing tests.

10 years agotest: Adding non-maildir tags does not move message from new to cur
Michal Sojka [Wed, 19 Dec 2012 21:32:25 +0000 (22:32 +0100)]
test: Adding non-maildir tags does not move message from new to cur

Some MUA's like mutt show the difference between "new" emails living in maildir
directory new/, and "old" emails living in maildir directory cur/. However
notmuch tag unconditionally moves selected messages from new/ to cur/, even if
no maildir synchronized tag is changed.

While maildir specification forbids messages with tags living in new/, there is
no need to move messages to cur/ when no maildir synchronized tag is changed.
Thus notmuch can remain transparent with respect to other MUA's.

[ Edited commit log to better describe the intended changes, and tag the
  test as broken until the actual changes are implemented -- Louis Rilling ]

Signed-off-by: Louis Rilling <l.rilling@av7.net>
[ Converted to use test_subtest_known_broken, David Bremner ]

10 years agocontrib: pick: test: refresh view
Mark Walters [Mon, 2 Sep 2013 20:15:14 +0000 (21:15 +0100)]
contrib: pick: test: refresh view

A recent proposed patch was buggy when refreshing the view. Add a test
for refresh so that this does not reoccur.

10 years agocontrib: pick: add docstring for notmuch-pick-worker
Mark Walters [Mon, 2 Sep 2013 20:15:13 +0000 (21:15 +0100)]
contrib: pick: add docstring for notmuch-pick-worker

10 years agocontrib: pick: remove unneeded variable notmuch-pick-buffer-name
Mark Walters [Mon, 2 Sep 2013 20:15:12 +0000 (21:15 +0100)]
contrib: pick: remove unneeded variable notmuch-pick-buffer-name

This variable is essentially unused: it was only used for making sure
it itself got reset after a refresh of the buffer.

It did this by passing an unnecessary argument to notmuch-pick-worker
so remove that too.

10 years agocontrib: pick: bind M-p and M-n to prev/next thread
Mark Walters [Sun, 25 Aug 2013 19:55:34 +0000 (20:55 +0100)]
contrib: pick: bind M-p and M-n to prev/next thread

This adds functions to go to the previous or next thread to
pick. Prev-thread behaves similarly to prev-message in show: if you
are on the top line of a thread it will go to the top of the previous
thread, otherwise it will go to the top of the current thread. Next
thread will always go to the top of the next thread (or the end of
buffer). These are bound to "M-p" and "M-n" by default (matching the
bindings in show).

10 years agocontrib: pick: thread tagging (including archiving) implemented
Mark Walters [Sun, 25 Aug 2013 19:55:33 +0000 (20:55 +0100)]
contrib: pick: thread tagging (including archiving) implemented

Previously pick had no actions based on the entire thread: this adds
some. Note in this version '*' is bound to `tag thread' which is not
consistent with search or show. However it still might be the most
natural thing (as it is similar to running * in the show pane).

10 years agocontrib: pick: add thread based utility functions
Mark Walters [Sun, 25 Aug 2013 19:55:32 +0000 (20:55 +0100)]
contrib: pick: add thread based utility functions

Previously notmuch-pick had no thread based functionality. This adds a
macro to iterate through all messages in a thread. To simplify this it
adds a text-property marker to the first message of each thread.

10 years agolib: fix clang build
Jani Nikula [Sat, 17 Aug 2013 21:30:01 +0000 (00:30 +0300)]
lib: fix clang build

Long story short, fix build on recent (3.2+) clang.

The long story for posterity follows.

gcc 4.6 added new warnings about structs with greater visibility than
their fields. The warnings were silenced by adjusting visibility in

commit d5523ead90b6be2b07d4af745b8ed9b980a6b9f1
Author: Carl Worth <cworth@cworth.org>
Date:   Wed May 11 13:23:13 2011 -0700

    Mark some structures in the library interface with visibility=default attribute.

Later on,

commit 3b76adf9e2c026dd03b820f4c6eab50e25444113
Author: Austin Clements <amdragon@MIT.EDU>
Date:   Sat Jan 14 19:17:33 2012 -0500

    lib: Add support for automatically excluding tags from queries

changed visibility of struct _notmuch_string_list for the same reason, and

commit 1a53f9f116fa7c460cda3df532be921baaafb082
Author: Mark Walters <markwalters1009@gmail.com>
Date:   Thu Mar 1 22:30:38 2012 +0000

    lib: Add the exclude flag to notmuch_query_search_threads

split the struct _notmuch_string_list and its typedef
notmuch_string_list_t as a way to make a forward declaration for
_notmuch_thread_create().

The subtle difference was that the struct definition now had 'visible'
in it, while the typedef didn't, and it was within the #pragma GCC
visibility push(hidden) block. This went unnoticed, as the then common
versions of clang didn't care about this.

A later change in clang (I did not dig into when this change was
introduced) caused the following error:

CXX  -O2 lib/database.o
In file included from lib/database.cc:21:
In file included from ./lib/database-private.h:33:
./lib/notmuch-private.h:479:8: error: visibility does not match previous declaration
struct visible _notmuch_string_list {
       ^
./lib/notmuch-private.h:67:33: note: expanded from macro 'visible'
                                ^
./lib/notmuch-private.h:52:13: note: previous attribute is here
            ^
1 error generated.
make: *** [lib/database.o] Error 1

This is slightly misleading due to the reference to the #pragma. The
real culprit is the typedef within the #pragma.

We could just add 'visible' to the typedef, or move the typedef
outside of the #pragma, and be done with it, but juggle the
declarations a bit to accommodate moving the typedef back with the
struct, and keep the visibility attribute in one place.

The problem was originally reported by Simonas Kazlauskas
<s@kazlauskas.me> in id:20130418102507.GA23688@godbox but I was only
able to reproduce and investigate now that I upgraded clang.

10 years agocontrib: pick: remove sync tests
Mark Walters [Mon, 26 Aug 2013 19:57:23 +0000 (20:57 +0100)]
contrib: pick: remove sync tests

Since the previous commit removed the sync parser we may as well
remove its tests too.

10 years agocontrib: pick: remove sync parser
Mark Walters [Mon, 26 Aug 2013 19:57:22 +0000 (20:57 +0100)]
contrib: pick: remove sync parser

Previously pick had the option of using an async parser like search or
a sync parser like show. The async parser has always been the default
and it seems fine so we can remove the sync one and the corresponding
defcustom.

10 years agotest: test notmuch show --include-html option
Tomi Ollila [Sat, 24 Aug 2013 15:29:30 +0000 (18:29 +0300)]
test: test notmuch show --include-html option

Test new --include-html option added to notmuch show command with
json output message parts containing text in latin1 and utf8 format.

10 years agocli: add --include-html option to notmuch show
John Lenz [Tue, 2 Jul 2013 00:19:42 +0000 (19:19 -0500)]
cli: add --include-html option to notmuch show

For my client, the largest bottleneck for displaying large threads is
exporting each html part individually since by default notmuch will not
show the json parts.  For large threads there can be quite a few parts and
each must be exported and decoded one by one.  Also, I then have to deal
with all the crazy charsets which I can do through a library but is a
pain.

Therefore, this patch adds an --include-html option that causes the
text/html parts to be included as part of the output of show.

diff man/man1/notmuch-show.1

10 years agoemacs: removed 3 duplicate functions from notmuch-show.el
Tomi Ollila [Mon, 26 Aug 2013 20:21:57 +0000 (23:21 +0300)]
emacs: removed 3 duplicate functions from notmuch-show.el

notmuch-show.el and notmuch.el had 3 duplicate, identical functions:
notmuch-foreach-mime-part, notmuch-count-attachments and
notmuch-save-attachments. Now these functions in notmuch-show.el
are replaced with declare-functions pointing to "notmuch"(.el).

10 years agoman: clarify folder: prefix regarding duplicate files
Jani Nikula [Sat, 17 Aug 2013 12:11:33 +0000 (15:11 +0300)]
man: clarify folder: prefix regarding duplicate files

The results for folder: prefix are a source of recurring confusion.

10 years agoNEWS: cli options for improved duplicate message handling
Jani Nikula [Sun, 18 Aug 2013 12:52:28 +0000 (15:52 +0300)]
NEWS: cli options for improved duplicate message handling

10 years agoman: document notmuch count --output=files
Jani Nikula [Sat, 17 Aug 2013 12:11:31 +0000 (15:11 +0300)]
man: document notmuch count --output=files

Document the notmuch count --output=files option.

10 years agotest: test notmuch count --output=files
Jani Nikula [Sat, 17 Aug 2013 12:11:30 +0000 (15:11 +0300)]
test: test notmuch count --output=files

Add tests for notmuch count --output=files option.

10 years agocli: add --output=files option to notmuch count
Jani Nikula [Sat, 17 Aug 2013 12:11:29 +0000 (15:11 +0300)]
cli: add --output=files option to notmuch count

Add support for querying the total number of files associated with the
messages matching the search. This is mostly useful with an
id:<message-id> query for a single message.

10 years agoman: document notmuch search --duplicate=N
Jani Nikula [Sat, 17 Aug 2013 12:11:28 +0000 (15:11 +0300)]
man: document notmuch search --duplicate=N

Document the notmuch search --duplicate=N option.

10 years agotest: test notmuch search --duplicate=N
Jani Nikula [Sat, 17 Aug 2013 12:11:27 +0000 (15:11 +0300)]
test: test notmuch search --duplicate=N

Add test for notmuch search --duplicate=N option.

10 years agocli: add --duplicate=N option to notmuch search
Jani Nikula [Sat, 17 Aug 2013 12:11:26 +0000 (15:11 +0300)]
cli: add --duplicate=N option to notmuch search

Effective with --output=files, output the Nth filename associated with
each message matching the query (N is 1-based). If N is greater than
the number of files associated with the message, don't print anything.

10 years agonotmuch-config: use strchr(), not index() (Solaris support)
Blake Jones [Wed, 14 Nov 2012 02:10:03 +0000 (18:10 -0800)]
notmuch-config: use strchr(), not index() (Solaris support)

notmuch-config.c has the only use of the function named "index()" in the
notmuch source.  Several other places use the equivalent function
"strchr()"; this patch just fixes notmuch-config.c to use strchr()
instead.  (Solaris needs to include <strings.h> to get the prototype for
index(), and notmuch-config.c was failing to include that header, so it
wasn't compiling as-is.)

10 years agocontrib: pick: use close-message-pane for reply etc
Mark Walters [Thu, 22 Aug 2013 17:10:26 +0000 (18:10 +0100)]
contrib: pick: use close-message-pane for reply etc

We can save some code duplication by using the new close-message-pane
functionality for reply, forward, and new mail.

10 years agocontrib: pick: add in binding to view raw message
Mark Walters [Thu, 22 Aug 2013 17:10:25 +0000 (18:10 +0100)]
contrib: pick: add in binding to view raw message

Note this does rely on the fact that we have over-ridden notmuch-show-get-properties

10 years agocontrib: pick: make help close the message pane first
Mark Walters [Thu, 22 Aug 2013 17:10:24 +0000 (18:10 +0100)]
contrib: pick: make help close the message pane first

Previously pressing "?" for help when the message pane was open meant
the help window was very small. Close the message pane before
displaying help.

10 years agocontrib: pick: close window function
Mark Walters [Thu, 22 Aug 2013 17:10:23 +0000 (18:10 +0100)]
contrib: pick: close window function

10 years agocontrib: pick: pass tab through to the message pane
Mark Walters [Thu, 22 Aug 2013 17:10:22 +0000 (18:10 +0100)]
contrib: pick: pass tab through to the message pane

This makes tab move to next button in the message pane and binds
button activate (in message pane) to "e". This means that is easy to
toggle hidden parts or hidden citations etc in the message pane.

10 years agocontrib: pick: add button press helper
Mark Walters [Thu, 22 Aug 2013 17:10:21 +0000 (18:10 +0100)]
contrib: pick: add button press helper

We will want to be able to activate buttons not in the current
buffer (ie in the message pane) so it is helpful to have a way of
activating a button without signalling error if there is no button.

10 years agocontrib: pick: add in to-message-window function
Mark Walters [Thu, 22 Aug 2013 17:10:20 +0000 (18:10 +0100)]
contrib: pick: add in to-message-window function

10 years agocontrib: pick: Link in stash map straight from notmuch-show
Mark Walters [Thu, 22 Aug 2013 17:10:19 +0000 (18:10 +0100)]
contrib: pick: Link in stash map straight from notmuch-show

These functions all now work straight from their notmuch-show
implementation so link them in.

Stash functionality was one of the key missing things in notmuch-pick.

10 years agocontrib: pick: Link in attachment functions straight from notmuch-show
Mark Walters [Thu, 22 Aug 2013 17:10:18 +0000 (18:10 +0100)]
contrib: pick: Link in attachment functions straight from notmuch-show

We can use the attachment functions straight from
notmuch-show. notmuch-show-view-all-mime-parts might be deprecated so
we either want to undeprecate it or not have this binding.

10 years agocontrib: pick: Link in notmuch-show-pipe-message
Mark Walters [Thu, 22 Aug 2013 17:10:17 +0000 (18:10 +0100)]
contrib: pick: Link in notmuch-show-pipe-message

Since we can now use show functions directly in pick we can drop pick-pipe-message.

10 years agocontrib: pick: override notmuch-show-get-prop
Mark Walters [Thu, 22 Aug 2013 17:10:16 +0000 (18:10 +0100)]
contrib: pick: override notmuch-show-get-prop

We override notmuch-show-get-prop so that many of the show functions
can be used in notmuch-pick without modification. The main use is that
it means notmuch-show-get-message-id `works' in pick. Thus we get all
the stash functions and several other `for free' in pick.

10 years agotimegm: add portable implementation (Solaris support)
Blake Jones [Wed, 21 Aug 2013 11:09:54 +0000 (13:09 +0200)]
timegm: add portable implementation (Solaris support)

The timegm(3) function is a non-standard extension to libc which is
available in GNU libc and on some BSDs.  Although SunOS had this
function in its libc, Solaris (unfortunately) removed it.  This patch
implements a very simple version of timegm() which is good enough for
parse-time-string.c.

Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
10 years agostrsep: check for availability (Solaris support)
Blake Jones [Fri, 16 Aug 2013 14:38:16 +0000 (16:38 +0200)]
strsep: check for availability (Solaris support)

Solaris does not ship a version of the strsep() function.  This change
adds a check to "configure" to see whether notmuch needs to provide its
own implementation, and if so, it uses the new version in
"compat/strsep.c" (which was copied from Mutt, and apparently before
that from glibc).

Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
10 years agoasctime: check for standards compliance (Solaris support)
Vladimir Marek [Fri, 16 Aug 2013 14:38:15 +0000 (16:38 +0200)]
asctime: check for standards compliance (Solaris support)

Add checks to "configure" to see whether _POSIX_PTHREAD_SEMANTICS needs
to be defined to get the right number of arguments in the prototypes for
asctime_r().  Solaris' default implementation conforms to POSIX.1c
Draft 6, rather than the final POSIX.1c spec.  The standards-compliant
version can be used by defining _POSIX_PTHREAD_SEMANTICS.

This change also adds the file "compat/check_asctime.c", which
configure uses to perform its check, and modifies compat/compat.h to
define _POSIX_PTHREAD_SEMANTICS if configure detected it was needed.

Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
10 years agogetpwuid: check for standards compliance (Solaris support)
Blake Jones [Fri, 16 Aug 2013 14:38:14 +0000 (16:38 +0200)]
getpwuid: check for standards compliance (Solaris support)

Add checks to "configure" to see whether _POSIX_PTHREAD_SEMANTICS needs
to be defined to get the right number of arguments in the prototypes for
getpwuid_r().  Solaris' default implementation conforms to POSIX.1c
Draft 6, rather than the final POSIX.1c spec.  The standards-compliant
version can be used by defining _POSIX_PTHREAD_SEMANTICS.

This change also adds the file "compat/check_getpwuid.c", which
configure uses to perform its check, and modifies compat/compat.h to
define _POSIX_PTHREAD_SEMANTICS if configure detected it was needed.

Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
10 years agotest: Canonicalize RFC 2047 encoding and charset
Austin Clements [Mon, 19 Aug 2013 14:40:03 +0000 (10:40 -0400)]
test: Canonicalize RFC 2047 encoding and charset

RFC 2047 states that the encoding and charset in an encoded word are
case-insensitive, so force them to lower case in the reply test.  This
fixes an issue caused by GMime versions (somewhere between 2.6.10 and
2.6.16), which changed the capitalization of the encoding.

10 years agoreply: Use RFC 2822/MIME wholly for text format template
Austin Clements [Fri, 16 Aug 2013 15:35:43 +0000 (11:35 -0400)]
reply: Use RFC 2822/MIME wholly for text format template

Previously, reply's default text format used an odd mix of RFC 2045
MIME encoding for the reply template's body and some made-up RFC
2822-like UTF-8 format for the headers.  The intent was to present the
headers to the user in a nice, un-encoded format, but this assumed
that whatever ultimately sent the email would RFC 2047-encode the
headers, while at the same time the body was already RFC 2045 encoded,
so it assumed that whatever sent the email would *not* re-encode the
body.

This can be fixed by either producing a fully decoded UTF-8 reply
template, or a fully encoded MIME-compliant RFC 2822 message.  This
patch does the latter because it is

a) Well-defined by RFC 2822 and MIME (while any UTF-8 format would be
   ad hoc).

b) Ready to be piped to sendmail.  The point of the text format is to
   be minimal, so a user should be able to pop up the template in
   whatever editor they want, edit it, and push it to sendmail.

c) Consistent with frontend capabilities.  If a frontend has the
   smarts to RFC 2047 encode the headers before sending the mail, it
   probably has the smarts to RFC 2047 decode them before presenting
   the template to a user for editing.

Also, as far as I know, nothing automated consumes the reply text
format, so changing this should not cause serious problems.  (And if
anything does still consume this format, it probably gets these
encoding issues wrong anyway.)

10 years agoreply: Remove extraneous space from generated References
Austin Clements [Fri, 16 Aug 2013 15:35:42 +0000 (11:35 -0400)]
reply: Remove extraneous space from generated References

Previously, the References header code seemed to assume
notmuch_message_get_header would return NULL if the header was not
present, but it actually returns "".  As a result of this, it was
inserting an unnecessary space when concatenating an empty or missing
original references header with the new reference.

This shows up in only two tests because the text reply format later
passes the whole reply template through g_mime_filter_headers, which
has the side effect of stripping out this extra space.

10 years agoreply: Test replying to messages with RFC 2047-encoded headers
Austin Clements [Fri, 16 Aug 2013 15:35:41 +0000 (11:35 -0400)]
reply: Test replying to messages with RFC 2047-encoded headers

10 years agotest: Make symbol-test depend on libnotmuch.so
Austin Clements [Tue, 13 Aug 2013 19:52:17 +0000 (15:52 -0400)]
test: Make symbol-test depend on libnotmuch.so

Without this
$ make -j test
intermittently fails and
$ make clean; make test/symbol-test
always fails (not that anybody would do the latter).

10 years agoreply: Document the reason for g_mime_filter_headers
Austin Clements [Mon, 12 Aug 2013 18:40:36 +0000 (14:40 -0400)]
reply: Document the reason for g_mime_filter_headers

Given how long it took me to figure out why we pass the reply headers
through g_mime_filter_headers, it's worth a comment.

10 years agolib: Document which strings are returned in UTF-8
Austin Clements [Mon, 12 Aug 2013 18:40:35 +0000 (14:40 -0400)]
lib: Document which strings are returned in UTF-8

Any string that ultimately comes from notmuch_message_file_get_header
is in UTF-8.

10 years agolib: Correct out-of-date doc comment
Austin Clements [Mon, 12 Aug 2013 18:40:34 +0000 (14:40 -0400)]
lib: Correct out-of-date doc comment

notmuch_message_get_header started returning some headers straight
from the database in 567bcbc, but this comment explicitly claimed all
headers were read from the message file.

10 years agorelease: synchronize dates 0.16
David Bremner [Sat, 3 Aug 2013 11:29:40 +0000 (08:29 -0300)]
release: synchronize dates

man pages, NEWS, and debian changelog all hardcode date.  Make them
hardcode the same date.

10 years agoemacs: bugfix attachment content-type as mime-type handling 0.16_rc2
Mark Walters [Wed, 31 Jul 2013 18:39:05 +0000 (19:39 +0100)]
emacs: bugfix attachment content-type as mime-type handling

Notmuch puts attachments in as declared content-type except when the
content-type is application/octet-stream it tries to guess the type
from the filename/extension. This means that viewing a pdf (for
example) which is sent as application/octet-strem invokes the pdf
viewer rather than just offering to save the part.

Recent changes to the attachment handling (commit 1546387d) changed
(broke) this. This patch stores the calculated mime-type with the part
and changes the attachment part handlers can use it instead.

10 years agodebian: rename notmuch-ruby to ruby-notmuch 0.16_rc1
David Bremner [Sun, 28 Jul 2013 17:08:00 +0000 (14:08 -0300)]
debian: rename notmuch-ruby to ruby-notmuch

This seems more in line with

http://wiki.debian.org/Teams/Ruby/Packaging#Guidelines_for_Ruby_packaging

10 years agodebian: build notmuch-vim again
David Bremner [Sun, 28 Jul 2013 16:48:02 +0000 (13:48 -0300)]
debian: build notmuch-vim again

Based on id:1370220299-14722-1-git-send-email-felipe.contreras@gmail.com

Hacked rather extensively by db. The most important changes:

       - bring back notmuch.yaml for the (debian specific?) vim-addons
         tool.
       - depend on vim-ruby, so we get a version of vim with ruby installed.

10 years agodebian: update symbols for libnotmuch
David Bremner [Sun, 28 Jul 2013 14:08:50 +0000 (11:08 -0300)]
debian: update symbols for libnotmuch

Adding a new symbol should require an SONAME bump.

10 years agodebian: add alot to recommends
David Bremner [Sun, 28 Jul 2013 13:57:45 +0000 (10:57 -0300)]
debian: add alot to recommends

Since this is in a disjunction, this should not force new packages to
be installed, but rather let people with auto-install-recommends (the
default) on install notmuch without emacs.

10 years agodebian: note that we now provide a notmuch-dbg package
David Bremner [Sun, 28 Jul 2013 13:54:30 +0000 (10:54 -0300)]
debian: note that we now provide a notmuch-dbg package

This is already in upstream for a bit, but we lacked a changelog entry
closing the bug.

10 years agodebian: close bug requesting packaging of notmuch-deliver
David Bremner [Sun, 28 Jul 2013 13:49:49 +0000 (10:49 -0300)]
debian: close bug requesting packaging of notmuch-deliver

notmuch insert is pretty much equivalent, so no need to support both.

10 years agodebian: start new changelog entry
David Bremner [Sun, 28 Jul 2013 13:22:52 +0000 (10:22 -0300)]
debian: start new changelog entry

Since Debian uses the changelog as metadata, we need an empty stanza
to build the new version.

10 years agoversion: set new version and release date
David Bremner [Sun, 28 Jul 2013 14:18:48 +0000 (11:18 -0300)]
version: set new version and release date

These are manually set in version and NEWS, and propagate to the other files via
"make update-versions"

10 years agoPut 0.16 NEWS in a reasonable order
Austin Clements [Sun, 28 Jul 2013 04:16:01 +0000 (00:16 -0400)]
Put 0.16 NEWS in a reasonable order

The 0.16 NEWS grew chronologically during development, and as a result
wound up in a particularly odd order.  This rearranges it to put the
most user-visible news first.  Roughly: new features, modified
behavior, bug fixes, then deprecation, with related items grouped.

This does not modify the text of any of the news.

10 years agoemacs: hello: make --batch error gracefully
Mark Walters [Thu, 4 Jul 2013 22:18:19 +0000 (23:18 +0100)]
emacs: hello: make --batch error gracefully

Recently notmuch-hello was converted to use batch count. However, it
seems that several people run different versions of notmuch-emacs and
notmuch-cli so this batch makes emacs fail with an error message if
--batch is not available in the CLI.

Amended by: db

10 years agoemacs: News for S-expressions everywhere
Austin Clements [Mon, 22 Jul 2013 02:52:00 +0000 (22:52 -0400)]
emacs: News for S-expressions everywhere

Update the news about search using S-expression support to also say
that show is also now faster.

10 years agocontrib: pick: use notmuch-start-notmuch
Mark Walters [Thu, 4 Jul 2013 07:09:48 +0000 (08:09 +0100)]
contrib: pick: use notmuch-start-notmuch

This uses the new notmuch-start-notmuch function which should give
better handling of stderr and errors generally.

10 years agocrypto: return NULL cryptoctx if protocol string is empty.
Jameson Graef Rollins [Fri, 19 Jul 2013 15:36:12 +0000 (08:36 -0700)]
crypto: return NULL cryptoctx if protocol string is empty.

Badly formed messages that don't specify a protocol in
signed/encrypted parts, end up with a protocol of NULL.  strcasecmp in
notmuch_crypto_get_context then segfaults when trying to check it
against known protocols.  If the protocol is NULL, just return an
empty context immediately (with appropriate message.)

10 years agoNEWS: Python bindings: Fix loading of libnotmuch on OS X (Darwin)
Tomi Ollila [Sat, 13 Jul 2013 08:46:23 +0000 (11:46 +0300)]
NEWS: Python bindings: Fix loading of libnotmuch on OS X (Darwin)

10 years agoemacs: dropped rest of now-unused JSON functionality
Tomi Ollila [Sat, 6 Jul 2013 12:49:51 +0000 (15:49 +0300)]
emacs: dropped rest of now-unused JSON functionality

Notmuch cli provides all structured data previously provided
in json format now in s-expression format, rendering all current
json functionality obsolete.

10 years agoNEWS: announce insert command
Peter Wang [Sat, 6 Jul 2013 02:36:28 +0000 (12:36 +1000)]
NEWS: announce insert command

10 years agodebian: Add package for debugging symbols (Closes: #717339)
Daniel Kahn Gillmor [Fri, 19 Jul 2013 20:50:09 +0000 (16:50 -0400)]
debian: Add package for debugging symbols (Closes: #717339)

10 years agoPython bindings: CDLL("libnotmuch.3.dylib") on Darwin
Tomi Ollila [Tue, 25 Jun 2013 14:36:56 +0000 (17:36 +0300)]
Python bindings: CDLL("libnotmuch.3.dylib") on Darwin

Use os.uname() to check for 'Darwin' and load "libnotmuch.3.dylib"
instead of "libnotmuch.so.3" if that is the case.

10 years agocontrib: pick: document several of the tree/forest insertion functions.
Mark Walters [Mon, 1 Jul 2013 20:05:43 +0000 (21:05 +0100)]
contrib: pick: document several of the tree/forest insertion functions.

10 years agopick: contrib: document notmuch-pick-message-window-kill-hook
Mark Walters [Mon, 1 Jul 2013 20:05:42 +0000 (21:05 +0100)]
pick: contrib: document notmuch-pick-message-window-kill-hook

10 years agopick: contrib: document notmuch-pick-refresh-result
Mark Walters [Mon, 1 Jul 2013 20:05:41 +0000 (21:05 +0100)]
pick: contrib: document notmuch-pick-refresh-result

10 years agopick: contrib: document notmuch-pick-show-out
Mark Walters [Mon, 1 Jul 2013 20:05:40 +0000 (21:05 +0100)]
pick: contrib: document notmuch-pick-show-out

10 years agocontrib: pick: remove unused function
Mark Walters [Mon, 1 Jul 2013 07:54:03 +0000 (08:54 +0100)]
contrib: pick: remove unused function

The function notmuch-pick-show-error was used before Austin's improved
error handling. It is now redundant so remove.

10 years agocontrib: pick: remove unused variable
Mark Walters [Mon, 1 Jul 2013 07:54:02 +0000 (08:54 +0100)]
contrib: pick: remove unused variable

This variable was needed at one point for the async parser but is not
needed anymore.

10 years agocontrib: pick: bugfix: make the right variable buffer-local
Mark Walters [Mon, 1 Jul 2013 07:54:01 +0000 (08:54 +0100)]
contrib: pick: bugfix: make the right variable buffer-local

The variable notmuch-pick-message-buffer should be buffer local but
instead notmuch-pick-message-buffer-name (a non-existent variable) was
made buffer local.

10 years agocontrib: pick: add docstrings to all defvars
Mark Walters [Mon, 1 Jul 2013 07:54:00 +0000 (08:54 +0100)]
contrib: pick: add docstrings to all defvars

10 years agocontrib: pick: add a docstring for the main notmuch-pick function
Mark Walters [Mon, 1 Jul 2013 07:53:59 +0000 (08:53 +0100)]
contrib: pick: add a docstring for the main notmuch-pick function

10 years agocontrib: pick: fix refresh result
Mark Walters [Sun, 30 Jun 2013 08:55:12 +0000 (09:55 +0100)]
contrib: pick: fix refresh result

The function notmuch-pick-refresh-result (used to update tag changes)
was not quite correct: sometimes it got the choice between the subject
and " ..." wrong. This was always true but the new code often calls
this (when opening a message in the message pane to remove the unread
tag) while the async pick process is still running and this caused
mistakes which made the tests fail.

Thus we store the previous subject with the message.

10 years agocontrib: pick: remove hack notmuch-pick-show-match-message-with-wait
Mark Walters [Sun, 30 Jun 2013 08:55:11 +0000 (09:55 +0100)]
contrib: pick: remove hack notmuch-pick-show-match-message-with-wait

This function was a horrible hack (sleeping while waiting for the
correct message). The new target code can just open the message in the
message window when it arrives.

10 years agocontrib: pick: if no target specified go to first matching message
Mark Walters [Sun, 30 Jun 2013 08:55:10 +0000 (09:55 +0100)]
contrib: pick: if no target specified go to first matching message

10 years agotest: test insert --create-folder option
Peter Wang [Sun, 23 Jun 2013 04:24:05 +0000 (14:24 +1000)]
test: test insert --create-folder option

Add tests for notmuch insert --create-folder option.

10 years agoman: document insert --create-folder
Peter Wang [Sun, 23 Jun 2013 04:24:04 +0000 (14:24 +1000)]
man: document insert --create-folder

Add documentation for notmuch insert --create-folder option.

10 years agoinsert: add --create-folder option
Peter Wang [Sun, 23 Jun 2013 04:24:03 +0000 (14:24 +1000)]
insert: add --create-folder option

Allow the insert command to create the maildir folder
into which the new message should be delivered.

10 years agotest: test insert --folder option
Peter Wang [Sun, 23 Jun 2013 04:24:02 +0000 (14:24 +1000)]
test: test insert --folder option

Add tests for notmuch insert --folder option.

10 years agoman: document insert --folder option
Peter Wang [Sun, 23 Jun 2013 04:24:01 +0000 (14:24 +1000)]
man: document insert --folder option

Add documentation for notmuch insert --folder option.

10 years agoinsert: add --folder option
Peter Wang [Sun, 23 Jun 2013 04:24:00 +0000 (14:24 +1000)]
insert: add --folder option

Allow the new message to be inserted into a folder within the Maildir
hierarchy instead of the top-level folder.

10 years agotest: add tests for insert
Peter Wang [Sun, 23 Jun 2013 04:23:59 +0000 (14:23 +1000)]
test: add tests for insert

Add tests for new 'insert' command.

10 years agoman: reference notmuch-insert.1
Peter Wang [Sun, 23 Jun 2013 04:23:58 +0000 (14:23 +1000)]
man: reference notmuch-insert.1

Add references to notmuch-insert.1 from other man pages.

10 years agoman: document 'insert' command
Peter Wang [Sun, 23 Jun 2013 04:23:57 +0000 (14:23 +1000)]
man: document 'insert' command

Add initial documentation for notmuch insert command.

10 years agocli: add insert command
Peter Wang [Sun, 23 Jun 2013 12:20:45 +0000 (22:20 +1000)]
cli: add insert command

The notmuch insert command reads a message from standard input,
writes it to a Maildir folder, and then incorporates the message into
the notmuch database.  Essentially it moves the functionality of
notmuch-deliver into notmuch.

Though it could be used as an alternative to notmuch new, the reason
I want this is to allow my notmuch frontend to add postponed or sent
messages to the mail store and notmuch database, without resorting to
another tool (e.g. notmuch-deliver) nor directly modifying the maildir.

10 years agotag-util: do not reset list in parse_tag_command_line
Peter Wang [Sun, 23 Jun 2013 04:23:55 +0000 (14:23 +1000)]
tag-util: do not reset list in parse_tag_command_line

The 'insert' command will be better served if parse_tag_command_line
modifies a pre-populated list (of new.tags) instead of clobbering the
list outright.  The sole existing caller, notmuch_tag_command, is
unaffected by this change.

10 years agotag-util: move out 'tag' command-line check
Peter Wang [Sun, 23 Jun 2013 04:23:54 +0000 (14:23 +1000)]
tag-util: move out 'tag' command-line check

Move an error condition specific to the 'tag' command out of
parse_tag_command_line so that parse_tag_command_line can be used for
the forthcoming 'insert' command.

10 years agocontrib: pick: remove reference to inbox in docstring
Mark Walters [Mon, 3 Jun 2013 22:06:09 +0000 (23:06 +0100)]
contrib: pick: remove reference to inbox in docstring

Copy the recent changes in show to use just notmuch-archive-tags (as a
link) rather than saying '(defaults to "inbox")'.

10 years agoemacs: Remove `notmuch-call-notmuch-json'
Austin Clements [Sun, 23 Jun 2013 23:43:19 +0000 (19:43 -0400)]
emacs: Remove `notmuch-call-notmuch-json'

This function is no longer used.

10 years agoemacs: Use S-exp format everywhere
Austin Clements [Sun, 23 Jun 2013 23:43:18 +0000 (19:43 -0400)]
emacs: Use S-exp format everywhere

This switches `notmuch-mua-reply' and `notmuch-query-get-threads' to
the S-exp format.  These were the last two uses of the JSON format in
the Emacs frontend.

10 years agoemacs: Introduce `notmuch-call-notmuch-sexp'
Austin Clements [Sun, 23 Jun 2013 23:43:17 +0000 (19:43 -0400)]
emacs: Introduce `notmuch-call-notmuch-sexp'

This is just like `notmuch-call-notmuch-json', but parses S-expression
output.  Note that, also like `notmuch-call-notmuch-json', this
doesn't consider trailing data to be an error, which may or may not be
what we want in the long run.

10 years agocli: use notmuch_exclude_t in option parser
Peter Wang [Sat, 11 May 2013 19:50:09 +0000 (20:50 +0100)]
cli: use notmuch_exclude_t in option parser

Use notmuch_exclude_t constants directly instead of a redundant
enumeration while parsing search --exclude keyword arguments.

10 years agolib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t
Mark Walters [Mon, 13 May 2013 15:10:51 +0000 (16:10 +0100)]
lib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t

Add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t so that it can
cover all four values of search --exclude in the cli.

Previously the way to avoid any message being marked excluded was to
pass in an empty list of excluded tags: since we now have an explicit
option we might as well honour it.

The enum is in a slightly strange order as the existing FALSE/TRUE
options correspond to the new
NOTMUCH_EXCLUDE_FLAG/NOTMUCH_EXCLUDE_TRUE options so this means we do
not need to bump the version number.

Indeed, an example of this is that the cli count and show still use
FALSE/TRUE and still work.

10 years agorevert: Removed top level --stderr= option
Tomi Ollila [Fri, 31 May 2013 19:10:31 +0000 (22:10 +0300)]
revert: Removed top level --stderr= option

While looked good on paper, its attempted use caused confusion, complexity,
and potential for information leak when passed through wrapper scripts.
For slimmer code and to lessen demand for maintenance/support the set of
commits which added top level --stderr= option is now reverted.

10 years agoemacs: Remove v command
Austin Clements [Mon, 3 Jun 2013 15:54:55 +0000 (11:54 -0400)]
emacs: Remove v command

This removes the v command, since we now have much nicer part commands,
and deprecates the underlying notmuch-show-view-all-mime-parts.  This
also means that people who try using the old unprefixed 'v' command on
a part button will no longer be greeted by ALL of their parts popping
up.

10 years agoemacs: update search sort order help to match code
Jani Nikula [Mon, 3 Jun 2013 17:56:31 +0000 (20:56 +0300)]
emacs: update search sort order help to match code

10 years agotest/basic: replaced find -perm +111 with portable alternative
Tomi Ollila [Fri, 7 Jun 2013 21:37:29 +0000 (00:37 +0300)]
test/basic: replaced find -perm +111 with portable alternative

The find option syntax `-perm +111` is deprecated gnu find feature.
The replacement `( -perm -100 -o -perm -10 -o -perm 1 )` should also
work outside of the GNU domain.