Commit graph

2372 commits

Author SHA1 Message Date
Bart Trojanowski
6da6566576 correct message flag enum value so that it matches the type
As per Carl's request, this patch corrects the only value defined under
the notmuch_message_flag_t enum typedef to match the name of the type.

Signed-off-by: Bart Trojanowski <bart@jukie.net>
2009-11-27 20:50:59 -08:00
Alexander Botero-Lowry
ed16edc94d Add some very rudimentary support for handling html parts
If there is an html mime-part in the message and it's the first part,
it gets inlined using `mm-display-part' to convert it to plain text.

The HTML content is still available as a non-text part as well.
2009-11-27 20:47:27 -08:00
David Bremner
12c91e8050 add missing comma in debugging code 2009-11-27 19:51:53 -08:00
Eric Anholt
f0bb5e9c3e notmuch.el: Require message mode to avoid undefined function in replies.
Otherwise, those without keithp's .emacs would end up with reply mode
not being entered.  Suggested by keithp.
2009-11-27 19:45:36 -08:00
Carl Worth
fb1a3452da Fix up whitespace styling from previous commit.
Function name in definition belong left-aligned. Body of if statement
cannot be on the same line as the "if".
2009-11-27 19:38:46 -08:00
Jan Janak
24ae7718b7 notmuch-new: Test if directory looks like Maildir before skipping tmp.
'notmuch new' skips directory entries with the name 'tmp'. This is to
prevent notmuch from processing possibly incomplete Maildir messages
stored in that directory.

This patch attempts to refine the feature. If "tmp" entry is found,
it first checks if the containing directory looks like a Maildir
directory. This is done by searching for other common Maildir
subdirectories. If they exist and if the entry "tmp" is a directory
then it is skipped.

Files and subdirectories with the name "tmp" that do not look like
Maildir will still be processed by 'notmuch new'.

Signed-off-by: Jan Janak <jan@ryngle.com>
2009-11-27 19:37:23 -08:00
Jeffrey C. Ollie
e991148b00 Silence compiler warning by initializing a variable.
If Xapian threw an exception on notmuch_query_count_messages the count
variable could be used uninitialized.  Initialize count to solve the
problem.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2009-11-27 18:38:06 -08:00
Carl Worth
c835e2a505 Merge remote branch 'jukie/vim' 2009-11-27 17:32:50 -08:00
Aneesh Kumar K.V
5c7c6c0bae notmuch-new: Fix notmuch new to look at files within symbolic links
We look at the modified time of the database and the directory
to decide whether we need to look at only the subdirectories.
ie, if directory modified time is < database modified time
then we have already looking at all the files withing the
directory. So we just need to iterate through the subdirectories

But with symlinks we need to make sure we follow them even if
the directory modified time is less than database modified time

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2009-11-27 17:29:10 -08:00
Bart Trojanowski
c984fc43cc notmuch-show: identify which messages printed matched the query string
The show command outputs all messages in the threads that match the
search-terms.  This patch introduces a 'match:[01]' entry to the 'message{'
line output by the show command.  Value of 1 indicates that the message is
matching the search expression.

Signed-off-by: Bart Trojanowski <bart@jukie.net>
2009-11-27 17:07:18 -08:00
Bart Trojanowski
bede40987a have _notmuch_thread_create mark which messages matched the query
When _notmuch_thread_create() is given a query string, it can return more
messages than just those matching the query.  To distinguish those that
matched the query expression, the MATCHING_SEARCH flag is set
appropriately.

Signed-off-by: Bart Trojanowski <bart@jukie.net>
2009-11-27 17:07:06 -08:00
Bart Trojanowski
c57a0b4f8b message: add flags to notmuch_message_t
This patch allows for different flags, internal to notmuch, to be set on a
message object.  The patch does not define any such flags, just the
facilities to manage these flags.

Signed-off-by: Bart Trojanowski <bart@jukie.net>
2009-11-27 17:06:50 -08:00
Jed Brown
00b138ba2a reply --format=headers-only: set In-Reply-To header, with ID *last* in References
Apparently this is actually the correct way to do it, it's silly to do
it wrong just to conform to one of git's internal data structures.
2009-11-27 16:56:51 -08:00
Jed Brown
f47e54bc51 notmuch-reply.c: implement notmuch_reply_format_headers_only
This command only generates References, To, and Cc headers.
The purpose is primarily for use in

  git send-email --notmuch id:<MESSAGE-ID>

to get proper threading and address the relevant parties.  Hooks for
other SCMs may come later.

Signed-off-by: Jed Brown <jed@59A2.org>
2009-11-27 16:56:42 -08:00
Jed Brown
5d447f327f notmuch-reply.c: accept the --format=default default option.
This factors actual generation of the reply out of notmuch_reply_command
into notmuch_reply_format_default(), in preparation for other --format=
options.

Signed-off-by: Jed Brown <jed@59A2.org>
2009-11-27 16:56:23 -08:00
Bart Trojanowski
e6628e78d9 vim: use <Space> more consistently in search view
In search view <Space> will show the thead, but folding messages that
don't match the current search expression.  Conversly, <Enter> always
shows all messages in the thread.
2009-11-27 18:02:05 -05:00
Bart Trojanowski
7a215c2de8 Merge remote branch 'origin/master' into vim 2009-11-27 17:49:54 -05:00
Bart Trojanowski
16a00de924 vim: make it possible to start a search in show mode 2009-11-27 17:43:01 -05:00
Bart Trojanowski
dffee11a40 vim: don't toggle folds that are inside closed folds in show mode 2009-11-27 17:18:41 -05:00
Bart Trojanowski
e5a25c7692 vim: primitive reply to message 2009-11-27 16:52:00 -05:00
Bart Trojanowski
ab3ce6196e vim: primitive reply to thread 2009-11-27 16:48:52 -05:00
Bart Trojanowski
0ef04e14ff vim: few compose mode updates, including README 2009-11-27 16:47:39 -05:00
Bart Trojanowski
e13bdc2c0e vim: don't remove headers until after parsing them 2009-11-27 14:05:13 -05:00
Bart Trojanowski
fd805c16c3 vim: fix off-by-one error when removing header from message to send out 2009-11-27 14:02:25 -05:00
Bart Trojanowski
b76852dcc5 vim: generalize compose buffer function further 2009-11-27 13:32:57 -05:00
Bart Trojanowski
ef81270760 vim: have ,nmr just reload the plugin w/o restarting state 2009-11-27 13:08:30 -05:00
Bart Trojanowski
d1eb2c6ce5 vim: make it possible to replace NM_cobine_tags() 2009-11-27 13:06:46 -05:00
Bart Trojanowski
efa9df2d49 vim: add a helper to combine tag search expressions 2009-11-27 11:04:54 -05:00
Bart Trojanowski
5030989ee0 vim: README updates and corrections 2009-11-27 09:43:06 -05:00
Bart Trojanowski
43cfdab608 vim: have '?' show search words in search mode 2009-11-27 09:35:49 -05:00
Jed Brown
0ce9c53fd4 notmuch-search-add/remove-tag: restrict to messages in current query
Rather than tagging the everything in the thread.  This is arguably more
desirable behavior and is consistent with clearly desirably behavior of
notmuch-search-operate-all.

Note that this change applies indirectly to
notmuch-search-archive-thread (which is actually equivalent behavior
since this function is primarily used when browsing an inbox).

Signed-off-by: Jed Brown <jed@59A2.org>
2009-11-27 05:57:07 -08:00
Jed Brown
7293d84826 New function notmuch-search-operate-all: operate on all messages in the current query.
It is often convenient to change tags on several messages at once.  This
function applies any number of tag whitespace-delimited tag
modifications to all messages matching the current query.

I have bound this to `*'.

Signed-off-by: Jed Brown <jed@59A2.org>
2009-11-27 05:57:04 -08:00
Bart Trojanowski
dfb0b97b3c vim: cleanup error messages 2009-11-27 01:34:08 -05:00
Bart Trojanowski
a04334e959 vim: fix regexp for cleaning search list 2009-11-27 01:31:16 -05:00
Bart Trojanowski
5b8f74b512 vim: force deleting buffers 2009-11-27 01:18:00 -05:00
Bart Trojanowski
becc49eee7 vim: fix message parsing patterns
if a message did not contain a trailing CR, we may not be able to match ^\f
2009-11-27 01:17:36 -05:00
Bart Trojanowski
b5e28d8615 vim: implement sending with ,s from compose buffer 2009-11-27 01:03:35 -05:00
Bart Trojanowski
05d76deb2e vim: store previous buffer number when starting to compose 2009-11-27 01:02:50 -05:00
Bart Trojanowski
651b215f0f vim: make sure headers begin with \w 2009-11-27 01:02:37 -05:00
Bart Trojanowski
350e013696 vim: allow overriding how newBuffer is created 2009-11-27 01:01:37 -05:00
Bart Trojanowski
9012c65282 vim: replace echo\nreturn with trhow in a few places 2009-11-26 23:11:38 -05:00
Bart Trojanowski
aa312db8cd vim: make insert in compose mode configurable 2009-11-26 23:09:57 -05:00
Bart Trojanowski
8bafbac75c vim: add a helpful header to notmuch-compose mode 2009-11-26 23:07:07 -05:00
Bart Trojanowski
805633becc vim: syntax highlighting for notmuch-compose mode 2009-11-26 22:32:17 -05:00
Bart Trojanowski
b078a0c8c2 vim: add support for <Tab> in compose mode
this will skip to the next header in insert and normal modes, and
behave like <Tab> otherwise.
2009-11-26 22:32:02 -05:00
Bart Trojanowski
0aa5f7d250 vim: add support for :NotMuch compose
... but it doesn't send yet.
2009-11-26 22:30:13 -05:00
Bart Trojanowski
5bb149aab2 vim: cleanup settings in newBuffer() and make them local 2009-11-26 22:25:43 -05:00
Bart Trojanowski
bbca6e03c6 vim: add a line splitter that understands quotes
this makes it possible to tokenise expressions like
   :NotMuch compose 'subject: one two three' to:bart@jukie.net
2009-11-26 22:24:33 -05:00
Bart Trojanowski
480903adac vim: allow for different types of mappings not just normal mode ones 2009-11-26 22:22:30 -05:00
Tassilo Horn
b7898b0c2a Return unpropertized strings for filename and message-id 2009-11-26 13:18:20 -08:00