[RFC/PATCH] Vim client rewrite

2011-05-16 Thread Anton Khirnov

On Mon, 16 May 2011 14:36:07 +0300, Felipe Contreras  wrote:
> On Sun, May 15, 2011 at 10:15 PM,   wrote:
> > my attempts to make the vim client more usable somehow spiraled out of
> > control and turned into a huge rewrite. The intermediate results I
> > hereby present for your amusement and comments.
> > (attached as whole files, since the patch would be unreadable)
> >
> > The main point of the rewrite is splitting of a large part of the code
> > into Python. This should have the following advantages:
> > 1) python-notmuch bindings can be used, which should allow for cleaner
> > ? and more reliable code than running the binary and parsing its output
> > ? with regexps.
> > ? (also provides a nice use case for python-notmuch)
> > 2) Python's huge standard library makes implementing some features MUCH 
> > easier.
> > 3) More people know Python than vimscript, thus making the client
> > ? development easier
> >
> > The code is ? quality, but should be close to usable.
> > It already has some features not present in the mainline vim client,
> > like attachments (viewing and sending, saving to file should be trivial
> > to add, will be done when I have some time), better support for unicode
> > and more.
> >
> > Some UI features from the mainline versions that I didn't use were
> > removed and customization options are somewhat lacking atm. This is of
> > course to be improved later, depending on the responses.
> >
> > Comments, bugreports and fixes very much welcome.
> 
> Do you have a git repo where to fetch these changes? Or can you
> provide a series of patches with 'git format-patch'?
> 

Ah right, forgot to mention it.
git://git.khirnov.net/git/notmuch
branch vim.

--
Anton Khirnov


[RFC/PATCH] Vim client rewrite

2011-05-16 Thread Felipe Contreras
On Sun, May 15, 2011 at 10:15 PM,   wrote:
> my attempts to make the vim client more usable somehow spiraled out of
> control and turned into a huge rewrite. The intermediate results I
> hereby present for your amusement and comments.
> (attached as whole files, since the patch would be unreadable)
>
> The main point of the rewrite is splitting of a large part of the code
> into Python. This should have the following advantages:
> 1) python-notmuch bindings can be used, which should allow for cleaner
> ? and more reliable code than running the binary and parsing its output
> ? with regexps.
> ? (also provides a nice use case for python-notmuch)
> 2) Python's huge standard library makes implementing some features MUCH 
> easier.
> 3) More people know Python than vimscript, thus making the client
> ? development easier
>
> The code is ? quality, but should be close to usable.
> It already has some features not present in the mainline vim client,
> like attachments (viewing and sending, saving to file should be trivial
> to add, will be done when I have some time), better support for unicode
> and more.
>
> Some UI features from the mainline versions that I didn't use were
> removed and customization options are somewhat lacking atm. This is of
> course to be improved later, depending on the responses.
>
> Comments, bugreports and fixes very much welcome.

Do you have a git repo where to fetch these changes? Or can you
provide a series of patches with 'git format-patch'?

-- 
Felipe Contreras


Re: [RFC/PATCH] Vim client rewrite

2011-05-16 Thread Felipe Contreras
On Sun, May 15, 2011 at 10:15 PM,  an...@khirnov.net wrote:
 my attempts to make the vim client more usable somehow spiraled out of
 control and turned into a huge rewrite. The intermediate results I
 hereby present for your amusement and comments.
 (attached as whole files, since the patch would be unreadable)

 The main point of the rewrite is splitting of a large part of the code
 into Python. This should have the following advantages:
 1) python-notmuch bindings can be used, which should allow for cleaner
   and more reliable code than running the binary and parsing its output
   with regexps.
   (also provides a nice use case for python-notmuch)
 2) Python's huge standard library makes implementing some features MUCH 
 easier.
 3) More people know Python than vimscript, thus making the client
   development easier

 The code is α quality, but should be close to usable.
 It already has some features not present in the mainline vim client,
 like attachments (viewing and sending, saving to file should be trivial
 to add, will be done when I have some time), better support for unicode
 and more.

 Some UI features from the mainline versions that I didn't use were
 removed and customization options are somewhat lacking atm. This is of
 course to be improved later, depending on the responses.

 Comments, bugreports and fixes very much welcome.

Do you have a git repo where to fetch these changes? Or can you
provide a series of patches with 'git format-patch'?

-- 
Felipe Contreras
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [RFC/PATCH] Vim client rewrite

2011-05-16 Thread Anton Khirnov

On Mon, 16 May 2011 14:36:07 +0300, Felipe Contreras 
felipe.contre...@gmail.com wrote:
 On Sun, May 15, 2011 at 10:15 PM,  an...@khirnov.net wrote:
  my attempts to make the vim client more usable somehow spiraled out of
  control and turned into a huge rewrite. The intermediate results I
  hereby present for your amusement and comments.
  (attached as whole files, since the patch would be unreadable)
 
  The main point of the rewrite is splitting of a large part of the code
  into Python. This should have the following advantages:
  1) python-notmuch bindings can be used, which should allow for cleaner
    and more reliable code than running the binary and parsing its output
    with regexps.
    (also provides a nice use case for python-notmuch)
  2) Python's huge standard library makes implementing some features MUCH 
  easier.
  3) More people know Python than vimscript, thus making the client
    development easier
 
  The code is α quality, but should be close to usable.
  It already has some features not present in the mainline vim client,
  like attachments (viewing and sending, saving to file should be trivial
  to add, will be done when I have some time), better support for unicode
  and more.
 
  Some UI features from the mainline versions that I didn't use were
  removed and customization options are somewhat lacking atm. This is of
  course to be improved later, depending on the responses.
 
  Comments, bugreports and fixes very much welcome.
 
 Do you have a git repo where to fetch these changes? Or can you
 provide a series of patches with 'git format-patch'?
 

Ah right, forgot to mention it.
git://git.khirnov.net/git/notmuch
branch vim.

--
Anton Khirnov
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[RFC/PATCH] Vim client rewrite

2011-05-15 Thread an...@khirnov.net

Hi,

my attempts to make the vim client more usable somehow spiraled out of
control and turned into a huge rewrite. The intermediate results I
hereby present for your amusement and comments.
(attached as whole files, since the patch would be unreadable)

The main point of the rewrite is splitting of a large part of the code
into Python. This should have the following advantages:
1) python-notmuch bindings can be used, which should allow for cleaner
   and more reliable code than running the binary and parsing its output
   with regexps.
   (also provides a nice use case for python-notmuch)
2) Python's huge standard library makes implementing some features MUCH easier.
3) More people know Python than vimscript, thus making the client
   development easier

The code is ? quality, but should be close to usable.
It already has some features not present in the mainline vim client,
like attachments (viewing and sending, saving to file should be trivial
to add, will be done when I have some time), better support for unicode
and more.

Some UI features from the mainline versions that I didn't use were
removed and customization options are somewhat lacking atm. This is of
course to be improved later, depending on the responses.

Comments, bugreports and fixes very much welcome.

--
Anton Khirnov
-- next part --
" notmuch.vim plugin --- run notmuch within vim
"
" Copyright ? Carl Worth
"
" This file is part of Notmuch.
"
" Notmuch is free software: you can redistribute it and/or modify it
" under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
" (at your option) any later version.
"
" Notmuch is distributed in the hope that it will be useful, but
" WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
" General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with Notmuch.  If not, see .
"
" Authors: Bart Trojanowski 
" Contributors: Felipe Contreras ,
"   Peter Hartman 
"

if exists('s:notmuch_loaded') || 
finish
endif
let s:notmuch_loaded = 1


" --- configuration defaults {{{1

let s:notmuch_defaults = {
\ 'g:notmuch_cmd':   'notmuch'  
  ,
\
\ 'g:notmuch_search_newest_first':   1  
  ,
\
\ 'g:notmuch_compose_insert_mode_start': 1  
  ,
\ 'g:notmuch_compose_header_help':   1  
  ,
\ 'g:notmuch_compose_temp_file_dir': '~/.notmuch/compose/'  
  ,
\ 'g:notmuch_fcc_maildir':   'sent' 
  ,
\ }

" defaults for g:notmuch_folders
" override with: let g:notmuch_folders = [ ... ]
let s:notmuch_folders_defaults = [
\ [ 'new','tag:inbox and tag:unread' ],
\ [ 'inbox',  'tag:inbox'],
\ [ 'unread', 'tag:unread'   ],
\ ]

let s:notmuch_show_headers_defaults = [
\ 'From',
\ 'To',
\ 'Cc',
\ 'Subject',
\ 'Date',
\ 'Reply-To',
\ 'Message-Id',
\]

" defaults for g:notmuch_compose_headers
" override with: let g:notmuch_compose_headers = [ ... ]
let s:notmuch_compose_headers_defaults = [
\ 'From',
\ 'To',
\ 'Cc',
\ 'Bcc',
\ 'Subject'
\ ]

" --- keyboard mapping definitions {{{1

" --- --- bindings for folders mode {{{2

let g:notmuch_folders_maps = {
\ 'm':  ':call NM_new_mail()',
\ 's':  ':call NM_search_prompt(0)',
\ 'q':  ':call NM_kill_this_buffer()',
\ '=':  ':call NM_folders_refresh_view()',
\ '':':call NM_folders_show_search()',
\ '':':call NM_folders_show_search(''tag:unread'')',
\ 'tt': ':call NM_folders_from_tags()',
\ }

" --- --- bindings for search screen {{{2
let g:notmuch_search_maps = {
\ '':':call NM_search_show_thread()',
\ '':':call NM_search_show_thread()',
\ '':  ':call NM_search_expand()',
\ 'a':  ':call NM_search_archive_thread()',
\ 'A':  ':call 
NM_search_mark_read_then_archive_thread()',
\ 'D':  ':call NM_search_delete_thread()',
\ 'f':  ':call NM_search_filter()',
\ 'm':  ':call NM_new_mail()',
\ 'o':  ':call NM_search_toggle_order()',
\ 'r':  ':call NM_search_reply_to_thread()',
\ 's':  ':call NM_search_prompt(0)',
\ ',s': ':call NM_search_prompt(1)',
\ 'q':  ':call NM_kill_this_buffer()',
\ '+':  ':call NM_search_add_tags([])',
\ '-':  ':call NM_search_remove_tags([])',
\ '=':  ':call