Commit graph

86 commits

Author SHA1 Message Date
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
Jani Nikula
b69201da5d 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.
2015-09-29 08:25:25 -03:00
Jani Nikula
17fcf24d8b 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.
2015-09-29 08:25:25 -03:00
Jani Nikula
ac609e5a3b man: clean up notmuch-emacs-mua man page
Move --client description to a more suitable location, stylistic
changes.
2015-09-29 08:25:25 -03:00
Jani Nikula
02e394aed2 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.
2015-09-26 07:41:05 -03:00
Jani Nikula
71fae18fba man: document notmuch address --deduplicate=address option
Document the deduplication based on case insensitive address.
2015-09-26 07:40:39 -03:00
Jani Nikula
23b8ed610a lib: add support for date:<expr>..! to mean date:<expr>..<expr>
It doesn't seem likely we can support simple date:<expr> expanding to
date:<expr>..<expr> any time soon. (This can be done with a future
version of Xapian, or with a custom query query parser.) In the mean
time, provide shorthand date:<expr>..! to mean the same. This is
useful, as the expansion takes place before interpetation, and we can
use, for example, date:yesterday..! to match from beginning of
yesterday to end of yesterday.

Idea from Mark Walters <markwalters1009@gmail.com>.
2015-09-25 21:55:24 -03:00
Jani Nikula
36b75cd441 man: document notmuch address --deduplicate=(no|mailbox) option
Document the deduplication of results.
2015-09-24 07:34:39 -03:00
Austin Clements
cb08a2ee01 lib: Add "lastmod:" queries for filtering by last modification
The implementation is essentially the same as the date range search
prior to Jani's fancy date parser.
2015-08-14 18:23:49 +02:00
David Bremner
f76d8f82dd cli: add global option "--uuid"
The function notmuch_exit_if_unmatched_db_uuid is split from
notmuch_process_shared_options because it needs an open notmuch
database.

There are two exceptional cases in uuid handling.

1) notmuch config and notmuch setup don't currently open the database,
   so it doesn't make sense to check the UUID.

2) notmuch compact opens the database inside the library, so we either
   need to open the database just to check uuid, or change the API.
2015-08-14 18:23:49 +02:00
David Bremner
5a3b42fb8c cli/count: add --lastmod
In the short term we need a way to get lastmod information e.g. for
the test suite. In the long term we probably want to add lastmod
information to at least the structured output for several other
clients (e.g. show, search).
2015-08-14 18:07:55 +02:00
David Bremner
7e2d0ef105 lib: define NOTMUCH_DEPRECATED macro, document its use.
This has been tested with gcc and clang.
2015-08-04 09:11:17 +02:00
David Bremner
653190bf2a cli: enable notmuch --help command
This functionality seems to have been undocumented, if it ever
existed. Document it now.
2015-07-30 07:45:26 +02:00
David Bremner
83e9df98a0 doc: whitespace cleanup for notmuch.rst
replace leading spaces with tabs
2015-07-30 07:45:26 +02:00
David Bremner
82d8d0b062 replace hardcoded "python" with configured python command
Thanks to FreeBSD port maintainer Mikhail for report and the original
the original patch.

This is the right thing (TM) and also apparently fixes the build on
FreeBSD.
2015-07-10 18:13:28 +02:00
David Bremner
9f57b7e8c5 doc: add minimal note about shared options.
The example is a bit silly, but notmuch subcommand --help is actually
not equivalent to "notmuch --help subcommand".
2015-06-05 18:51:15 +02:00
David Bremner
c883e632bf CLI: make gpg binary used by libgmime configurable.
Previously we set up a way for the top level notmuch command to choose
which gpg binary was invoked by libgmime. In this commit we add the
(mostly boilerplate) code to allow the notmuch-config command to read
and write this path, and use it in the appropriate struct.

Update tests for new default variable
2015-03-11 08:04:00 +01:00
Jani Nikula
a00b4abc27 man: fix notmuch-emacs-mua environment section
It's emacsclient command, not comment. Document default values. While
at it, format the environment section similarly to other man pages.
2015-03-08 08:27:43 +01:00
Jani Nikula
5240c438f5 notmuch-emacs-mua: remove -C to keep short options compatible with mutt
Notmuch uses long options exclusively all around. The short options in
notmuch-emacs-mua are intentionally just a compatible subset of
mutt(1). Keep it this way, if only to make documenting the fact easy!

The Notmuch style --client long option remains, of course.
2015-03-08 08:27:28 +01:00
Jani Nikula
f4a5a534c8 cli: add a tool for starting new message in the emacs ui
Add a tool to start composing an email in the Notmuch Emacs UI with
the specified subject, recipients, and message body.
2015-03-06 08:02:08 +01:00
David Bremner
d7b6e0cae7 doc: update list of prefixes
'attachement' missed a colon, and 'mimetype' was not added to this table
at all.
2015-02-24 08:29:01 +01:00
David Bremner
682a362c85 doc: typo fix for prefix discussion. 2015-02-24 08:29:01 +01:00
David Bremner
4313be0a0c doc: add more information on operators.
More material borrowed from the wiki page on "searching"
2015-02-24 08:29:01 +01:00
David Bremner
7fa58b792c doc: add material on stemming and wildcards
This is lightly massaged from the searching page on the wiki.
2015-02-24 08:29:01 +01:00
Jani Nikula
45038b44b7 doc: document notmuch-restore --input=filename option
Document all options for completeness.
2015-02-23 21:47:55 +01:00
Jani Nikula
1e5b4b72c9 doc: document notmuch-dump --output=filename option
Document all options for completeness.
2015-02-23 21:47:46 +01:00
Jani Nikula
6cc1c8d149 doc: bring notmuch-dump manual page in line with the rest
Fix indentation of options. Move search terms description before
options. Fix synopsis.
2015-02-23 21:47:32 +01:00
David Bremner
625401eb2f doc: remove reference to sender,recipients from notmuch-search.1
Apparently these were missed when notmuch-address was split to it's
own subcommand.
2015-02-22 19:52:42 +01:00
David Bremner
4d5477a3d5 doc: add details about Xapian search syntax
Questions related to the way that probabilistic prefixes and phrases
are handled come up quite often and it is nicer to have the documentation self contained.  Hopefully putting it in subsections prevents it from being overwhelming.
2015-01-25 18:36:47 +01:00
David Bremner
b9e7b8e8f0 doc: gzipped notmuch.3 before trying to install notmuch.3.gz
If HAVE_SPHINX=0 but HAVE_DOXYGEN=1, then the previous version was
trying to install notmuch.3.gz but only got as far as creating
notmuch.3
2015-01-25 15:04:51 +01:00
Todd
8fb1cbc1c2 Update documentation
Adds new entry to the NEWS file, and updates the search terms section
of the man page.  The search terms section needs to be updated again
once the new section in the documentation covering probablistic terms
has been committed.
2015-01-24 16:51:20 +01:00
David Bremner
d241a486fa doc: remove support for rst2man
It was becoming increasingly complicated to support rst2man, and there
were apparently not many people that relied on it.
2015-01-22 08:37:25 +01:00
David Bremner
2bb906a6dd build: eliminate use of python execfile command
As discussed in
id:8cc9dd580ad672527e12f43706f9803b2c8e99d8.1405220724.git.wking@tremily.us,
execfile is unavailable in python3.

The approach of this commit avoids modifying the python module path,
which is arguably preferable since it avoids potentially accidentally
importing a module from the wrong place.
2015-01-03 15:18:54 +01:00
Sergei Shilovsky
7b31f54ed9 Add default configuration values to the man page 2015-01-01 16:48:18 +01:00
Tomi Ollila
32855b91d9 NEWS & doc: typing fixes
Some inconsistent formatting in NEWS for 0.19, 0.18 & 0.17 fixed.

Extra `*` when making bold text in doc/man1/notmuch-search.rst removed.
2014-11-16 09:36:50 +01:00
Michal Sojka
9710f0886a doc: Minor fixes related to notmuch-address
- Add notmuch-address to HTML index
- Remove extra '*'
2014-11-13 21:25:07 +01:00
Tomi Ollila
0d8251dbe2 cli: notmuch address option defaults update
When no --output option were given, change default to display senders
only.

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

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

Clean up some whitespace in the documentation.

One test updated to have --output=count without sender nor recipient
output option.
2014-11-09 10:09:51 +01:00
Tomi Ollila
8e3ee13abc doc: whitespace cleanup
Changed one tab in doc/man1/notmuch-show.rst to 8 spaces.

Removed one leading tab in doc/man5/notmuch-hooks.rst to make
the SYNOPSIS style consistent with other pages.
2014-11-09 10:08:33 +01:00
David Bremner
3d991261a4 doc: add notmuch-address.rst to sphinx config
This is needed so that the rst docs are converted to man and info
pages.
2014-11-05 23:52:17 +01:00
Michal Sojka
a5a6859197 cli: address: Add --output=count
This output prints how many times was each address encountered during
search.
2014-11-05 23:25:05 +01:00
Michal Sojka
4176e527fc cli: address: Do not output duplicate addresses
This filters out duplicate addresses from address command output.

It also also adds tests for the address command.

The code here is an extended version of a patch from Jani Nikula.
2014-11-05 23:23:01 +01:00
Michal Sojka
5c32365d87 cli: search: Convert --output to keyword argument
Now, when address related outputs are in a separate command, it makes
no sense to combine multiple --output options in search command line.
Using switch statement to handle different outputs is more readable
than a series of if statements.
2014-11-05 23:20:17 +01:00
Michal Sojka
5c27136e64 cli: Introduce "notmuch address" command
This moves address-related functionality from search command to the
new address command. The implementation shares almost all code and
some command line options.

Options --offset and --limit were intentionally not included in the
address command, because they refer to messages numbers, which users
do not see in the output. This could confuse users because, for
example, they could see more addresses in the output that what was
specified with --limit. This functionality can be correctly
reimplemented for address subcommand later.

Also useless values of --exclude flag were not included in the address
command.

This was inspired by a patch from Jani Nikula.
2014-11-05 23:19:12 +01:00
Jani Nikula
4366b9b88c cli: add support for notmuch search --duplicate=N with --output=messages
Print the message IDs of all messages matching the search terms that
have at least N files associated with them.
2014-11-02 19:42:12 +01:00
Michal Sojka
3cc8ed5978 cli: search: Add --output={sender,recipients}
The new outputs allow printing senders, recipients or both of matching
messages. To print both, the user can use --output=sender and
--output=recipients simultaneously.

Currently, the same address can appear multiple times in the output.
The next commit will change this. For this reason, tests are
introduced there.

We use mailbox_t rather than InternetAddressMailbox because we will
need to extend it in a following commit.

This code is based on a patch from Jani Nikula.
2014-11-01 08:02:58 +01:00
Jani Nikula
19c09d870f cli/insert: add post-insert hook
The post-new hook might no longer be needed or run very often if
notmuch insert is being used. Therefore a post-insert hook is needed
(arguably pre-insert not so much, so don't add one). Also add the
--no-hooks option to skip hooks.
2014-10-28 19:19:30 +01:00
Jani Nikula
50eedb48ec gitignore: ignore sh.config and doc/config.dox 2014-10-28 12:12:33 +01:00
Jani Nikula
dc20a0eedc cli/insert: require succesful message indexing for success status
Add --keep option to keep any remaining stuff in index or file. We
could distinguish between failures to index and failures to apply tags
or maildir sync, but for simplicity just have one.
2014-10-18 07:54:25 +02:00
David Bremner
b71e3d00de doc: build notmuch-emacs info/html docs, link from index
Although this manual is far from complete, it may be helpful for
someone. In particular building it as part of the standard build
process makes it easier to find problems when editing the
notmuch-emacs-manual.
2014-10-04 20:47:00 +02:00
Austin Clements
76490fba3c doc: Emacs manual improvements and expansions
Fix several typos, improve general wording and flow, and add some
information on notmuch-jump.
2014-10-04 20:32:59 +02:00