Commit graph

4695 commits

Author SHA1 Message Date
Michal Sojka
4acbc1f7d3 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]
2015-10-27 08:01:15 -03:00
Michal Sojka
89f78d38c1 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]
2015-10-27 08:01:05 -03:00
David Bremner
0e671478c6 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.
2015-10-27 08:00:49 -03:00
David Bremner
6814a1cf73 debian: release 0.21~rc3-3
Build-conflict with gdb-minimal, since there is no gdb-python to depend
on
2015-10-25 22:09:56 -03:00
David Bremner
dea50d94fa debian: bug fix upload for #802952 2015-10-25 13:44:06 -03:00
David Bremner
9fce0e2c79 debian: start changelog entry for 0.21 2015-10-23 07:54:29 -03:00
David Bremner
e387c08599 NEWS: trim discussion of keybindings
Try to reduce the total size of NEWS
2015-10-22 09:19:21 -03:00
David Bremner
246d540dbe version: bump to 0.21~rc3 2015-10-22 09:19:21 -03:00
Mark Walters
429ec8666e 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
2015-10-22 07:44:13 -03:00
Mark Walters
32becfa37a emacs: hello: bugfix: update docs for saved-searches
Update the documentation string for notmuch-saved-searches to include
the new :search-type option.
2015-10-22 07:43:54 -03:00
Jani Nikula
4cff5a9f98 completion: complete lastmod: search prefix 2015-10-21 21:30:15 -03:00
Jani Nikula
23180439cb completion: clean up top level completion
Add note about missing features.
2015-10-21 21:29:53 -03:00
Jani Nikula
cd4814ecb3 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.
2015-10-21 21:29:20 -03:00
Jani Nikula
326824aee3 completion: complete notmuch count --lastmod 2015-10-21 21:22:02 -03:00
Jani Nikula
ddbda8f501 completion: handle notmuch address --deduplicate= option
Complete notmuch address --deduplicate=(no|mailbox|address).
2015-10-21 21:21:45 -03:00
Mark Walters
f9d2ccf67b emacs: tree: bind S to run current query in search mode 2015-10-21 09:14:07 -03:00
Mark Walters
391d9f9420 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.
2015-10-21 09:13:55 -03:00
Jani Nikula
bf719963a7 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.
2015-10-21 09:13:33 -03:00
Tomi Ollila
d689a73e6d 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.
2015-10-21 09:13:01 -03:00
David Bremner
8285f9b145 debian: changelog stanza for 0.21~rc2-1 2015-10-19 07:26:04 -03:00
David Bremner
34e620b91d version: bump to 0.21~rc2 2015-10-19 07:12:18 -03:00
Jani Nikula
ea66dec878 NEWS: news for notmuch_directory_delete 2015-10-17 16:54:43 -03:00
Jani Nikula
25676b6201 NEWS: news for notmuch address --deduplicate option 2015-10-17 16:52:23 -03:00
Jani Nikula
4135e5b929 NEWS: news for date:<expr>..! 2015-10-17 16:50:06 -03:00
Jani Nikula
2c202df6ba NEWS: nmbug-status supports sort order 2015-10-17 16:29:22 -03:00
David Bremner
f47fcbe0c5 NEWS: note some Emacs UI changes for 0.21 2015-10-17 10:14:23 -03:00
David Bremner
c48405171a NEWS: new count api / deprecated count/search functions for 0.21 2015-10-17 10:13:37 -03:00
David Bremner
a7f8a7fb91 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
2015-10-17 10:08:45 -03:00
David Bremner
ea7c2e54f0 NEWS: news for initial revision tracking support (0.21) 2015-10-17 10:08:32 -03:00
Mark Walters
ff1fb5027c 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).
2015-10-17 09:07:36 -03:00
Mark Walters
3d38baf352 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).
2015-10-17 09:07:16 -03:00
Tomi Ollila
e56fb9785c doc: update copyright year to contain range 2009-2015
Now it is accurate and provides more information to the
reader of the documents.
2015-10-17 09:06:28 -03:00
David Bremner
127caf7a9e debian: update symbols file
we are only adding symbols, which is exactly the interesting case for a
symbols file.
2015-10-15 10:09:24 -03:00
David Bremner
627efac85e version: bump to 0.21~rc1 2015-10-15 08:24:26 -03:00
David Bremner
364ab6a225 debian: update changelogs for pre-release
a sensible changelog can wait for upstream NEWS to be updated
2015-10-15 08:14:19 -03:00
Jani Nikula
e26d99dc7b 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 acd66cdec0
[2] commit ed9ceda623
[3] id:1441445731-4362-1-git-send-email-jani@nikula.org
2015-10-14 07:55:41 -03:00
Jani Nikula
727fcd18c6 lib: add interface to delete directory documents
As mentioned in acd66cdec0 we don't have
an interface to delete directory documents, and they're left behind. Add
the interface.
2015-10-10 09:14:25 -03:00
Jani Nikula
0e03ff3894 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 e4e04bbc32
[2] commit ed9ceda623
2015-10-10 09:13:02 -03:00
David Bremner
7a20f26f91 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.
2015-10-05 20:16:59 -03:00
David Bremner
e8a828b30d ruby: use new query_search API
These changes should not be too surprising for users because the
routines were already potentially throwing exceptions.
2015-10-05 19:54:12 -03:00
David Bremner
378ba492a6 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.
2015-10-05 19:53:53 -03:00
David Bremner
2501c2565c lib: migrate notmuch_database_upgrade to new query_search API
Here we depend on the error path cleaning up query
2015-10-05 19:53:11 -03:00
David Bremner
c44db65669 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
2015-10-05 19:52:32 -03:00
David Bremner
516e196fa1 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.
2015-10-05 19:51:52 -03:00
David Bremner
e7b420a854 cli: update to use new count API
Essentially replace each call to notmuch_count_* with the corresponding
_st call, followed by print_status_query.
2015-10-05 19:51:08 -03:00
David Bremner
87ee9a53e3 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
2015-10-05 19:44:07 -03:00
David Bremner
81bd41c7cb cli/count: simplify and document return value of print_count
Essentially a cosmetic change.
2015-10-05 19:39:53 -03:00
David Bremner
65a6b86873 lib: move query variable to function scope
This is a prelude to deallocating it (if necessary) on the error path.
2015-10-05 19:39:11 -03:00
Jani Nikula
018e69f558 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.
2015-10-04 07:22:03 -03:00
Tomi Ollila
7b7dadb93f 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).
2015-10-01 08:40:32 -03:00