Commit graph

156 commits

Author SHA1 Message Date
Felipe Contreras
ce5f3f3809 vim: generate custom message-id
Using Mail as a reference.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
6ff607d6a0 vim: split $email_address
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
a760e4ab47 vim: allow calling with arguments
For example:

  :NotMuch date:today

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
77c2c3143b vim: add option to save the patches of a patch series
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
2d583fb17a vim: use much clearer sort constant
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
01859bd7ce vim: show first message of the thread
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
85b3dc9f0f vim: refactor database handling
To minimize memory usage we need to destroy the queries and the
databases, so we should keep track of them.

Each buffer gets a database connection that is destroyed when the buffer
is destroyed, and all the queries along with it.

Ideally notmuch should destroy the queries when the database is
destroyed, but it's not doing that at the moment.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
47e1f39c56 vim: use notmuch fields
They are better encoded than Ruby's Mail.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
a0b0baaf2b vim: don't automatically refresh after tagging
This operation might take a while, and even if it only takes fractions
of a second, that's not what the user might want.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Charlie Allom
6f8a1345eb vim: run mutt in default term
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
David Bremner
0eb4213766 debian: build notmuch-vim again
Based on id:1370220299-14722-1-git-send-email-felipe.contreras@gmail.com

Hacked rather extensively by db. The most important changes:

       - bring back notmuch.yaml for the (debian specific?) vim-addons
         tool.
       - depend on vim-ruby, so we get a version of vim with ruby installed.
2013-07-28 13:48:02 -03:00
Felipe Contreras
bf8877fe45 vim: use the old vim plugin function name
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-06-02 19:49:49 -05:00
Felipe Contreras
138c6aa098 Add new notmuch vim plugin
The old one was not properly maintained and is now deprecated. The new
one has much better support.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-06-02 19:42:43 -05:00
David Bremner
6ee07a9c6d notmuch-vim: deprecate, move to contrib
As discussed in id:871udhcmks.fsf@zancas.localnet, notmuch-vim doesn't
really meet the standards of the CLI, emacs interface, or python
bindings in terms of being well maintained.
2013-02-16 08:03:09 -04:00
Felipe Contreras
85e991affc vim: simplify build
There should be no functional changes, except that you don't need to
make the directories before installing.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2012-04-21 05:19:30 +03:00
Jakob
ae525b7e5b vim: fix regex after "notmuch show" output change
The new field "excluded" was added to the output and made this regex fail.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2012-04-21 05:19:30 +03:00
Jason Woofenden
8b10e4d569 vim: fix citation/signature fold lengths
Before they'd often miss the last line

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-07-16 21:57:38 +03:00
Jason Woofenden
6c6c8a9c85 vim: fix (hack) cig/cit parsing within multipart/*
The vim front-end isn't written to handle nested parts.

This patch doesn't change that, it just changes the code to pretend that
multipart/* sections end immediately. This makes the parsing code think that
all sections are top-level, and are thus parsed well enough.

The lovely result of this is that citation folds and signature folds now work
in text/plain parts that are within multipart/* sections. Also, all mime
section starts are now shown correctly (before some were not parsed and showed
the ugly ^L and an ID and so on from notmuch.)

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-07-16 21:57:38 +03:00
Jason Woofenden
3de487d405 vim: fix on-screen instructions for show-signature
Also change a passed parameter to be consistent with the current binding. This
parameter appears to be unused.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-07-16 21:57:38 +03:00
Jason Woofenden
f5c20b8b08 vim: fix from list reformatting in search view
This patch rewrites the reformatting of the from list so it shows full
capitalized names when available (without truncating them as the old code did)
and removes the pipe characters that appear between some names.

The old code appears to assume from list (the list of senders in the thread)
coming from notmuch would be e-mail addresses, but in this version it is mostly
full names. Also in this version, the names are sometimes separated by pipe
instead of comma.

For consistency with old versions, names are still truncated at the first
period. Perhaps they shouldn't be though.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-07-16 21:57:38 +03:00
Jason Woofenden
2b79776eed vim: fix space key: now archives (did opposite)
In vim, in the message view, space is supposed to remove the "unread" and
"inbox" tags, but was sometimes adding them instead.

This patch assures that they are always removed by this binding.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-07-16 21:57:38 +03:00
Uwe Kleine-König
bab653ce39 vim: use the full path for sendmail
... as /usr/sbin isn't usually in user's PATH.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-07-16 21:57:38 +03:00
Uwe Kleine-König
bcb17491b5 vim: skip trailing slash for g:notmuch_compose_temp_file_dir
With the trailing slash I get

	Error detected while processing function <SNR>10_NM_new_mail..<SNR>10_NM_cmd_compose..<SNR>10_NM_newComposeBuffer..<SNR>10_NM_newFileBuffer:
	line    3:
	E739: Cannot create directory: /home/ukleinek/.notmuch/compose/

when hitting 'm' to compose a new mail. strace shows:

	stat("/home/ukleinek/.notmuch/compose/", 0x7fffee314a10) = -1 ENOENT (No such file or directory)
	stat("/home/ukleinek/.notmuch/compose/", 0x7fffee314e30) = -1 ENOENT (No such file or directory)
	stat("/home/ukleinek/.notmuch/compose", 0x7fffee315270) = -1 ENOENT (No such file or directory)
	stat("/home/ukleinek/.notmuch", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
	mkdir("/home/ukleinek/.notmuch/compose", 0755) = 0
	mkdir("/home/ukleinek/.notmuch/compose/", 0755) = -1 EEXIST (File exists)

so it seems vim's mkdir() isn't able to handle a trailing slash.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-07-16 21:49:12 +03:00
Uwe Kleine-König
9d0e2ebc07 vim: fix documentation that mailx isn't used anymore
Since
	e7899b0 (vim: use sendmail directly)
notmuch-vim uses sendmail directly.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-07-16 21:49:09 +03:00
Pieter Praet
607a73010a fix sum moar typos [error messages]
Various typo fixes in error messages within the source code.

Signed-off-by: Pieter Praet <pieter@praet.org>

Edited-by: Carl Worth <cworth@cworth.org> Restricted to just error messages.
2011-06-23 15:59:03 -07:00
Pieter Praet
8bb6f7869c fix sum moar typos [comments in source code]
Various typo fixes in comments within the source code.

Signed-off-by: Pieter Praet <pieter@praet.org>

Edited-by: Carl Worth <cworth@cworth.org> Restricted to just
source-code comments, (and fixed fix of "descriptios" to "descriptors"
rather than "descriptions").
2011-06-23 15:58:39 -07:00
Pieter Praet
18bf91def9 fix sum moar typos [text files]
Various typo fixes in auxiliary text files included with the source,
(README, TODO, etc.).

Signed-off-by: Pieter Praet <pieter@praet.org>

Edited-by: Carl Worth <cworth@cworth.org> Restricted to just text files.
2011-06-23 15:40:50 -07:00
Felipe Contreras
e96741388a vim: add delete commands
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-05-31 17:52:23 -07:00
Felipe Contreras
8344c439bf vim: add support for delete in search view
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-05-31 17:52:23 -07:00
Felipe Contreras
06a292018d vim: add support to mark as read in search view
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-05-31 17:52:23 -07:00
Felipe Contreras
e236142f03 vim: add support to mark as read in show view
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-05-31 17:52:23 -07:00
Felipe Contreras
81347e289f vim: parse 'from' address
In order to pass it to sendmail.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-05-04 23:38:38 +03:00
Felipe Contreras
e7899b00d0 vim: use sendmail directly
The problem with 'mailx' is that it's not standardized, and it doesn't
allow the -f option, which is pretty important on many sendmail
configurations.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-05-04 23:38:38 +03:00
Felipe Contreras
5cdf424657 vim: add myself (Felipe Contreras) as contributor
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-05-04 23:14:37 +03:00
Felipe Contreras
ac9b9cf56a vim: implement archive in show view
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-05-04 23:06:10 +03:00
Felipe Contreras
3cac5f8acb vim: refactor tagging stuff
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2011-05-04 23:06:09 +03:00
Peter John Hartman
4aeb291c78 vim: Get user email address from notmuch config file.
Here's a bitty patch to the vim plugin; it now calculates the primary email
of the user based on a call to notmuch config.  There's still a lot of work
that needs to get done on notmuch.vim, e.g., the ability to have multiple
emails/accounts.
2011-01-26 16:57:58 +10:00
Felipe Contreras
dedd7918a3 vim: include own improved git-diff syntax
The old one wasn't working at all on newer vims.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2010-11-08 10:00:18 -08:00
Felipe Contreras
eb80315d5a vim: run(): optimize non-debug path
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2010-11-08 10:00:18 -08:00
Felipe Contreras
6b9aa725ad vim: use mailx for sending
Possilby used by more systems, and besides the code wasn't really
working properly anyway.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2010-11-08 10:00:18 -08:00
Felipe Contreras
5a8903f05a vim: add option to mark as read + archive
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2010-11-08 10:00:18 -08:00
Felipe Contreras
c639ffae1e vim: remove add_remove_tags_on_screen()
It's not working properly; the current message is jumping around and the
tags not really added/removed properly.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2010-11-08 10:00:17 -08:00
Felipe Contreras
4c3203eca8 vim: cleanup search syntax
It was *sloooooow*.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2010-11-08 10:00:17 -08:00
Felipe Contreras
75633b3220 vim: cleanup search buffer
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2010-11-08 10:00:17 -08:00
Felipe Contreras
087e292d11 vim: add archive support from 'show'
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2010-11-08 10:00:17 -08:00
Ben Gamari
2805a243b5 Fix typo in message 2010-04-15 19:43:56 -07:00
martin f. krafft
6e4be17ab8 Install vim plugin with vim-addons
Signed-off-by: martin f. krafft <madduck@debian.org>
2010-01-21 14:58:19 +13:00
Bart Trojanowski
0ca1611416 vim: preserve the 'show everything' flag when finding next/prev buffer
When show mode is invoked it could be displaying just the matched messages
or everything.  This flag is passed to NM_search_show_thread().  It is then
stored in a buffer variable, b:nm_show_everything, and used for subsequent
calls to NM_search_show_thread() triggered by <Space>, <C-n> and <C-p>.

Signed-off-by: Bart Trojanowski <bart@jukie.net>
2009-12-03 13:30:21 -08:00
Bart Trojanowski
8a3352e619 vim: use notmuch show --entire-thread 2009-12-02 14:37:15 -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