Commit graph

30 commits

Author SHA1 Message Date
Felipe Contreras
8af4cd160a vim: fix Mail 2.8.0 warning
Passing an unparsed header field to Mail::Field.new is deprecated and will be removed in Mail 2.8.0. Use Mail::Field.parse instead.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-04-26 20:06:13 -03:00
Franz Fellner
ce9f559b86 VIM: Improve performance of folders_render
Simply use query.count_[messages,threads] instead of actually running
the query and using the count attribute of the result set.
2015-01-23 18:18:54 +01:00
Franz Fellner
9d4ff29ad8 VIM: Respect exclude_tags specified in .notmuch-config
Exclude mails tagged with any tag specified in 'notmuch config get
search.exclude_tags' in folders list and search list.
2015-01-22 20:34:31 +01:00
Ian Main
4a1ccfedd9 VIM: Make starting in 'insert' mode for compose optional
This adds a variable to make starting in insert mode optional when
composing and replying to emails.  I found it unusual to be started in
insert mode so I thought I'd make it optional as others may find this as
well.

    Ian
2014-10-21 10:24:52 +02:00
Ian Main
e0ce86119c VIM: Use notmuch CLI for config
This patch switches from reading .notmuch-config directly to using
the CLI the same way that emacs does it.  It actually uses less code
and is probably less error prone.

    Ian
2014-10-21 10:22:44 +02:00
Felipe Contreras
cc8c213bbc vim: improve the way messages are sent
We want the proper encoding and content-type to be set when sending the
mail, but human-readable plain-text for composing. So split the code in
two parts: the presentation and the transport conversion.

This fixes an issue while sending non-ascii mails to strict servers; the
mail needs to be encoded.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2014-05-03 06:00:22 +09:00
Paul Roberts
468deca60c vim: make the html handler configurable
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2014-05-03 05:59:58 +09:00
Felipe Contreras
2fee62fd1f vim: fix count_threads variable check
It never really worked; in Ruby only 'nil' and 'false' evaluate to
false, therefore the statement '0 : true ? false' returns true, so it
doesn't matter if notmuch_folders_count_threads = 0, count_threads would
be true.

We need to check specifically if the value is 1 or 0.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2014-05-03 05:59:38 +09:00
Felipe Contreras
3d15ed9290 vim: check compose is done on delete
Not on unload, which happens when we switch buffers.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:30 -06:00
Felipe Contreras
062a73b931 vim: remove unnecessary buffer queue
Vim handles the buffers just fine: when one is deleted, we go to the
previous one.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:30 -06:00
Felipe Contreras
2c3623703f vim: add wrapper for old variable names
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:30 -06:00
Felipe Contreras
8d3b4ffb56 vim: move default sets to set_defaults()
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
2dedd23943 vim: rename public notmuch_rb variables
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
77c2853d7d vim: rename internal notmuch_rb variables
Now we are the official one.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
24dc32aef7 vim: add option to compose new messages
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
de74431cfe vim: refactor open_reply()
In preparation for composing new messages.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
2ec69fd39e vim: trivial cleanup
Using $email_address is more straight forward.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
Felipe Contreras
568a541262 vim: don't execute search if it's cancelled
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-11-20 07:23:29 -06:00
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
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