Commit graph

4365 commits

Author SHA1 Message Date
Stefano Zacchiroli
f162b19148 notmuch-mutt: fix typo in manpage 2012-03-31 11:33:45 -03:00
Stefano Zacchiroli
84f7ac7fc3 NEWS: document inclusion of contrib/notmuch-mutt 2012-03-31 11:33:40 -03:00
Austin Clements
839a80513a emacs: Fix mis-named argument to notmuch-get-bodypart-internal
Previously, this function took an argument called "message-id", even
though it was a general query, rather than a message ID.  This changes
it to "query".
2012-03-31 08:27:15 -03:00
Austin Clements
4ba18958b5 reply: Move reply citation printing to the recursive MIME walk
This makes more logical sense, since it makes the recursive printer
responsible for the entire reply body and lets it start at the root of
the MIME tree instead of the first child.  (We could move reply header
creation in there, too, but if we ever support proper reply to
multiple messages, we'll want just one set of reply headers computed
from the entire message set and many bodies.)
2012-03-31 08:17:55 -03:00
Austin Clements
4d322fb579 reply: Convert default reply format to self-recursive style
This re-arranges the default reply formatter code to use the
mime_node_t abstraction.  There are no semantic changes.
2012-03-31 08:17:41 -03:00
Austin Clements
ea4fd50f45 show/reply: Unify the code that extracts text parts
Previously, show and reply had separate implementations of decoding
and printing text parts.  Now both use show's implementation, which
was more complete.  Show's implementation has been extended with an
option to add reply quoting to the extracted part (this is implemented
as a named flag to avoid naked booleans, even though it's the only
flag it can take).
2012-03-31 08:17:20 -03:00
Austin Clements
ee1180018e emacs: Escape all message ID queries
This adds a lib function to turn a message ID into a properly escaped
message ID query and uses this function wherever we previously
hand-constructed ID queries.  Wherever this new function is used,
documentation has been clarified to refer to "id: queries" instead of
"message IDs".

This fixes the broken test introduced by the previous patch.
2012-03-30 21:27:03 -03:00
Austin Clements
5ae960fc19 test: Add Emacs test for messages with quotes in their message ID
Currently this is broken because Emacs doesn't properly escape double
quotes in message IDs.
2012-03-30 21:23:43 -03:00
Jani Nikula
7400e18fb5 cli: refactor "notmuch restore" message tagging into a separate function
Refactor to make tagging code easier to reuse in the future. No
functional changes.

Signed-off-by: Jani Nikula <jani@nikula.org>
2012-03-30 21:22:44 -03:00
Jani Nikula
9605e62099 cli: refactor "notmuch tag" query tagging into a separate function
Refactor to make tagging code easier to reuse in the future. No
functional changes.

Signed-off-by: Jani Nikula <jani@nikula.org>
2012-03-30 21:22:31 -03:00
Jani Nikula
8e3ff8fb03 cli: refactor "notmuch tag" data structures for tagging operations
To simplify code, keep all tagging operations in a single array
instead of separate add and remove arrays. Apply tag changes in the
order specified on the command line, instead of first removing and
then adding the tags.

This results in a minor functional change: If a tag is both added and
removed, the last specified operation is now used. Previously the tag
was always added. Change the relevant test to reflect the new
behaviour.

Signed-off-by: Jani Nikula <jani@nikula.org>
2012-03-30 21:20:36 -03:00
Jani Nikula
918b803597 test: add test for both adding and removing a tag at the same time
The current behaviour is that regardless of the order in which the
addition and removal of a tag are specified, the tag is added.

Signed-off-by: Jani Nikula <jani@nikula.org>
2012-03-30 21:20:21 -03:00
Mark Walters
f57ef64302 emacs: content-type comparison should be case insensitive.
The function notmuch-match-content-type was comparing content types
case sensitively. Fix it so it tests case insensitively.

This fixes a bug where emacs would not include any body when replying
to a message with content-type TEXT/PLAIN.
2012-03-30 21:19:50 -03:00
Stefano Zacchiroli
46e73fe539 debian packaging: new binary package notmuch-mutt 2012-03-30 18:13:01 -03:00
Stefano Zacchiroli
d13810dc1e contrib: new mutt-notmuch utility for Mutt integration 2012-03-30 18:12:49 -03:00
Tomi Ollila
2b97293b15 NEWS: consistent 2-space indentation in new content
Some 0.12 NEWS items descriptions were indented with 3 spaces whereas
all other lines are indented with 2 spaces. Brought those
escaped lines back in line with others.
2012-03-22 08:30:41 -03:00
David Bremner
0e38650434 notmuch Debian 0.12-1 upload (same as 0.12 + debian changelog fix)
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iJwEAAECAAYFAk9o/J4ACgkQTiiN/0Um85kr2AP7BVAL5kgCoAzZRXaeGuAz6Tcd
 PwchpB/B6CICvKrY6uf8VkMk+0uHVKGruh9oq0PgZJL0pJyLoI1aD597iMkfZeMN
 HiCzwAJtqlzxCVMPiBVK4DgDAn0JAfUpzO/kI8BcXWbp8CJkV7p2ljJ/e/j3flb+
 9Mfo4xluBC570mqAl30=
 =oYkn
 -----END PGP SIGNATURE-----

Merge tag 'debian/0.12-1'

notmuch Debian 0.12-1 upload (same as 0.12 + debian changelog fix)
2012-03-20 19:07:36 -03:00
David Bremner
331f0cac61 debian: reword changelog about ignores 2012-03-20 18:54:10 -03:00
Tomi Ollila
8bf1842b19 Allow selecting which version of gmime is used to build notmuch.
This allows for testing against both versions of gmime on a single
machine, without having to mess with pkg-config paths.

This is rework of Tom Prince's patch submitted in
id:"1331402091-15663-1-git-send-email-tom.prince@ualberta.net"
2012-03-20 08:11:27 -03:00
Tomi Ollila
1ef9f769d7 configure: store $IFS to $DEFAULT_IFS readonly variable
In the future, IFS value needs to be changed in a few places
in configure -- and then restored. Store the original value
to $DEFAULT_IFS for easy restoration.
2012-03-20 08:10:57 -03:00
Justus Winter
1984a26646 Do not try to parse the options for --build and --host arguments
Formerly the code assumed the arguments to be triples and threw an
error if this was not the case. But those arguments are only there for
compatibility with autotools and are not used within the build system,
so just dropping the code parsing these values makes the build system
more robust.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-03-20 08:10:57 -03:00
Justus Winter
524f01a7b5 Add GNU as a valid platform
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-03-20 08:10:57 -03:00
David Bremner
596a2076dc notmuch 0.12 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iJwEAAECAAYFAk9oZIIACgkQTiiN/0Um85l6lwP/UxuYsiowXRFj8WcZGmiqoa9U
 qcst0CrJ8EX8ZsSD7fHT6z0S10wQsnqvjptCdsDePq5aMcvdOAJjG1r8deQt1w4I
 uVN75afBsRbCxfBwEuuOu6jIwl2Ug5bGHcJboxcyTl39w0w/pYVdHNguO3wfyeZZ
 On+4LZAKrETGpGwZWgQ=
 =Utq2
 -----END PGP SIGNATURE-----

Merge tag '0.12'

notmuch 0.12 release
2012-03-20 08:08:17 -03:00
David Bremner
0dcdc2ae8a add NEWS item for printing 2012-03-20 07:47:24 -03:00
David Bremner
2ee1d8e1c7 Merge branch 'release'
Conflicts:
	NEWS

Conflicts resolved by hand for date of 0.12 release.
2012-03-19 22:48:24 -03:00
David Bremner
82fd8c1a83 debian: add changelog stanza for 0.12
Include extremely terse summary of NEWS.
2012-03-19 22:43:50 -03:00
David Bremner
5b6a91849c NEWS: add news item for help = man page
As we discovered recently on the list, this really is new for 0.12
2012-03-19 22:32:23 -03:00
David Bremner
c302bfa2f6 update version to 0.12
There may be a few NEWS changes after this, but no code (hopefully).
2012-03-19 22:28:17 -03:00
David Bremner
686ed4c6ad NEWS: update discussion of GMime 2.6 version requirements.
Be more specific than "Current GMime 2.6". Also explain why we need
>=2.6.7
2012-03-19 22:25:05 -03:00
David Bremner
7fb0eb3293 NEWS: set release date for 0.12 2012-03-19 22:15:05 -03:00
Adam Wolfe Gordon
eb82b4551a NEWS: news for reply enhancements 2012-03-19 22:03:46 -03:00
Adam Wolfe Gordon
650123510c emacs: Use the new JSON reply format and message-cite-original
Use the new JSON reply format to create replies in emacs. Quote HTML
parts nicely by using mm-display-part to turn them into displayable
text, then quoting them with message-cite-original. This is very
useful for users who regularly receive HTML-only email.

Use message-mode's message-cite-original function to create the
quoted body for reply messages. In order to make this act like the
existing notmuch defaults, you will need to set the following in
your emacs configuration:

message-citation-line-format "On %a, %d %b %Y, %f wrote:"
message-citation-line-function 'message-insert-formatted-citation-line

The tests have been updated to reflect the (ugly) emacs default.
2012-03-19 22:03:23 -03:00
Adam Wolfe Gordon
8420ba1035 test: Add broken tests for new emacs reply functionality
Add tests for creating nice replies to multipart messages, including
those with HTML parts. These tests are expected to fail for now.
2012-03-19 22:01:13 -03:00
Adam Wolfe Gordon
950789f3c3 emacs: Factor out useful functions into notmuch-lib
Move a few functions related to handling multipart/alternative parts
into notmuch-lib.el, so they can be used by future reply code.
2012-03-19 21:59:24 -03:00
Adam Wolfe Gordon
92b48c8c98 man: Add --decrypt to reply flags 2012-03-19 21:58:20 -03:00
Adam Wolfe Gordon
71855b72f7 man: Update notmuch-reply man page for JSON format. 2012-03-19 21:57:25 -03:00
Adam Wolfe Gordon
5abc9c1097 schemata: Add documentation for JSON reply format. 2012-03-19 21:56:25 -03:00
Adam Wolfe Gordon
1904b01b96 reply: Add a JSON reply format.
This new JSON format for replies includes headers generated for a
reply message as well as the headers of the original message.  Using
this data, a client can intelligently create a reply. For example, the
emacs client will be able to create replies with quoted HTML parts by
parsing the HTML parts.
2012-03-19 21:53:53 -03:00
Adam Wolfe Gordon
06a34f1407 TODO: Add replying to multiple messages 2012-03-19 21:53:30 -03:00
Adam Wolfe Gordon
766aebc02c reply: Factor out reply creation
Factor out the creation of a reply message based on an original
message so it can be shared by different reply formats.
2012-03-19 21:52:54 -03:00
Adam Wolfe Gordon
30172649e8 test: Add broken test for the new JSON reply format. 2012-03-19 21:50:47 -03:00
David Bremner
c83388819c NEWS: start section for 0.13
People are making patches for the 0.12 NEWS section for features that
won't be there.

Let's help them out by adding a new stanza.
2012-03-18 10:15:47 -03:00
Austin Clements
0eaf4a21dd emacs: Fix search tab completion in terminals
In X, Emacs distinguishes the tab key, which produces a 'tab event;
from C-i, which produces a ?\t event.  However, in a terminal, these
are indistinguishable and only produce a ?\t event.  In order to
simplify things, Emacs automatically translates from 'tab to ?\t (see
"Function key translations" in M-x describe-bindings), so functions
only need to be bound to ?\t to work in all situations.

Previously, the search tab completion code usedq (kbd "<tab>"), which
produced the event sequence [tab], which only matched the 'tab event
and hence only worked in X.  This patch changes it to (kbd "TAB"),
which matches the general ?\t event and works in all situations.
2012-03-18 09:14:23 -03:00
Mark Walters
c695534df5 lib: fix an exclude bug
When the exclude tags contain a tag that does not occur anywhere in
the Xapian database the exclusion fails. We modify the way the query
is constructed to `work around' this. (In fact the new code is cleaner
anyway.)

It also seems to fix another exclusion failure bug reported by
jrollins but we have not yet worked out why it helps in that case.
2012-03-18 09:14:23 -03:00
Mark Walters
1351aafac1 test: add tests for message only search
This adds three tests for --output=messages searches. One test is for
the case when one exclude tag does not occur in the Xapian
database. This triggers a Xapian bug in some cases and causes the
whole exclusion to fail. The next commit avoids this bug.
2012-03-18 09:14:23 -03:00
Mark Walters
fb36741bf3 test: the test for the exclude code mistakenly excludes the tag "="
The tests for the exclude code in search and count use the line
    notmuch config set search.exclude_tags = deleted
which actually sets the exclude tags to be "=" and "deleted". Remove
the "=" from this line.
2012-03-18 09:14:23 -03:00
Austin Clements
28367a9bcd lib: Add exclude query debug output 2012-03-18 09:14:22 -03:00
Austin Clements
75a0552633 lib: Expose query debug output via an environment variable
Allow query debugging to be enabled at run-time by setting the
NOTMUCH_DEBUG_QUERY environment variable to a non-empty string.

Previously, enabling query debugging required recompiling, but parsed
queries are often useful for tracking down bugs in situations where
recompiling is inconvenient.
2012-03-18 09:14:22 -03:00
Mark Walters
b3e4417897 cli: Parsing. Allow true/false parameter for boolean options.
Allow NOTMUCH_OPT_BOOLEAN to take a true or false parameter.  In
particular it allows the user to turn off a boolean option with
--option=false.
2012-03-18 09:14:22 -03:00
Dmitry Kurochkin
db97cb5b65 test: use subtest name for generated message subject by default
Before the change, messages generated by generate_message() used "Test
message #N" for default subject where N is the generated messages
counter.  Since message subject is commonly present in expected
results, there is a chance of breaking other tests when a new
generate_message() call is added.  The patch changes default subject
value for generated messages to subtest name if it is available.  If
subtest name is not available (i.e. message is generated during test
initialization), the old default value is used (in this case it is
fine to have the counter in the subject).

Another benefit of this change is a sane default value for subject in
generated messages, which would allow to simplify code like:

  test_begin_subtest "test for a cool feature"
  add_message [subject]="message for test for a cool feature"
2012-03-18 09:14:22 -03:00