Commit graph

4396 commits

Author SHA1 Message Date
W. Trevor King
9d25c97d8b nmbug: Add a 'help' command for folks who don't like --help
The 'if args.func == help' block at the end avoids:

    AttributeError: 'functools.partial' object has no attribute '__code__'
2015-01-18 11:00:51 +01:00
Jesse Rosenthal
62bc1d4717 thread-naming test: Test empty subject names.
We test all empty subjects, and then empty subjects followed by
non-empty subjects (searching both oldest- and newest-first).
2015-01-17 13:49:26 +01:00
Jesse Rosenthal
c0c007dd7f test-lib: Add dummy subject to force empty subject
At the moment, the test-lib fills in any missing headers. This makes
it impossible to test our handling of empty subjects. This will
allow us to use a special dummy subject -- `@FORCE_EMPTY` -- to force
the subject to remain empty.
2015-01-17 13:49:05 +01:00
Jesse Rosenthal
67e368ac7b thread.cc: Avoid empty thread names if possible.
Currently the thread is named based on either the oldest or newest
matching message (depending on the search order). If this message has
an empty subject, though, the thread will show up with an empty
subject in the search results. (See the thread starting with
`id:1412371140-21051-1-git-send-email-david@tethera.net` for an
example.)

This changes the behavior so it will use a non-empty name for the
thread if possible. We name threads based on (a) non-empty matches for
the query, and (b) the search order. If the search order is
oldest-first (as in the default inbox) it chooses the oldest matching
non-empty message as the subject. If the search order is newest-first
it chooses the newest one.
2015-01-17 13:48:26 +01:00
Jani Nikula
71fb37d482 emacs: add stash support for git send-email command line
Stash From/To/Cc as --to/--to/--cc, respectively, and Message-Id as
--in-reply-to, suitable for pasting to git send-email command line.
2015-01-17 11:35:01 +01:00
David Bremner
2bbe5e034d emacs: make citation function customizable.
Make a new customizable variable instead of relying on
message-cite-function because the default for the latter changed
between emacs releases.

The defcustom is borrowed from the message.el source, with minor
modifications.
2015-01-16 09:07:09 +01:00
David Bremner
9060a1f617 contrib: remove notmuch deliver
contrib/notmuch-deliver is presumed obsoleted by notmuch-insert.
2015-01-14 15:25:30 +01:00
David Edmondson
5ddaf59915 emacs: Washing should use more `defcustom'.
More of the washing variables should be available through the standard
customisation interface.
2015-01-11 14:32:32 +01:00
David Edmondson
092b159be7 emacs: More flexible washed faces.
The faces used when washing messages should be notmuch specific and
inherit from the underlying emacs face rather than using it
directly. This allows the washed face to be modified without requiring
the modification of the underlying face.
2015-01-11 14:32:25 +01:00
David Bremner
bd96b4c4ba configure: add check for python interepreter name
Currently we hardcode "python" in several places. This makes things
hard for people who have only commands called python3 and/or
python2. We also add the name to sh.config to eventually replace the
current workaround in the test suite.
2015-01-03 16:40:43 +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
David Bremner
3220230317 debian: update ./debian/.gitignore
One binary package was renamed, and notmuch-dbg was mysteriously
missing from the existing .gitignore.
2015-01-03 15:18:27 +01:00
Jani Nikula
08928573e4 completion: remove the broken notmuch-completion.tcsh
The tcsh completion is minimal yet doesn't work at all. We're better
off without it, it's more embarrassing than useful.
2015-01-03 09:35:09 +01:00
David Bremner
105537a809 lib: convert two "iterator copy strings" into references.
Apparently this is a supported and even idiomatic way of keeping a
temporary object (e.g. like that returned from an operator
dereference) alive.
2015-01-02 17:18:42 +01:00
David Bremner
3d978a0d61 lib: another iterator-temporary/stale-pointer bug
Tamas Szakaly points out [1] that the bug fixed in 51b073c still
exists in at least one place. This change follows the suggestion of
[2] and creates a block scope temporary std::string to avoid the rules
of iterators temporaries.

[1]: id:20141226113755.GA64154@pamparam
[2]: id:20141226230655.GA41992@pamparam
2015-01-02 17:10:37 +01:00
Jani Nikula
2dfbb7598b completion: complete notmuch insert --folder to maildir folders only
The --folder option expects a folder relative from maildir root, so
complete like the folder: search term.
2015-01-02 16:51:00 +01:00
Jani Nikula
516a1b37b6 completion: complete notmuch insert --keep and --no-hooks options 2015-01-02 16:50:45 +01:00
Sergei Shilovsky
7b31f54ed9 Add default configuration values to the man page 2015-01-01 16:48:18 +01:00
Jani Nikula
c82a1745ac lib: drop the deprecation message for single-message mbox files
We generally do not support mbox files, but for historical reasons
we've supported single-message mbox files, with a deprecation
message. We've tried dropping the support altogether, but backed out
of it because we'd need to stop indexing them, while keeping support
for previously indexed files. This would be more complicated than
simply supporting single-message mbox files. Therefore, drop the
deprecation message, and just silently accept single-message mboxes.
2015-01-01 16:47:47 +01:00
David Bremner
c86353aa9a bindings/ruby: gitignore *.o 2015-01-01 16:47:29 +01:00
Jesse Rosenthal
4135a1f8da lib: Use email address instead of empty real name.
Currently, if a From-header is of the form:

    "" <address@example.com>

the empty string will be treated as a valid real-name, and the entry
in the search results will be empty.

The new behavior here is that we treat an empty real-name field as if
it were null, so that the email address will be used in the search
results instead.

Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>
2014-12-07 13:36:08 +01:00
Jesse Rosenthal
6c1d626519 test: Add known-broken test for empty author name
We test for whether a quoted empty email address

    "" <address@example.com>

will show up as the address, instead of the empty string. This is
marked as known-broken, since the current behavior is to use the empty
string.

This is a new test file, since handling of unusual email addresses
doesn't seem to fit well in any of our existing tests.

Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>
2014-12-07 13:32:12 +01:00
David Edmondson
7585e8c906 emacs: with-current-notmuch-show-message' should not leak coding-system-for-read'
`with-current-notmuch-show-message' applies a `no-conversion' coding
system when reading a raw message from notmuch. That coding system
should _not_ be applied when the body of the macro is evaluated, as it
can cause file operations used during that evaluation to incorrectly
apply the `no-conversion' coding system.

This was discovered when a user's .signature file contained non-ASCII
characters. When a message is forwarded, the `no-conversion' coding
system was applied to the reading of the .signature file, resulting in
raw rather than UTF-8 interpretation of the data.
2014-11-26 18:26:07 +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
David Bremner
cffa3cf76f notmuch 0.19 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQGcBAABCAAGBQJUZlsfAAoJEPIClx2kp54sptQL/jwdjLn8hZ0g9rEpPLgWC/en
 xSis1wNX2nEoEzyGRO7pjsCStxn3G7bMCgRGLCaa3JV1iLETFciXREh9/ZUg8hKc
 84b6LScEYDCyKpSRi67qwIuUr1P/KqahZXwBg51SM6c5ks6f4D+hiPVnumQ3j3Rb
 eFZ23Yf7c88zn8mX/HfiH4aKhgV1sax2poSJzHnyAPyCOpJtS0CYH0GvNIX4lc0U
 CbSiYZ4SrOomgo+U5uTkVJ4M5gbx3J39NnDv++CugKzPOtIm8X2EtPS1Tgi1uodp
 qysO7rs+VtJAn1abNzqJS8gt145oqJsm5re7USSC/xrm71gup8/T58sMmMwis+1q
 0dSgnrr50snhRhjwHS3DZdyhiPbfj/cw+lbF7bElLOBrRJVA1p8Y3QD1OTFsepkI
 wB22ZUFCCemYd10CeWLNDSBRTkDR4Qy4+UF5ogcaLQDn94+JE/IZ9+579aIbaCde
 faAwPo0iWU+wb94t/TAs16D4e6+sRp9ChsfLoWk8BQ==
 =LsK6
 -----END PGP SIGNATURE-----

Merge tag '0.19'

notmuch 0.19 release
2014-11-15 08:47:00 +01:00
David Bremner
49aaea350f debian: update debian/NEWS and debian/changelog
Plagiarize my upstream summary for debian, and mention the new
upgrade.
2014-11-14 20:35:40 +01:00
David Bremner
a60aa095d7 version: bump to 0.19 2014-11-14 19:35:44 +01:00
David Bremner
398f1484b9 NEWS: deprecate notmuch deliver
notmuch-deliver has no commits for about 2.5 years. notmuch-insert has
all the features that deliver does, and as far as I understand the
error handling has now caught up.
2014-11-14 19:27:26 +01:00
David Bremner
ed38237974 NEWS: add short overview section
I decided to err on the side of brevity, since the details are just
below.
2014-11-14 19:27:00 +01:00
markwalters1009@gmail.com
0dfcb7f9bb News for mark read handling
amended by db: capitalized notmuch.
2014-11-13 21:42:04 +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
Michal Sojka
dbec000872 NEWS: notmuch address 2014-11-13 21:24:54 +01:00
Jani Nikula
50ee7d7e12 NEWS: functions in emacs notmuch-show-stash-mlarchive-link-alist
News for emacs: allow functions in
notmuch-show-stash-mlarchive-link-alist.
2014-11-11 08:13:30 +01:00
Jani Nikula
049bb7b86e NEWS: notmuch insert, search updates
News for

- cli: add support for notmuch search --duplicate=N with --output=messages
- cli/insert: add post-insert hook
- cli/insert: require succesful message indexing for success statu
2014-11-11 08:13:04 +01:00
Austin Clements
4499c07531 NEWS: Database version 3, API improvements, and ghost messages 2014-11-10 18:18:43 +01:00
David Bremner
2e480491b7 debian: bump standards version 2014-11-09 16:46:55 +01:00
David Bremner
61bae7726d bump version to 0.19~rc2 2014-11-09 16:23:58 +01:00
Mark Walters
78a1575aa4 emacs: show: document the mark unread defcustom function 2014-11-09 16:08:58 +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
Mark Walters
9f98aaa29f News for dump/writelock change 2014-11-09 10:08:13 +01:00
David Bremner
4bd95a30c1 debian: bump date in changelog.
It looks a bit riduculous to have a September date there.
2014-11-06 00:30:57 +01:00
David Bremner
74bd4ea2ed lib: bump LIBNOTMUCH_MAJOR_VERSION to 4
This should have been done at the same time as the SONAME bump.
2014-11-06 00:10:03 +01:00
David Bremner
f310e349df version: update to 0.19~rc1
Sync NEWS debian/changelog at the same time, although in those cases it's a downgrade.
2014-11-06 00:07:45 +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
4387112de0 cli: add support for hierarchical command line option arrays
NOTMUCH_OPT_INHERIT expects a notmuch_opt_desc_t * pointer in
output_var.

The "Unrecognized option" message was moved out of parse_option() to
not be emitted twice or when parsing a non-inherited option.
2014-11-05 23:17:00 +01:00