Commit graph

2985 commits

Author SHA1 Message Date
Michal Sojka
4a0740920d emacs-hello: Do not calculate the count of the messages in hidden sections
The result is that hello screen shows much faster when some sections are
hidden.
2012-03-10 10:10:27 -04:00
David Bremner
4b3af0e444 Make exclusion visible again
This reverts

dfee0f9 man: remove search.exclude_tags from notmuch-config.1 for 0.12
e83409d NEWS: revert NEWS item for exclude tags for 0.12
e77b031 config: disable addition of exclude tags for 0.12
2012-03-03 11:56:47 -04:00
David Bremner
ad6a6edb38 Merge branch 'release' 2012-03-03 11:56:36 -04:00
Justus Winter
cfc5f1059a Actually close the xapian database in notmuch_database_close
Formerly the xapian database object was deleted and closed in its
destructor once the object was garbage collected. Explicitly call
close() so that the database and the associated lock is released
immediately.

The comment is a courtesy of Austin Clements.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-03-03 11:30:07 -04:00
David Bremner
3ed8c3d9a6 debian: Bump standards version
No actual changes are needed.
2012-03-03 09:40:18 -04:00
David Bremner
2a1aeb2e9c debian: update .gitignore
Ignore individual binary package directories.
2012-03-03 09:38:45 -04:00
David Bremner
8077cdc7bb debian: add notmuch_query_add_tag_exclude to exported symbols
This symbol is added in 0.12, although we are "stealthing" the feature
overall.
2012-03-03 09:19:44 -04:00
Mark Walters
dfee0f97b9 man: remove search.exclude_tags from notmuch-config.1 for 0.12 2012-03-03 08:33:26 -04:00
Mark Walters
e83409d21c NEWS: revert NEWS item for exclude tags for 0.12 2012-03-02 19:12:36 -04:00
Mark Walters
e77b031a86 config: disable addition of exclude tags for 0.12
This disables the addition of search_exclude_tags in notmuch-setup and
notmuch-config.
2012-03-02 19:11:35 -04:00
Mark Walters
1aa4abe7a1 emacs: notmuch.el ignore excluded matches
This is a small change to make notmuch.el ignore excluded matches.  In
the future it could do something better like add a button for
rerunning the search with the excludes (particularly if nothing
matches with the excludes) or having them invisible and allowing the
visibility to be toggled.
2012-03-02 08:38:27 -04:00
Mark Walters
119a42571e emacs: show: recognize the exclude flag.
Show mode will recognize the exclude flag by not opening excluding
messages by default, and will start at the first matching non-excluded
message. If there are no matching non-excluded messages it will go to
the first matching (necessarily excluded) message.
2012-03-02 08:37:50 -04:00
Mark Walters
7a1beb9e7c cli: omit excluded messages in results where appropriate.
In all cases of notmuch count/search/show where the results returned
cannot reflect the exclude flag return just the matched not-excluded
results. If the caller wishes to have all the matched results (i.e.,
including the excluded ones) they should call with the
--no-exclude option.

The relevant cases are
    count: both threads and messages
    search: all cases except the summary view
    show: mbox format
2012-03-02 08:37:32 -04:00
Mark Walters
99c318cae4 man: update manpage for notmuch-show --no-exclude option 2012-03-02 08:35:39 -04:00
Mark Walters
c8cf9e92d8 test: update tests to reflect the exclude flag
notmuch show outputs the exclude flag so many tests using notmuch
show failed. This commit adds "excluded:0" or "excluded: false" to
the expected outputs. After this commit there should be no failing
tests.
2012-03-02 08:35:02 -04:00
Mark Walters
ebe5e6712a cli: Make notmuch-show respect excludes.
This adds the excludes to notmuch-show.c. We do not exclude when only
a single message (or part) is requested. notmuch-show will output the
exclude information when either text or json format is requested. As
this changes the output from notmuch-show it breaks many tests (in a
trivial and expected fashion).
2012-03-02 08:34:36 -04:00
Mark Walters
c440e597f9 test: update search test to reflect exclude flag
notmuch-search.c now returns all matching threads even if it the
match is a search.tag_excluded message (but with a mark indicating
this). Update the test to reflect this.
2012-03-02 08:31:42 -04:00
Mark Walters
1a53f9f116 lib: Add the exclude flag to notmuch_query_search_threads
Add the NOTMUCH_MESSAGE_FLAG_EXCLUDED flag to
notmuch_query_search_threads. Implemented by inspecting the tags
directly in _notmuch_thread_create/_thread_add_message rather than as
a Xapian query for speed reasons.

Note notmuch_thread_get_matched_messages now returns the number of
non-excluded matching messages. This API is not totally desirable but
fixing it means breaking binary compatibility so we delay that.
2012-03-02 08:28:39 -04:00
Mark Walters
c9eb94d7fb lib: Make notmuch_query_search_messages set the exclude flag
Add a flag NOTMUCH_MESSAGE_FLAG_EXCLUDED which is set by
notmuch_query_search_messages for excluded messages. Also add an
option omit_excluded_messages to the search that we do not want the
excludes at all.

This exclude flag will be added to notmuch_query_search threads in the
next patch.
2012-03-02 08:27:47 -04:00
Mark Walters
08f7b026a9 lib: Rearrange the exclude code in query.cc
Slightly refactor the exclude code to give the callers access to the
exclude query itself. There should be no functional change.
2012-03-02 08:27:36 -04:00
Mark Walters
98f5b0f09a test: add tests for new cli --no-exclude option
The tests test the new --no-exclude option to search and count.
There were no existing tests for the exclude behaviour for count so
added these too.
2012-03-02 08:25:46 -04:00
Mark Walters
4eab10f0f8 cli: Add --no-exclude to the man pages for search and count 2012-03-02 08:25:21 -04:00
Mark Walters
d845662970 cli: add --no-exclude option to count and search.
This option turns off the exclusion so all matching messages are
returned. We do not need to add this to notmuch-show as that does not
(yet) exclude.
2012-03-02 08:24:38 -04:00
Tomi Ollila
2c077b1e4a Spelling fix
Retreive is spelled as r e t r i e v e .
2012-03-01 19:04:21 -04:00
Tomi Ollila
1fb5c77818 emacs: retain show buffer state after retrieving gpg key
After retrieving gpg key retain show buffer state like in
all other operations (i.e. no other calls to notmuch-show-refresh-view
provides optional reset-state argument).
Emacs MUA keeps current message under cursor instead of going first
open message(possibly marking it read).
2012-03-01 19:04:02 -04:00
Pieter Praet
5234f808bc NEWS: add entry for `notmuch-show-stash-mlarchive-link{,-and-go}' 2012-03-01 18:58:08 -04:00
Austin Clements
4fa77d0318 show: Further general simplifications of the JSON formatter 2012-03-01 08:32:58 -04:00
Austin Clements
99789e77f2 show: Make format_part_sigstatus_json's API consistent between GMIME 2.4 and 2.6
The implementation is still different for GMIME 2.4 and 2.6, but at
least now the caller doesn't have to be aware of this.
2012-03-01 08:32:34 -04:00
Austin Clements
1f0ead385a show: Make JSON helper functions print complete objects
This makes the main recursive function easier to follow because helper
functions don't add fields to the running object.
2012-03-01 08:32:12 -04:00
Austin Clements
63ee244c8e show: Simplify talloc use in format_headers_json
Previously there was an unnecessary talloc context.
2012-03-01 08:31:11 -04:00
Austin Clements
86f89385c3 show: Unify JSON header output for messages and message parts
This has three ramifications:
- Blank To and Cc headers are no longer output for messages.
- Dates are now canonicalized for messages, which means they always
  have a day of the week and GMT is printed +0000 (never -0000)
- Invalid From message headers are handled slightly differently, since
  they get parsed by GMime now instead of notmuch.
2012-03-01 08:28:13 -04:00
Austin Clements
2209d7b952 show: Use consistent header ordering in the JSON format
Previously, top-level message headers were printed as Subject, From,
To, Date, while embedded message headers were printed From, To,
Subject, Date.  This makes both cases use the former order and updates
the tests accordingly.
2012-03-01 08:28:02 -04:00
Austin Clements
44d9656cbf show: Convert JSON format to the new self-recursive style
As before, this is all code movement and a smidgen of glue.  This
moves the existing JSON formatter code into one self-recursive
function, but doesn't change any of the logic to take advantage of the
new structure.

In general, "leafs" of the JSON structure are left in helper functions
(most of them untouched), so that it's easy to see the overall
structure of the format from the main recursive function.
2012-03-01 08:27:25 -04:00
Daniel Schoepe
6e25ea031f emacs: Tests for user-defined sections
A new file was added for notmuch-hello tests.
2012-03-01 08:16:55 -04:00
Daniel Schoepe
3557acab64 emacs: User-defined sections in notmuch-hello
This patch makes the notmuch-hello screen fully customizable
by allowing the user to add and remove arbitrary sections. It
also provides some convenience functions for constructing sections,
e.g. showing the unread message count for each tag.

This is done by specifying a list of functions that will be run
when notmuch-hello is invoked.
2012-03-01 08:16:29 -04:00
David Bremner
2ddf29fe3b add minimal changelog stanza for 0.12~rc1 2012-03-01 07:52:05 -04:00
David Bremner
916aefc2de bump version to 0.12~rc1
As usual, only `version' is edited by hand. The rest of the changes I
blame on the machine.
2012-03-01 07:47:21 -04:00
Michal Sojka
8c095acb6c emacs: Clarify description of thread manipulating functions
It is not clear whether the term "thread" refers to the thread in the
database or to the thread currently shown in a buffer. Those two
meanings may refer to different sets of messages, e.g. when a new email
is added to the database while the buffer shows the state before the new
email arrived.

This patch replaces the term thread with the term current buffer, which
is hopefully less ambiguous.
2012-02-29 22:47:57 -04:00
Michal Sojka
1093c24dcc test: Remove 'broken' flag from encoding test 2012-02-29 07:41:55 -04:00
Michal Sojka
40edc971a8 Convert non-UTF-8 parts to UTF-8 before indexing them
This fixes a bug that didn't allow to search for non-ASCII words such
parts. The code here was copied from show_text_part_content(), because
the show command already does the needed conversion when showing the
message.
2012-02-29 07:41:39 -04:00
Michal Sojka
74f8f15adc test: Add test for searching of uncommonly encoded messages
Emails that are encoded differently than as ASCII or UTF-8 are not
indexed properly by notmuch. It is not possible to search for non-ASCII
words within those messages.
2012-02-29 07:34:54 -04:00
Pieter Praet
13235d3535 doc: minor corrections in notmuch-config.1
* man/man1/notmuch-config.1

  - SYNOPSIS:
    Remove spaces in 'section.item' arg, and indicate that
    `notmuch config set' accepts multiple value args.

  - DESCRIPTION:
    Correct config option to exclude tags from search results.
    ('search.exclude_tags' instead of 'search.exclude')

Also see commit bb8ab4c8.
2012-02-29 07:27:44 -04:00
Mark Walters
95fb22ebdb News for Make buttons for attachments allow viewing as well as saving
On Sat, 21 Jan 2012 09:09:58 -0400, David Bremner <david@tethera.net> wrote:
> On Fri, 20 Jan 2012 09:44:06 +0000, Mark Walters <markwalters1009@gmail.com> wrote:
> > Define a keymap for attachment buttons to allow multiple actions.
> > Define 3 possible actions:
> >     save attachment: exactly as currently,
> >     view attachment: uses mailcap entry,
> >     view attachment with user chosen program
>
> pushed.

Here is a News patch for this feature.

Best wishes

Mark

From fde33258850a438f1810e4158c946b3cf185b5e8 Mon Sep 17 00:00:00 2001
From: Mark Walters <markwalters1009@gmail.com>
Date: Wed, 29 Feb 2012 09:26:17 +0000
Subject: [PATCH] News item for allowing attachment buttons to view as well as save.
2012-02-29 07:24:17 -04:00
Jani Nikula
bf28c60b9f man: add references to maildir flag synchronization
notmuch new, restore, and tag commands support maildir flag
synchronization with notmuch tags. Reference the notmuch-config(1) man
page about it in the relevant man pages.
2012-02-27 22:40:29 -04:00
Jani Nikula
bb8ab4c830 man: document the notmuch configuration settings in notmuch-config(1)
At the risk of duplication between the man page and the configuration
file generated by default, document the notmuch configuration options
in the notmuch config man page.

Existing users of notmuch should not be expected to re-generate their
config file in order to get access to the documentation for new
configuration options.

Include some minor fixes and cleanups while at it.
2012-02-27 22:38:18 -04:00
Austin Clements
f89f3709d6 emacs: Fix out of date comment
The behavior of the header line in show-mode changed from showing the
subject of the first open message to showing the subject of the first
message in 4d77f18b.  Update a comment to reflect this.
2012-02-27 22:36:34 -04:00
Austin Clements
661c357123 Document the JSON schemata used by show and search 2012-02-27 22:32:49 -04:00
Pieter Praet
c5520af0ae NEWS: sync 'new.ignore' entry with its comment in notmuch-config.c
See previous commit.
2012-02-27 22:30:15 -04:00
Pieter Praet
f531f95adc cli: update 'new.ignore' config file comment wrt file/directory matching 2012-02-27 22:30:04 -04:00
Daniel Kahn Gillmor
3f88b96167 Build-Depend on libgmime-2.6-dev | libgmime2.4-dev
libgmime-2.6-dev entered debian unstable today.  If 2.6 is available,
notmuch should build against 2.6 instead of 2.4, as 2.6 is the current
upstream stable version of libgmime.
2012-02-27 21:55:48 -04:00