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]
Michal Sojka [Mon, 26 Oct 2015 23:22:48 +0000 (00:22 +0100)]
Emacs: Add address completion mechanism implemented in elisp
Currently, notmuch has an address completion mechanism that requires
external command to provide completion candidates. This commit adds a
completion mechanism inspired by https://github.com/tjim/nevermore,
which is implemented in Emacs lisp only.
The preexisting address completion mechanism, activated by pressing
TAB on To/Cc lines, is extended to use the new mechanism when
notmuch-address-command to 'internal, which is the new default.
The core of the new mechanism is the function notmuch-address-harvest,
which collects the completion candidates from the notmuch database and
stores them in notmuch-address-completions variable. The address
harvesting can run either synchronously (same as with the previous
mechanism) or asynchronously. When the user presses TAB for the first
time, synchronous harvesting limited to user entered text is performed.
If the entered text is reasonably long, this operation is relatively
fast. Then, asynchronous harvesting over the full database is triggered.
This operation may take long time (minutes on rotating disk). After it
finishes, no harvesting is normally performed again and subsequent
completion requests use the harvested data cached in memory. Completion
cache is updated after 24 hours.
Note that this commit restores (different) completion functionality for
users when the user used external command named "notmuch-addresses",
i.e. the old default. The result will be that the user will use
the new mechanism instead of this command. I believe that many users may
not even recognize this because the new mechanism works the same as
http://commonmeasure.org/~jkr/git/notmuch_addresses.git and perhaps also
as other commands suggested at
http://notmuchmail.org/emacstips/#address_completion.
[This feature was significantly improved by David Bremner and Mark Walters]
David Bremner [Mon, 26 Oct 2015 23:22:47 +0000 (00:22 +0100)]
emacs: replace use of notmuch-address-message-insinuate
This allows e.g. Gnus users to load this file without changing
message-mode behaviour.
This will disable completion for those that did not customize the
variable but relied on the existence of a file named "notmuch-addresses"
in their path. In the next commit the default behaviour will change to
use a "workalike" internal completion mechanism.
David Bremner [Mon, 26 Oct 2015 01:09:56 +0000 (22:09 -0300)]
debian: release 0.21~rc3-3
Build-conflict with gdb-minimal, since there is no gdb-python to depend
on
David Bremner [Sun, 25 Oct 2015 16:44:06 +0000 (13:44 -0300)]
debian: bug fix upload for #802952
David Bremner [Fri, 23 Oct 2015 10:54:29 +0000 (07:54 -0300)]
debian: start changelog entry for 0.21
David Bremner [Thu, 22 Oct 2015 11:01:19 +0000 (08:01 -0300)]
NEWS: trim discussion of keybindings
Try to reduce the total size of NEWS
David Bremner [Thu, 22 Oct 2015 10:47:43 +0000 (07:47 -0300)]
version: bump to 0.21~rc3
Mark Walters [Wed, 21 Oct 2015 18:40:41 +0000 (19:40 +0100)]
NEWS for minor emacs updates
This adds NEWS items for
the new limit/filter function in notmuch-show,
the saved-search option for tree view,
the binding S to run the current tree-view search in notmuch-search,
the increase in max text part size
the bugfix for replying to encrypted messages from tree view
Mark Walters [Wed, 21 Oct 2015 18:51:37 +0000 (19:51 +0100)]
emacs: hello: bugfix: update docs for saved-searches
Update the documentation string for notmuch-saved-searches to include
the new :search-type option.
Jani Nikula [Sat, 17 Oct 2015 21:03:35 +0000 (00:03 +0300)]
completion: complete lastmod: search prefix
Jani Nikula [Sat, 17 Oct 2015 16:30:03 +0000 (19:30 +0300)]
completion: clean up top level completion
Add note about missing features.
Jani Nikula [Sat, 17 Oct 2015 16:30:02 +0000 (19:30 +0300)]
completion: complete shared options for each command
Add support for completing --help, --uuid=, and --version after the
subcommand. Do not support shared options at the top level yet due to
difficulties in handling options with arguments.
--uuid necessitates adding 'compopt -o nospace' also to notmuch new
completion, but that just brings it in line with the rest.
Jani Nikula [Sat, 17 Oct 2015 16:30:01 +0000 (19:30 +0300)]
completion: complete notmuch count --lastmod
Jani Nikula [Sat, 26 Sep 2015 11:12:50 +0000 (14:12 +0300)]
completion: handle notmuch address --deduplicate= option
Complete notmuch address --deduplicate=(no|mailbox|address).
Mark Walters [Wed, 14 Oct 2015 08:38:23 +0000 (09:38 +0100)]
emacs: tree: bind S to run current query in search mode
Mark Walters [Wed, 14 Oct 2015 08:38:22 +0000 (09:38 +0100)]
emacs: allow saved searches to select tree-view
This patch allows the user to customize a saved search to choose tree
view rather than the default search view. It also updates notmuch-jump
so that it respects this choice.
Jani Nikula [Sat, 17 Oct 2015 20:58:48 +0000 (23:58 +0300)]
man: clarify the parameters for lastmod: range query
<since> and <until> for the lastmod: prefix right below the date:
prefix description give the impression one could use last modified
dates to lastmod: which is not at all the case. Use
<initial-revision>..<final-revision> instead.
Tomi Ollila [Mon, 19 Oct 2015 18:09:21 +0000 (21:09 +0300)]
NEWS: a few formatting updates for 0.21 news items (wiki compatibility)
Trailing dots were removed from 3 NEWS items so that those appear in
same level as surrounding "heading" lines in generated wiki page.
One trailing dot was added to nmbug-status item so it appears as normal
text in generated wiki page. `nmbug-status` was put in backticks so it
looks the same as in older nmbug-status news text.
David Bremner [Mon, 19 Oct 2015 10:26:04 +0000 (07:26 -0300)]
debian: changelog stanza for 0.21~rc2-1
David Bremner [Mon, 19 Oct 2015 10:12:18 +0000 (07:12 -0300)]
version: bump to 0.21~rc2
Jani Nikula [Sat, 17 Oct 2015 13:06:53 +0000 (16:06 +0300)]
NEWS: news for notmuch_directory_delete
Jani Nikula [Sat, 17 Oct 2015 13:06:52 +0000 (16:06 +0300)]
NEWS: news for notmuch address --deduplicate option
Jani Nikula [Sat, 17 Oct 2015 13:06:51 +0000 (16:06 +0300)]
NEWS: news for date:<expr>..!
Jani Nikula [Sat, 17 Oct 2015 13:06:50 +0000 (16:06 +0300)]
NEWS: nmbug-status supports sort order
David Bremner [Sat, 17 Oct 2015 13:06:01 +0000 (10:06 -0300)]
NEWS: note some Emacs UI changes for 0.21
David Bremner [Sat, 17 Oct 2015 13:01:01 +0000 (10:01 -0300)]
NEWS: new count api / deprecated count/search functions for 0.21
David Bremner [Sat, 17 Oct 2015 12:57:40 +0000 (09:57 -0300)]
NEWS: note some build system changes for 0.21
The ruby bindings changes in particular will be user visible. The
skipped tests status may also be interesting for packagers
David Bremner [Sat, 17 Oct 2015 12:39:19 +0000 (09:39 -0300)]
NEWS: news for initial revision tracking support (0.21)
Mark Walters [Thu, 15 Oct 2015 18:53:09 +0000 (19:53 +0100)]
emacs: show: increase default max-text-part-size
Currently notmuch-show-max-text-part-size is 10000 which means some
relatively normal messages have all parts hidden by default. Increase
this to 100000 by default.
The setting was introduced to alleviate problems with notmuch being
very slow on large threads. Users hitting these problems may wish to
customize this variable to something smaller (like 10000).
Mark Walters [Thu, 15 Oct 2015 18:46:34 +0000 (19:46 +0100)]
emacs: tree bugfix
Formerly replying to an encrypted message in tree-view did not work:
the message was not decrypted. This commit makes notmuch-tree respect
the setting of notmuch-crypto-process-mime. In particular, if
notmuch-crypto-process-mime is set to t, then replying to encrypted
messages in tree mode will now decrypt the reply (as it already did in
show mode).
Tomi Ollila [Thu, 15 Oct 2015 17:57:43 +0000 (20:57 +0300)]
doc: update copyright year to contain range 2009-2015
Now it is accurate and provides more information to the
reader of the documents.
David Bremner [Thu, 15 Oct 2015 13:09:24 +0000 (10:09 -0300)]
debian: update symbols file
we are only adding symbols, which is exactly the interesting case for a
symbols file.
David Bremner [Thu, 15 Oct 2015 11:16:26 +0000 (08:16 -0300)]
version: bump to 0.21~rc1
David Bremner [Thu, 15 Oct 2015 11:14:19 +0000 (08:14 -0300)]
debian: update changelogs for pre-release
a sensible changelog can wait for upstream NEWS to be updated
Jani Nikula [Fri, 25 Sep 2015 20:48:46 +0000 (23:48 +0300)]
cli: delete directory documents on directory removal
There was a problem with the directory documents being left behind when
the filesystem directory was removed. This was worked around in [1].
However, that ignored the fact that the directory documents are also
still listed by notmuch_directory_get_child_directories() leading to
confusing results when running notmuch new. The directory documents are
found and queued for removal over and over again.
Fix the problem for real by removing the directory documents. This fixes
the tests flagged as broken in [2].
The (non-deterministic) hack test from [3] also still passes with this
change.
[1] commit
acd66cdec075312944e527febd46382e54d99367
[2] commit
ed9ceda623d3f22fb66365b33db63c5c982067d3
[3] id:
1441445731-4362-1-git-send-email-jani@nikula.org
Jani Nikula [Fri, 25 Sep 2015 20:48:45 +0000 (23:48 +0300)]
lib: add interface to delete directory documents
As mentioned in
acd66cdec075312944e527febd46382e54d99367 we don't have
an interface to delete directory documents, and they're left behind. Add
the interface.
Jani Nikula [Fri, 25 Sep 2015 20:48:44 +0000 (23:48 +0300)]
test: flag one more notmuch new test as broken
Drop the test update added in [1] and mark the test as broken, like the
tests flagged as broken in [2]. These all reflect the same underlying
breakage with (lack of) directory deletion.
[1] commit
e4e04bbc328f990e36b77f508aef904d156029b1
[2] commit
ed9ceda623d3f22fb66365b33db63c5c982067d3
David Bremner [Mon, 5 Oct 2015 23:16:59 +0000 (20:16 -0300)]
lib: update doxygen comments to add @since for the new _st API
We should probably to this for all new functions introduced from now on.
David Bremner [Sun, 27 Sep 2015 15:32:03 +0000 (12:32 -0300)]
ruby: use new query_search API
These changes should not be too surprising for users because the
routines were already potentially throwing exceptions.
David Bremner [Sun, 27 Sep 2015 15:32:02 +0000 (12:32 -0300)]
lib: migrate thread.cc to new query_search API
here we rely on thread_id_query being attached to the local talloc
context, so no new cleanup code is needed.
David Bremner [Sun, 27 Sep 2015 15:32:01 +0000 (12:32 -0300)]
lib: migrate notmuch_database_upgrade to new query_search API
Here we depend on the error path cleaning up query
David Bremner [Sun, 27 Sep 2015 15:32:00 +0000 (12:32 -0300)]
python: update bindings for new count API
Note that any mismatches are not detected until runtime (if at all)
with the python bindings, so tests are crucial
David Bremner [Sun, 27 Sep 2015 15:31:59 +0000 (12:31 -0300)]
ruby: use new count API
This change of replacing ignoring errors with exceptions is intended,
and indeed one of the main motivations for the libnotmuch API changes.
David Bremner [Sun, 27 Sep 2015 15:31:58 +0000 (12:31 -0300)]
cli: update to use new count API
Essentially replace each call to notmuch_count_* with the corresponding
_st call, followed by print_status_query.
David Bremner [Sun, 27 Sep 2015 15:31:57 +0000 (12:31 -0300)]
lib: add versions of n_q_count_{message,threads} with status return
Although I think it's a pretty bad idea to continue using the old API,
this allows both a more gentle transition for clients of the library,
and allows us to break one monolithic change into a series
David Bremner [Sun, 27 Sep 2015 15:31:56 +0000 (12:31 -0300)]
cli/count: simplify and document return value of print_count
Essentially a cosmetic change.
David Bremner [Sun, 27 Sep 2015 15:31:55 +0000 (12:31 -0300)]
lib: move query variable to function scope
This is a prelude to deallocating it (if necessary) on the error path.
Jani Nikula [Sat, 3 Oct 2015 07:57:56 +0000 (10:57 +0300)]
nmbug-status: print config errors to stderr
Particularly scripted usage with stdout redirection can be confusing
if errors are printed to stdout instead of stderr.
Tomi Ollila [Wed, 30 Sep 2015 06:36:52 +0000 (09:36 +0300)]
notmuch-emacs-mua: make --auto-daemon imply --create-frame
Before this change with --auto-daemon but without --create-frame
emacs server was started but no clients stay connected to it
(in both graphical and terminal displays).
Note that this changes how --client --auto-daemon works on
graphical display; New emacs frame is now created for the
message (and message-exit-actions hook appended).
Jani Nikula [Sat, 15 Aug 2015 09:05:15 +0000 (12:05 +0300)]
notmuch-emacs-mua: do not create a frame by default with --client
Make the default behaviour for --client the same as emacsclient
default: do not create a new frame. Add a new option --create-frame,
passing the same option to emacsclient to create a frame.
Jani Nikula [Sat, 15 Aug 2015 09:05:14 +0000 (12:05 +0300)]
notmuch-emacs-mua: add --auto-daemon option to start Emacs daemon as needed
Automatically starting Emacs in daemon mode if the Emacs server is not
running is a matter of preference better not hard coded in
notmuch-emacs-mua. Add an option to control the behaviour.
Jani Nikula [Sat, 15 Aug 2015 09:05:13 +0000 (12:05 +0300)]
notmuch-emacs-mua: move --client option handling around
Move --client handling to a more suitable location. No functional
changes.
Jani Nikula [Sat, 15 Aug 2015 09:05:12 +0000 (12:05 +0300)]
notmuch-emacs-mua: support --no-window-system also for non-client
Clearly --no-window-system should be applicable without --client as
well. Prepare for future changes with the naming of the variables.
Jani Nikula [Sat, 15 Aug 2015 09:05:11 +0000 (12:05 +0300)]
man: clean up notmuch-emacs-mua man page
Move --client description to a more suitable location, stylistic
changes.
Jani Nikula [Fri, 25 Sep 2015 18:47:35 +0000 (21:47 +0300)]
cli: use designated initializer to initialize add_files_state
The side effect is that all of add_files_state will be initialized to
zero, removing any lingering doubt that some of it might not be
initialized. It's not a small struct, and the initialization is
scattered around a bit, so this makes the code more readable.
Jani Nikula [Sat, 26 Sep 2015 11:37:51 +0000 (14:37 +0300)]
nmbug-status: add support for specifying sort order for each view
Let each view have a "sort" key, typically used with values
"oldest-first" or "newest-first" (although all values in Query.SORT
are accepted), and sort the results accordingly. Oldest first remains
the default.
The dynamic approach of mapping sort values is as suggested by
W. Trevor King <wking@tremily.us>.
David Bremner [Sat, 26 Sep 2015 13:31:50 +0000 (10:31 -0300)]
Merge branch 'release'
bring debian specific changes into master
David Bremner [Sat, 26 Sep 2015 12:27:34 +0000 (09:27 -0300)]
debian: changelog stanza for 0.20.2-2
David Bremner [Sat, 26 Sep 2015 12:22:11 +0000 (09:22 -0300)]
debian: fix linking in emacsen-install script
When upgrading emacs, the install file can (apparently) be called with
the lisp files already linked into the flavour specific
directories. In this case we should not fail.
Jani Nikula [Thu, 3 Sep 2015 19:40:05 +0000 (22:40 +0300)]
cli: do not sort addresses on --output=count or --deduplicate=address
The order of the results with --output=count and --deduplicate=address
are unspecified as they're based on a hash table traversal. This being
the case, optimize the query by explicitly requesting unsorted
results. Clarify the documentation accordingly.
Jani Nikula [Thu, 3 Sep 2015 19:40:04 +0000 (22:40 +0300)]
man: document notmuch address --deduplicate=address option
Document the deduplication based on case insensitive address.
Jani Nikula [Fri, 25 Sep 2015 17:08:09 +0000 (20:08 +0300)]
test: add notmuch address --deduplicate=(no|mailbox|address) tests
First a simple smoke test first, next generate messages with multiple
email address variants and check the behaviour of deduplication
schemes with these.
Jani Nikula [Thu, 3 Sep 2015 19:40:03 +0000 (22:40 +0300)]
cli: add support for deduplicating based on case insensitive address
Consider all variants of an email address as one, and print the most
common variant.
Jani Nikula [Fri, 25 Sep 2015 16:48:20 +0000 (19:48 +0300)]
cli: change the data structure for notmuch address deduplication
Currently we key the address hash table with the case sensitive "name
<address>". Switch to case insensitive keying with just address, and
store the case sensitive name and address in linked lists. This will
be helpful in adding support for different deduplication schemes in
the future.
There will be a slight performance penalty for the current full case
sensitive name + address deduplication, but this is simpler as a whole
when other deduplication schemes are added, and I expect the schemes
to be added to become more popular than the current default.
Aparet from the possible performance penalty, the only user visible
change should be the change in the output ordering for
--output=count. The order is not guaranteed (and is based on hash
table traversal) currently anyway, so this should be of no
consequence.