David Bremner [Sun, 10 Jan 2016 01:34:21 +0000 (21:34 -0400)]
CLI: add print_status_database
This could probably be used at quite a few places in the existing code,
but in the immediate future I plan to use in some new code in
notmuch-dump
David Bremner [Sun, 27 Mar 2016 20:25:11 +0000 (17:25 -0300)]
nmbug: ignore # comments
Lines starting with # have always (for a long time, anyway) been ignored
by notmuch-restore, but have not been generated by notmuch-dump
previously. In order to make nmbug robust against such output, ignore
comment lines.
David Edmondson [Tue, 8 Mar 2016 17:12:59 +0000 (17:12 +0000)]
emacs: Improve the acquisition of text parts.
`notmuch-get-bodypart-text' assumed that it is always possible to
acquire text/* parts via the sexp output format. This is not true if the
part in question has a content type of application/octet-stream but is
being interpreted as text/* based on the extension of the part filename.
Rework `notmuch-get-bodypart-text' to use the raw output format to
address this and make the implementation common with that of
`notmuch-get-bodypart-binary'.
David Edmondson [Tue, 8 Mar 2016 17:12:58 +0000 (17:12 +0000)]
emacs: Neaten `notmuch-show-insert-bodypart-internal'.
David Edmondson [Tue, 8 Mar 2016 17:12:57 +0000 (17:12 +0000)]
emacs: `notmuch-show-insert-part-multipart/encrypted' should not assume the presence of a button.
Missed in
c802d12a1e43fe69f2fcf7a2f7d44018a55bfb65.
Tomi Ollila [Sat, 19 Mar 2016 15:50:29 +0000 (17:50 +0200)]
test/test-lib.el: revert setting notmuch-mua-reply-insert-header-p-function
in
d27d90875dfb1 (2016-02-20) notmuch-mua-reply-insert-header-p-function
was set to notmuch-show-reply-insert-header-p-never as its default was
changed to something else. Now that default is set back to *-never so
this change done in
d27d90875dfb1 is not needed anymore.
W. Trevor King [Thu, 24 Mar 2016 17:08:18 +0000 (10:08 -0700)]
NEWS: Consolidate nmbug-status and notmuch-report sections
These are the same tool; the nmbug-status text just landed before the
name change. We can also drop the message-url details from NEWS,
since they're already in the man page.
David Edmondson [Mon, 8 Feb 2016 11:34:22 +0000 (11:34 +0000)]
emacs: `notmuch-show-forward-message' can use `notmuch-mua-new-forward-messages'
Which allows `notmuch-mua-new-forward-message' to be removed.
David Edmondson [Mon, 8 Feb 2016 11:34:21 +0000 (11:34 +0000)]
emacs: Add `notmuch-show-forward-open-messages'.
Add a function to forward all open messages in the current view of a
thread. Bind this to "F".
David Edmondson [Tue, 9 Feb 2016 12:23:49 +0000 (12:23 +0000)]
emacs: Improve crypto button labels.
Make the labels for both encryption and signature buttons share a common
format, in which both report the status if it is not one of those known.
W. Trevor King [Sat, 2 Jan 2016 06:08:05 +0000 (22:08 -0800)]
NEWS: Document the notmuch-report branch
W. Trevor King [Sat, 2 Jan 2016 06:08:04 +0000 (22:08 -0800)]
notmuch-report: Add notmuch-report(1) and notmuch-report.json(5) man pages
To describe the script and config file format, so folks don't have to
dig through NEWS or the script's source to get that information.
The Makefile and conf.py are excerpted from the main doc/ directory
with minor simplifications and adjustments. The devel/nmbug/ scripts
are largely independent of notmuch, and separating the docs here
allows packagers to easily build the docs and install the scripts in a
separate package, without complicating notmuch's core build/install
process.
W. Trevor King [Sat, 2 Jan 2016 06:08:03 +0000 (22:08 -0800)]
notmuch-report.json: Rename from status-config.json
status-config.json wasn't obviously associated with the old
nmubg-status, now notmuch-report. The new name is
${CONFIGURED_SCRIPT}.json, so the association should be clear.
W. Trevor King [Sat, 2 Jan 2016 06:08:02 +0000 (22:08 -0800)]
notmuch-report: Rename from nmbug-status
This script generates reports based on notmuch queries, and doesn't
really have anything to do with nmbug, except for sharing the NMBGIT
environment variable.
W. Trevor King [Sat, 2 Jan 2016 06:07:43 +0000 (22:07 -0800)]
status-config.json: Remove parens from query entry
These are now added by nmbug-status.
W. Trevor King [Sat, 2 Jan 2016 06:07:42 +0000 (22:07 -0800)]
nmbug-status: Wrap query phrases in parentheses when and-ing together
For example:
"query": ["tag:a", "tag:b or tag:c"]
is now converted to:
( tag:a ) and ( tag:b or tag:c )
instead of the old:
tag:a and tag:b or tag:c
This helps us avoid confusion due to Xapian's higher-precedence AND
[1], where the old query would be interpreted as:
( tag:a and tag:b ) or tag:c
[1]: http://xapian.org/docs/queryparser.html
W. Trevor King [Sat, 2 Jan 2016 06:07:41 +0000 (22:07 -0800)]
nmbug-status: Add meta.message-url config setting
So you can link to archives other than Gmane. For example, I'm doing
this in [1].
[1]: https://github.com/wking/nmbug-oci
Nicolas Petton [Wed, 16 Mar 2016 08:19:55 +0000 (09:19 +0100)]
emacs: Change the default notmuch-mua-reply-insert-header-p-function
Set notmuch-show-reply-insert-header-p-never as the default value for
notmuch-mua-reply-insert-header-p-function.
Michal Sojka [Tue, 29 Dec 2015 21:55:40 +0000 (22:55 +0100)]
doc/reply: Clarify how reply-to header is handled
Current documentation and comments in the code do not correspond to
the actual code and tests in the test suite ("Un-munging Reply-To" in
T230-reply-to-sender.sh). Fix it.
David Bremner [Fri, 29 Jan 2016 11:53:13 +0000 (07:53 -0400)]
test: canonicalize quotes in xapian error messages
These differ between 1.2 and 1.3, so we transform the 1.2 backquote to a
single quote for compatibility
David Bremner [Fri, 29 Jan 2016 11:53:11 +0000 (07:53 -0400)]
test: replace single giant term with large phrase
We only need a long string, not a single long term to trigger batch
mode. The giant term triggers a bug/incompatibility in Xapian 1.3.4
that throws an exception because it is longer than the Xapian term size
limit.
Tomi Ollila [Tue, 1 Mar 2016 19:30:07 +0000 (21:30 +0200)]
lib: NOTMUCH_DEPRECATED macro also for older compilers
Some compilers (older than gcc 4.5 and clang 2.9) do support
__attribute__ ((deprecated)) but not
__attribute__ ((deprecated("message"))).
Check if clang version is at least 3.0, or gcc version
is at least 4.5 to define NOTMUCH_DEPRECATED as the
latter variant above. Otherwise define NOTMUCH_DEPRECATED
as the former variant above.
For a bit simpler implementation clang 2.9 is not included
to use the newer variant. It is just one release, and the
older one works fine. Clang 3.0 was released around 2011-11
and gcc 5.1 2015-04-22 (therefore newer macro for gcc 4.5+)
Jani Nikula [Sun, 13 Mar 2016 12:27:17 +0000 (14:27 +0200)]
emacs: hello: promote '?' as the universal help key
Move the brief help text at the bottom of the hello screen to the
notmuch-hello-mode help, and promote '?' as the universal help key
across Notmuch. This unclutters the hello screen, and allows for a
more verbose description in the mode help. Hopefully, this change is
useful for both experienced and new users alike.
While at it, improve the links to Notmuch and hello screen
customization.
Justus Winter [Mon, 14 Mar 2016 19:29:08 +0000 (20:29 +0100)]
python: update the README
Signed-off-by: Justus Winter <justus@gnupg.org>
Tomi Ollila [Fri, 12 Feb 2016 19:17:00 +0000 (21:17 +0200)]
test/README: have matching test script file names
A while ago test script names were changed to format
Tddd-basename.sh. Update README to reflect that.
While at it, included some small requirements updates.
David Bremner [Sat, 13 Feb 2016 17:11:19 +0000 (13:11 -0400)]
STYLE: suggest long names
Hopefully the exceptions are common sense.
David Bremner [Sat, 13 Feb 2016 17:11:18 +0000 (13:11 -0400)]
STYLE: document some rules about variable declarations
No-one seemed opposed to C99 style loop variable declarations. The
requirement to declare variables at the top of blocks is maybe a little
more contested, but I believe it reflects the status quo.
Mark Walters [Tue, 23 Feb 2016 21:47:01 +0000 (21:47 +0000)]
NEWS: updates for reply changes
Also include NEWS for the filter/limit keybinding change.
David Edmondson [Sat, 20 Feb 2016 18:24:40 +0000 (18:24 +0000)]
emacs/mua: Let user specify which parts get a header in citations.
Add a customizable function specifying which parts get a header when
replying, and give some sensible possiblities. These are,
1) all parts except multipart/*. (Subparts of a multipart part do
receive a header button.)
2) only included text/* parts.
3) Exactly as in the show buffer.
4) None at all. This means the reply contains a mish-mash of all the
original message's parts.
In the test suite we set the choice to option 4 to match the
previous behaviour.
David Edmondson [Sat, 20 Feb 2016 18:24:39 +0000 (18:24 +0000)]
emacs/show: Remove the 'no-buttons option of `notmuch-show-insert-bodypart'
No code uses the 'no-buttons argument to
`notmuch-show-insert-bodypart', so remove it.
David Edmondson [Sat, 20 Feb 2016 18:24:38 +0000 (18:24 +0000)]
emacs/mua: Generate improved cited text for replies
Use the message display code to generate message text to cite in
replies.
For now we set insert-headers-p function to
notmuch-show-reply-insert-header-p-never so that, as before, we don't
insert part buttons.
With that choice of insert-headers-p function there is only one
failing test: this test has a text part (an email message) listed as
application/octet-stream. Notmuch show displays this part, but the
reply code omitted it as it had type application/octet-stream. The new
code correctly includes it. Thus update the expected output to match.
David Edmondson [Sat, 20 Feb 2016 18:24:37 +0000 (18:24 +0000)]
emacs/show: Accommodate the lack of part header buttons
Various pieces of code assumed (reasonably) that part header buttons
are present. Modify them to avoid problems if no part headers were
inserted.
David Edmondson [Sat, 20 Feb 2016 18:24:36 +0000 (18:24 +0000)]
emacs/show: Make the insertion of part headers overridable.
This allows callers of notmuch-show-insert-bodypart to use a `let'
binding to override the default function for specifying when part
headers should be inserted.
We also add an option to never show part buttons which will be used by
the test suites for the reply tests.
David Edmondson [Sat, 20 Feb 2016 18:24:35 +0000 (18:24 +0000)]
emacs/show: Re-arrange determination if a part header is necessary
Move the determination of whether a part header is required to a
distinct function.
David Edmondson [Thu, 11 Feb 2016 08:33:27 +0000 (08:33 +0000)]
emacs: Report a lack of matches when calling `notmuch-show'.
If the basic query passed to `notmuch-show' generates no results, ring
the bell and inform the user that no messages matched the query rather
than displaying an empty buffer and showing an obscure error.
Similarly when refreshing a `notmuch-show' buffer and no messages match.
Mark Walters [Sat, 13 Jun 2015 08:08:10 +0000 (09:08 +0100)]
emacs: Bind filter in search to 'l'
Change the key binding for filter (or "limit") in search-mode. This
gives consistency with the new filter in show-mode, and frees 'f' for
forward-thread in the future.
Tomi Ollila [Fri, 22 Jan 2016 22:01:53 +0000 (00:01 +0200)]
configure: pass HAVE_TIMEGM to build
Checking the existence of timegm() function and setting
configure internal variable ${have_timegm} was done, but
actually defining HAVE_TIMEGM in build was not done --
meaning that compat timegm() was always part of final
notmuch binaries.
David Bremner [Fri, 29 Jan 2016 11:53:12 +0000 (07:53 -0400)]
test: fix typo in informational message
Thanks to Olly Betts for noticing
David Edmondson [Sat, 6 Feb 2016 17:55:43 +0000 (17:55 +0000)]
emacs: Fix compiler warnings.
notmuch-mua.el should declare functions that it uses from
notmuch-maildir-fcc.el.
Daniel Kahn Gillmor [Wed, 10 Feb 2016 16:53:46 +0000 (11:53 -0500)]
notmuch.Database.remove_message should raise exception on failure
The notmuch python bindings document that database.remove_message
should raise an exception when the message removal fails, but they
don't actually do it.
David Bremner [Sun, 16 Aug 2015 17:41:16 +0000 (19:41 +0200)]
debian: add gpgsm as build dependency
It's not needed for the actual build, but it is needed to run the
SMIME tests; <!nocheck> means it can be omitted if the tests are not
going to be run.
Jameson Graef Rollins [Sun, 16 Aug 2015 17:41:15 +0000 (19:41 +0200)]
debian: Recommend gpgsm for S/MIME support
Jani Nikula [Sun, 16 Aug 2015 17:41:14 +0000 (19:41 +0200)]
cli: crypto: S/MIME verification support
notmuch-show --verify will now also process S/MIME multiparts if
encountered. Requires gmime-2.6 and gpgsm.
Based on work by Jameson Graef Rollins <jrollins@finestructure.net>.
David Bremner [Sun, 16 Aug 2015 17:41:13 +0000 (19:41 +0200)]
test: add broken S/MIME signature verification test for notmuch CLI
The test is pretty much cut and paste from the PGP/MIME version, with
obvious updates taken from notmuch output. This also requires setting
up gpgsm infrastucture.
David Bremner [Sun, 16 Aug 2015 17:41:12 +0000 (19:41 +0200)]
test: initial tests for S/MIME and notmuch-emacs
Test the ability of notmuch-mua-mail to send S/MIME signed (and
encrypted) messages; this really relies on existing functionality in
message-mode.
The generated keys and messages will later be useful for testing the
notmuch CLI.
David Bremner [Sat, 23 Jan 2016 12:49:26 +0000 (08:49 -0400)]
test: refactor directory name sanitization
test_C and notmuch_search_files_sanitize were giving different output on
the same path, which is not technically wrong, but slightly
confusing.
Daniel Kahn Gillmor [Fri, 15 Jan 2016 05:23:10 +0000 (00:23 -0500)]
clean up stray apostrophe in comment
This is a nit-picky orthographical fix for an nit-picky ontological
comment.
Daniel Kahn Gillmor [Fri, 15 Jan 2016 19:02:38 +0000 (14:02 -0500)]
correct comment referring to notmuch_database_remove_message
notmuch_database_remove_message has no leading underscore in its name.
Tomi Ollila [Wed, 6 Jan 2016 19:04:03 +0000 (21:04 +0200)]
devel/emacs: add devel/try-emacs-mua
devel/try-emacs-mua provides an easy way to try and experiment
with the notmuch emacs client distributed in emacs subdirectory of
the notmuch source tree.
try-emacs-mua starts a new emacs process and if initial checks pass
*scratch* buffer is filled with information of how to begin.
Normal emacs command line arguments can be used, like -q or -Q.
These arguments are appended verbatim to the starting emacs process.
If the emacs version in use is smaller than 24.4, special care is taken
to ensure that notmuch*.elc files older than corresponding .el files
are not loaded. Since emacs 24.4, setting `load-prefer-newer' variable
takes care of this.
W. Trevor King [Wed, 30 Dec 2015 21:04:13 +0000 (13:04 -0800)]
nmbug-status: Fix unbalanced <p> tags in default header/footer
These were broken by
b70386a4 (Move the generated date from the top of
the page to the footer, 2014-05-31), which moved 'Generated ...' to
the footer with the opening tag, but didn't replace the blurb opening
tag or add a closing tag after 'Generated ...'.
W. Trevor King [Thu, 7 Jan 2016 13:51:29 +0000 (05:51 -0800)]
nmbug-status: Style headers with smaller fonts
We only use h1 through h3, and David prefers smaller headers [1], so
shift over to the font sizes usually used for h2 through h4 [2,3,4].
I haven't bothered with the W3C's default margins, since a bit of
extra whitespace doesn't seem like a big deal.
[1]: id:87k2nl8r0k.fsf@zancas.localnet
http://article.gmane.org/gmane.mail.notmuch.general/21595
[2]: http://www.w3.org/TR/html-markup/h2.html
[3]: http://www.w3.org/TR/html-markup/h3.html
[4]: http://www.w3.org/TR/html-markup/h4.html
W. Trevor King [Wed, 30 Dec 2015 21:04:12 +0000 (13:04 -0800)]
nmbug-status: Adjust headers to start with h1
We've been leading off with h2s since
3e5fb88f (contrib/nmbug: add
nmbug-status script, 2012-07-07), but the semantically-correct headers
are:
<h1>{title}</h1>
...
<h2>Views</h2>
...
<h3>View 1</h3>
...
<h3>View 2</h3>
...
We can always add additional CSS if the default h1 formatting is too
intense.
Justus Winter [Fri, 8 Jan 2016 12:56:10 +0000 (13:56 +0100)]
python: cleanup imports
Drop unused imports, and avoid warning about unused imports when we
import something on behalf of another module.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Justus Winter [Fri, 8 Jan 2016 11:27:20 +0000 (12:27 +0100)]
python: Remove {Filenames,Threads}.__len__
Remove the __len__ functions, as they exhaust the iterator, breaking
'list(x)'.
This is a follow-up to
8866a89e.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Justus Winter [Thu, 24 Dec 2015 12:57:21 +0000 (13:57 +0100)]
python: update bindings for the new query search API
Use 'notmuch_query_search_{threads,messages}_st' instead of their
deprecated counterpart.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Justus Winter [Thu, 24 Dec 2015 11:51:30 +0000 (12:51 +0100)]
python: add new errors
Add support for the new notmuch status codes UNSUPPORTED_OPERATION,
UPGRADE_REQUIRED, and PATH_ERROR.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Justus Winter [Thu, 24 Dec 2015 11:41:24 +0000 (12:41 +0100)]
python: add missing import
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Michal Sojka [Wed, 6 Jan 2016 21:28:45 +0000 (22:28 +0100)]
emacs: Don't use nconc on quoted list
As pointed out by David Bremner, Elisp manual says "A common pitfall
is to use a quoted constant list as a non-last argument to ‘nconc’."
Since this was the case in recently added code, we fix it here.
Michal Sojka [Sat, 2 Jan 2016 16:47:45 +0000 (17:47 +0100)]
emacs: Handle switch-function argument of notmuch-mua-mail
notmuch-mua-mail ignored the switch-function argument and always used
the function returned by notmuch-mua-get-switch-function instead. In
order to support standard emacs interfaces (compose-mail in this
case), this commit changes notmuch-mua-mail to use the switch-function
argument if it is non-nil and notmuch-mua-get-switch-function
otherwise.
Michal Sojka [Sat, 2 Jan 2016 16:47:44 +0000 (17:47 +0100)]
emacs: Refactor notmuch-mua-mail
This should be more readable.
Michal Sojka [Sat, 2 Jan 2016 16:47:43 +0000 (17:47 +0100)]
emacs: Fix mail composition under Emacs 23
Commit
570c0aeb40bd0c3af8174624a55e968f62c44f09 reworked
notmuch-mua-mail function in a way that worked only under Emacs 24.
The reason was that message-setup-1 took one argument less in Emacs
23.
We fix this by only supplying the return-action argument when it is
actually set by the caller.
Daniel Kahn Gillmor [Sat, 12 Dec 2015 19:22:12 +0000 (14:22 -0500)]
python: fix argument for filenames_destroy
W. Trevor King [Sat, 2 Jan 2016 06:07:40 +0000 (22:07 -0800)]
NEWS: Remove trailing comma from an old nmbug-status config
That closing brace is the end of the config JSON; there won't be
anything coming after it.
W. Trevor King [Sat, 2 Jan 2016 06:08:01 +0000 (22:08 -0800)]
nmbug-status: Avoid hard-coded filename in error message
We already have a 'filename' variable with the name, so stay DRY and
use that variable here.
Also fix a missing-whitespace error from
bed8b674 (nmbug-status:
Clarify errors for illegible configs, 2014-05-10), wrapping on the
sentence to match similar error-generation earlier in this function.
Michal Sojka [Mon, 21 Dec 2015 09:41:15 +0000 (10:41 +0100)]
emacs: Improve notmuch-message-mode initialization
Recent addition of notmuch-message-mode introduced several problems:
1. When message-setup-hook is used to set buffer local variables,
these settings are not effective, because all buffer local
variables are immediately erased by notmuch-message-mode
initialization.
2. message-mode-hook gets invoked twice - first when message-mail
invokes message-mode and second when notmuch-mua-mail invokes
notmuch-message-mode.
This commit fixes these problems by replacing a call to message-mail
with notmuch-specific code that is (hopefully) equivalent to
message-mail functionality before introduction of
notmuch-message-mode.
We first initialize notmuch-message-mode with
notmuch-mua-pop-to-buffer, which is a modified version of
message-pop-to-buffer and then call message-setup-1, which is the only
functionality of message-mail that is needed for notmuch.
Jani Nikula [Tue, 3 Nov 2015 19:49:29 +0000 (21:49 +0200)]
cli: fix function name in notmuch new debug logging
add_files_recursive has been renamed add_files long ago.
Jani Nikula [Mon, 14 Dec 2015 13:38:52 +0000 (09:38 -0400)]
cli: let the user know which protocol is unknown or unsupported
The current error message is not helpful.
Jani Nikula [Mon, 14 Dec 2015 13:38:51 +0000 (09:38 -0400)]
crypto: make crypto ctx initialization an array
Make it trivial to add handlers for new protocols without duplicating
code. No functional changes.
Jani Nikula [Mon, 14 Dec 2015 13:38:50 +0000 (09:38 -0400)]
crypto: refactor context creation to facilitate further work
Let the context creation functions decide how to handle multiple calls
and cache the crypto context. No functional changes.
Michal Sojka [Tue, 29 Dec 2015 08:52:17 +0000 (09:52 +0100)]
test: Unset ALTERNATE_EDITOR before running emacsclient
ALTERNATE_EDITOR causes emacsclient to run an alternate editor if the
emacs server is not ready. This can collide with intended
functionality in test-lib.sh.
If the ALTERNATE_EDITOR is set but empty, emacsclient runs emacs
daemon and tries to connect to it. When this happens the emacs run by
test-lib.sh fails to start the server and the subsequent attempts to
use the server fail because the daemon started by emacsclient does not
know about notmuch-test-progn. This leads to test suite failure due to
time out on any emacs test.
Michal Sojka [Tue, 29 Dec 2015 09:30:26 +0000 (10:30 +0100)]
test: Always use paths without symlinks
When notmuch sources are at a symlinked path, some tests fail because
one part of the test uses physical path and another uses logical
path (with symlinks). For example the following test output is
produced when the test is started from /home/src/symlink-to-notmuch,
which is a symlink to /home/src/notmuch.
FAIL notmuch-fcc-dirs set to a string
--- T310-emacs.26.OUTPUT 2015-12-29 08:54:29.
055878637 +0000
+++ T310-emacs.26.EXPECTED 2015-12-29 08:54:29.
055878637 +0000
@@ -1,5 +1,5 @@
From: Notmuch Test Suite <test_suite@notmuchmail.org>
To:
Subject:
-Fcc: /home/src/notmuch/test/tmp.T310-emacs/mail/sent-string
+Fcc: /home/src/symlink-to-notmuch/test/tmp.T310-emacs/mail/sent-string
--text follows this line--
nil
This commit makes all paths in test scripts physical. With it, all
tests pass even when run from a symlinked directory.
Daniel Kahn Gillmor [Thu, 10 Dec 2015 02:16:40 +0000 (21:16 -0500)]
python: add notmuch.Database.status_string()
This gives some additional access to debugging information when using
the python bindings.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
David Bremner [Sun, 6 Dec 2015 15:59:57 +0000 (11:59 -0400)]
configure: drop use of "pkg-config emacs"
This does not play well with --prefix. As Tomi notes in
id:m2k2p2rwth.fsf@guru.guru-group.fi, people still have the option of e.g.
% ./configure ---emacslispdir=`pkg-config emacs --variable sitepkglispdir`
David Bremner [Mon, 23 Nov 2015 12:40:40 +0000 (08:40 -0400)]
Merge branch 'release'
Merge bugfixes applied directly to release
Mark Walters [Wed, 28 Oct 2015 18:28:39 +0000 (18:28 +0000)]
emacs: poll: return useful errors when poll fails.
Previously poll called from emacs would fail silently. This makes it
return a useful error message.
In the non-deprecated case of notmuch new and appropriate hooks, it
uses notmuch-call-notmuch-process which gives an error and
additionally puts the stdout/stderr etc in the *Notmuch errors*
buffer.
In the deprecated case of a custom poll script it only returns an
error message.
Commit based on a bug report, and a potential fix, by Ketil Malde.
Mark Walters [Thu, 12 Nov 2015 11:02:19 +0000 (11:02 +0000)]
emacs: hello: fix accidental modification of widget-keymap
In emacs24 we use make-composed-keymap. It seems that if only a single
map is specified then emacs just resuses it rather than creating a
copy of it. Thus use make-sparse-keymap to force a copy.
Steven Allen [Sun, 25 Oct 2015 21:30:39 +0000 (17:30 -0400)]
forbid atomic transactions on writable, upgradable databases
We can't (but currently do) allow upgrades within transactions because
upgrades need their own transactions. We don't want to re-use the
current transaction because bailing out of an upgrade would mean loosing
all previous changes (because our "atomic" transactions don't commit
before hand). This gives us two options:
1. Fail at the beginning of upgrade (tell the user to end the
transaction, upgrade, and start over).
2. Don't allow the user to start the transaction.
I went with the latter because:
1. There is no reason to call `begin_atomic` unless you intend to to
write to the database and anyone intending to write to the database
should upgrade it first.
2. This means that nothing inside an atomic transaction can ever fail
with NOTMUCH_STATUS_UPGRADE_REQUIRED.
Tomi Ollila [Fri, 25 Sep 2015 21:45:39 +0000 (00:45 +0300)]
emacs/Makefile.local: notmuch-lib.elc depend on notmuch-version.elc
emacs/make-depend.el will compute all other related dependencies
except this one:
notmuch-version is not top-level `require' expression in
notmuc-lib.el[c] but conditional based on the existence of
notmuch-version.el[c].
emacs/make-depend.el does not know now notmuch-version.el[c] becomes
into existence but emacs/Makefile.local does know.
David Bremner [Sat, 19 Sep 2015 15:45:42 +0000 (12:45 -0300)]
test: add sanity tests for threading
These tests are inspired by a problem report
id:CAJhTkNh7_hXDLsAGyD7nwkXV4ca6ymkLtFG945USvfqK4ZJEdQ@mail.gmail.com
Of course I can't duplicate the mentioned problem, it probably depends
on specific message data.
Tomi Ollila [Wed, 2 Sep 2015 14:34:39 +0000 (17:34 +0300)]
emacs: notmuch-show-view-raw-message clears buffer, makes it read-only
notmuch-show-view-raw-message() re-uses buffer created with same
name (same Message-Id:) but it did not erase it before filling.
If this ever happened, there were duplicated (potentially overlapping)
content in the buffer. Now this is fixed.
Apparently since emacs 24.5 the (view-buffer) makes the buffer read-only;
so this problem would not have happened there, just that
notmuch-show-view-raw-message() failed. This is fixed by setting
inhibit-read-only t before erasing and filling the buffer. The emacs 24.5
feature having raw message buffer read-only is also now explicitly set to
the buffer so the same experience is available with emaces < 24.5.
Daniel Schoepe [Tue, 11 Aug 2015 08:02:16 +0000 (10:02 +0200)]
test: Tests for combining --batch and --remove-all
This patch adds some tests for combining --remove-all with --batch or
--input when calling notmuch-tag.
Daniel Schoepe [Tue, 11 Aug 2015 07:46:37 +0000 (09:46 +0200)]
cli: Allow combining --remove-all and --batch
This patch removes the restriction on notmuch-tag that disallows using
both --remove-all and --batch. Combining the two options removes tags
on all messages affected by each query before applying the new tags.
Jani Nikula [Sat, 26 Sep 2015 09:35:22 +0000 (12:35 +0300)]
cli: content disposition values are not case-sensitive
Per RFC 2183, the values for Content-Disposition values are not
case-sensitive. While at it, use the gmime function for getting at the
disposition string instead of referencing the field directly.
This fixes attachment display and quoting in notmuch show and reply,
respectively.
Jani Nikula [Sat, 26 Sep 2015 09:35:21 +0000 (12:35 +0300)]
lib: content disposition values are not case-sensitive
Per RFC 2183, the values for Content-Disposition values are not
case-sensitive. While at it, use the gmime function for getting at the
disposition string instead of referencing the field directly.
This fixes "attachment" tagging and filename term generation for
attachments while indexing.
David Bremner [Tue, 6 Oct 2015 10:20:46 +0000 (07:20 -0300)]
tests: add test for case insensitive Content-Disposition
This is broken now, but will be fixed in the next commit
Tomi Ollila [Sun, 4 Oct 2015 18:59:42 +0000 (21:59 +0300)]
notmuch-emacs-mua: set EMACS{,CLIENT} variables to defaults when empty
... in addition to doing this when these variables are unset.
It is more useful to use defaults (emacs or emacsclient) than empty
string as a command name.
Tomi Ollila [Sun, 1 Nov 2015 13:41:55 +0000 (15:41 +0200)]
devel/release-checks: added checking of copyright year in documentation
Check that copyright year will be current year in generated documentation.
Checking is done my matching that copyright line contains current year
as a substring which is good enough "approximation" in this context.
David Bremner [Thu, 19 Nov 2015 11:33:01 +0000 (07:33 -0400)]
Merge branch 'release'
David Bremner [Sat, 14 Nov 2015 23:08:12 +0000 (19:08 -0400)]
debian: another upload to work around gdb bugs
David Bremner [Thu, 12 Nov 2015 13:01:09 +0000 (09:01 -0400)]
debian: release 0.21-2, architecture specific fixups
Michal Sojka [Tue, 3 Nov 2015 21:02:12 +0000 (22:02 +0100)]
emacs: Make notmuch-message-mode play nicely with flyspell
Flyspell mode uses a special setting for message-mode to not
spell-check message headers except Subject. Apply this setting also to
notmuch-message-mode.
H. J. Illikainen [Wed, 4 Nov 2015 22:44:00 +0000 (05:44 +0700)]
emacs: Fontify From with message-header-other
Commit
e26d767897e8ab59f05808a12ac5c9c1e3c7030f changed the
fontification of the body associated with the From header to
message-header-from. However, that face is non-existent, and in
message.el (message-font-lock-keywords) the From-header falls through
and is attributed the message-header-other face.
This commit removes the fontification of the [Ff]rom header in
notmuch-show-mode in order to fontify it using the message-header-other
face.
This only affects non-default configurations where
notmuch-message-headers is set to display From.
David Bremner [Fri, 30 Oct 2015 10:33:48 +0000 (07:33 -0300)]
Merge tag '0.21'
notmuch 0.21 release
David Bremner [Fri, 30 Oct 2015 10:12:50 +0000 (07:12 -0300)]
release: disable wget certificate check
this is a minor security hole, but no worse than what we had before. In
particular the worst that happens is someone prevents us from making a
release. Which is hardly worth the trouble of jacking the URL.
David Bremner [Thu, 29 Oct 2015 23:08:11 +0000 (20:08 -0300)]
NEWS: set date
David Bremner [Thu, 29 Oct 2015 23:07:04 +0000 (20:07 -0300)]
debian: changelog stanza for 0.21
David Bremner [Thu, 29 Oct 2015 22:57:30 +0000 (19:57 -0300)]
version: bump to 0.21
Mark Walters [Thu, 29 Oct 2015 18:41:27 +0000 (18:41 +0000)]
NEWS updates for some extra emacs functionality
Steven Allen [Fri, 23 Oct 2015 18:37:26 +0000 (14:37 -0400)]
Documentation: fix type name spelling
Michal Sojka [Mon, 26 Oct 2015 23:22:49 +0000 (00:22 +0100)]
Emacs: Add address completion based on company-mode
When company-mode is available (Emacs >= 24), address completion
candidates are shown in a nice popup box. This is triggered either by
pressing TAB or by waiting a while during typing an address. The
completion is based entirely on the asynchronous address harvesting
from notmuch-address.el so the GUI is theoretically not blocked for
long time.
The completion works similarly as the TAB-initiated completion from
notmuch-address.el, i.e. quick harvest based on user input is executed
first and only after full harvesting is finished, in-memory cached data
is used.
[Improved by David Bremner]