[PATCH 00/13] vim: a bunch of updates from upstream

classic Classic list List threaded Threaded
19 messages Options
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH 00/13] vim: a bunch of updates from upstream

I finally took some time to update notmuch-vim and include some fixes,
as well as pull requests.

Here are the transplanted patches.

Aaron Borden (3):
  vim: option to add email address to reply quote
  vim: option to add reply quote datetime
  vim: syntax: fix message description highlighting

Felipe Contreras (9):
  vim: fix Mail 2.8.0 warning
  vim: doc: small fixes
  vim: fix for missing parts
  vim: show first part if no text part is detected
  vim: trivial cleanup
  vim: use notmuch config command
  vim: trivial cleanup
  vim: remove backwards compatibility wrappers
  vim: README: sync with upstream

John Gliksberg (1):
  vim: doc: minor spelling fix

 vim/README                  |  27 +++++---
 vim/notmuch.txt             |  19 +++++-
 vim/notmuch.vim             | 120 +++++++++++++++---------------------
 vim/syntax/notmuch-show.vim |   4 +-
 4 files changed, 86 insertions(+), 84 deletions(-)

--
2.31.0
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH 01/13] 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 <[hidden email]>
---
 vim/notmuch.vim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index ad8b7c80..541698cd 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -666,7 +666,7 @@ ruby << EOF
  date = Time.at(e.newest_date).strftime(date_fmt)
  subject = e.messages.first['subject']
  if $mail_installed
- subject = Mail::Field.new("Subject: " + subject).to_s
+ subject = Mail::Field.parse("Subject: " + subject).to_s
  else
  subject = subject.force_encoding('utf-8')
  end
--
2.31.0
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH 02/13] vim: doc: small fixes

In reply to this post by Felipe Contreras
Signed-off-by: Felipe Contreras <[hidden email]>
---
 vim/notmuch.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vim/notmuch.txt b/vim/notmuch.txt
index 43741022..4a038102 100644
--- a/vim/notmuch.txt
+++ b/vim/notmuch.txt
@@ -89,7 +89,7 @@ s Send
 CONFIGURATION *notmuch-config*
 
 You can add the following configurations to your `.vimrc`, or
-`~/.vim/plugin/notmuch.vim`.
+`~/.vim/after/plugin/notmuch.vim`.
 
  *g:notmuch_folders*
 
@@ -138,7 +138,7 @@ You can do the same for the thread view:
 
 If you want to count the threads instead of the messages in the folder view:
 >
- let g:notmuch_folders_count_threads = 0
+ let g:notmuch_folders_count_threads = 1
 <
 
  *g:notmuch_reader*
--
2.31.0
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH 03/13] vim: doc: minor spelling fix

In reply to this post by Felipe Contreras
From: John Gliksberg <[hidden email]>

Signed-off-by: Felipe Contreras <[hidden email]>
---
 vim/notmuch.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vim/notmuch.txt b/vim/notmuch.txt
index 4a038102..c98f2b53 100644
--- a/vim/notmuch.txt
+++ b/vim/notmuch.txt
@@ -144,7 +144,7 @@ If you want to count the threads instead of the messages in the folder view:
  *g:notmuch_reader*
  *g:notmuch_sendmail*
 
-You can also configure your externail mail reader and sendemail program:
+You can also configure your external mail reader and sendmail program:
 >
  let g:notmuch_reader = 'mutt -f %s'
  let g:notmuch_sendmail = 'sendmail'
--
2.31.0
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH 04/13] vim: fix for missing parts

In reply to this post by Felipe Contreras
Sometimes Mail incorrectly parses multipart messages.

See: https://github.com/mikel/mail/issues/1438

Check for empty parts instead of crashing.

Signed-off-by: Felipe Contreras <[hidden email]>
---
 vim/notmuch.vim | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index 541698cd..e2362a2d 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -332,9 +332,13 @@ ruby << EOF
  b << "Cc: %s" % msg['cc']
  b << "Date: %s" % msg['date']
  nm_m.body_start = b.count
- b << "--- %s ---" % part.mime_type
- part.convert.each_line do |l|
- b << l.chomp
+ if part
+ b << "--- %s ---" % part.mime_type
+ part.convert.each_line do |l|
+ b << l.chomp
+ end
+ else
+ b << "--- %s ---" % 'missing'
  end
  b << ""
  nm_m.end = b.count
--
2.31.0
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH 05/13] vim: show first part if no text part is detected

In reply to this post by Felipe Contreras
Better something than nothing.

Signed-off-by: Felipe Contreras <[hidden email]>
---
 vim/notmuch.vim | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index e2362a2d..dd715828 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -333,7 +333,7 @@ ruby << EOF
  b << "Date: %s" % msg['date']
  nm_m.body_start = b.count
  if part
- b << "--- %s ---" % part.mime_type
+ b << "--- %s ---" % [part.mime_type || 'none']
  part.convert.each_line do |l|
  b << l.chomp
  end
@@ -925,7 +925,7 @@ ruby << EOF
 
  def find_first_text
  return self if not multipart?
- return text_part || html_part
+ return text_part || html_part || parts.first
  end
 
  def convert
--
2.31.0
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH 06/13] vim: trivial cleanup

In reply to this post by Felipe Contreras
Signed-off-by: Felipe Contreras <[hidden email]>
---
 vim/notmuch.vim | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index dd715828..97167461 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -471,9 +471,8 @@ function! s:NotMuch(...)
 
 ruby << EOF
  require 'notmuch'
- require 'rubygems'
- require 'tempfile'
  require 'socket'
+ require 'tempfile'
  begin
  require 'mail'
  rescue LoadError
--
2.31.0
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH 07/13] vim: use notmuch config command

In reply to this post by Felipe Contreras
This simplifies the configuration parsing, is more efficient, and also
reverts back to previous logic.

Signed-off-by: Felipe Contreras <[hidden email]>
---
 vim/notmuch.vim | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index 97167461..8777d412 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -484,24 +484,22 @@ ruby << EOF
  $searches = []
  $threads = []
  $messages = []
+ $config = {}
  $mail_installed = defined?(Mail)
 
- def get_config_item(item)
- result = ''
- IO.popen(['notmuch', 'config', 'get', item]) { |out|
- result = out.read
- }
- return result.rstrip
- end
-
  def get_config
- $db_name = get_config_item('database.path')
- $email_name = get_config_item('user.name')
- $email_address = get_config_item('user.primary_email')
- $email_name = get_config_item('user.name')
+ IO.popen(%w[notmuch config list]) do |io|
+ io.each(chomp: true) do |e|
+ key, value = e.split('=')
+ $config[key] = value
+ end
+ end
+
+ $db_name = $config['database.path']
+ $email_name = $config['user.name']
+ $email_address = $config['user.primary_email']
+ $exclude_tags = $config['search.exclude_tags']&.split(';') || []
  $email = "%s <%s>" % [$email_name, $email_address]
- ignore_tags = get_config_item('search.exclude_tags')
- $exclude_tags = ignore_tags.split("\n")
  end
 
  def vim_puts(s)
--
2.31.0
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH 08/13] vim: trivial cleanup

In reply to this post by Felipe Contreras
Signed-off-by: Felipe Contreras <[hidden email]>
---
 vim/notmuch.vim | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index 8777d412..7a448467 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -641,9 +641,7 @@ ruby << EOF
  $searches.clear
  folders.each do |name, search|
  q = $curbuf.query(search)
- $exclude_tags.each { |t|
- q.add_tag_exclude(t)
- }
+ $exclude_tags.each { |e| q.add_tag_exclude(e) }
  $searches << search
  count = count_threads ? q.count_threads : q.count_messages
  b << "%9d %-20s (%s)" % [count, name, search]
@@ -655,9 +653,7 @@ ruby << EOF
  date_fmt = VIM::evaluate('g:notmuch_date_format')
  q = $curbuf.query(search)
  q.sort = Notmuch::SORT_NEWEST_FIRST
- $exclude_tags.each { |t|
- q.add_tag_exclude(t)
- }
+ $exclude_tags.each { |e| q.add_tag_exclude(e) }
  $threads.clear
  t = q.search_threads
 
--
2.31.0
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH 09/13] vim: option to add email address to reply quote

In reply to this post by Felipe Contreras
From: Aaron Borden <[hidden email]>

Cleanup-by: Felipe Contreras <[hidden email]>
Signed-off-by: Felipe Contreras <[hidden email]>
---
 vim/notmuch.txt | 6 ++++++
 vim/notmuch.vim | 7 +++++++
 2 files changed, 13 insertions(+)

diff --git a/vim/notmuch.txt b/vim/notmuch.txt
index c98f2b53..b658020d 100644
--- a/vim/notmuch.txt
+++ b/vim/notmuch.txt
@@ -133,6 +133,12 @@ You can do the same for the thread view:
 >
  let g:notmuch_datetime_format = '%d.%m.%y %H:%M:%S'
 <
+ *g:notmuch_reply_quote_format*
+
+If you want to change the reply quote format to show the email address:
+>
+ let g:notmuch_reply_quote_format = '%s <%s>'
+<
 
  *g:notmuch_folders_count_threads*
 
diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index 7a448467..59914a76 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -56,6 +56,7 @@ let s:notmuch_folders_default = [
 
 let s:notmuch_date_format_default = '%d.%m.%y'
 let s:notmuch_datetime_format_default = '%d.%m.%y %H:%M:%S'
+let s:notmuch_reply_quote_format_default = '%s'
 let s:notmuch_reader_default = 'mutt -f %s'
 let s:notmuch_sendmail_default = 'sendmail'
 let s:notmuch_folders_count_threads_default = 0
@@ -413,6 +414,10 @@ function! s:set_defaults()
  endif
  endif
 
+ if !exists('g:notmuch_reply_quote_format')
+ let g:notmuch_reply_quote_format = s:notmuch_reply_quote_format_default
+ endif
+
  if !exists('g:notmuch_reader')
  if exists('g:notmuch_rb_reader')
  let g:notmuch_reader = g:notmuch_rb_reader
@@ -593,6 +598,8 @@ ruby << EOF
  addr = Mail::Address.new(orig[:from].value)
  name = addr.name
  name = addr.local + "@" if name.nil? && !addr.local.nil?
+ name_format = VIM::evaluate('g:notmuch_reply_quote_format')
+ name = name_format % [name, addr.address] if !addr.address.nil?
  else
  name = orig[:from]
  end
--
2.31.0
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH 10/13] vim: option to add reply quote datetime

In reply to this post by Felipe Contreras
From: Aaron Borden <[hidden email]>

By default it's empty so the format doesn't change.

Cleanup-by: Felipe Contreras <[hidden email]>
Signed-off-by: Felipe Contreras <[hidden email]>
---
 vim/notmuch.txt |  7 +++++++
 vim/notmuch.vim | 12 +++++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/vim/notmuch.txt b/vim/notmuch.txt
index b658020d..a8a75fed 100644
--- a/vim/notmuch.txt
+++ b/vim/notmuch.txt
@@ -140,6 +140,13 @@ If you want to change the reply quote format to show the email address:
  let g:notmuch_reply_quote_format = '%s <%s>'
 <
 
+ *g:notmuch_reply_quote_datetime_format*
+
+There's also a way to specy the reply quote datetime format:
+>
+ let g:notmuch_reply_quote_datetime_format = '%a %b %e'
+<
+
  *g:notmuch_folders_count_threads*
 
 If you want to count the threads instead of the messages in the folder view:
diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index 59914a76..e717fb5a 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -57,6 +57,7 @@ let s:notmuch_folders_default = [
 let s:notmuch_date_format_default = '%d.%m.%y'
 let s:notmuch_datetime_format_default = '%d.%m.%y %H:%M:%S'
 let s:notmuch_reply_quote_format_default = '%s'
+let s:notmuch_reply_quote_datetime_format_default = ''
 let s:notmuch_reader_default = 'mutt -f %s'
 let s:notmuch_sendmail_default = 'sendmail'
 let s:notmuch_folders_count_threads_default = 0
@@ -418,6 +419,10 @@ function! s:set_defaults()
  let g:notmuch_reply_quote_format = s:notmuch_reply_quote_format_default
  endif
 
+ if !exists('g:notmuch_reply_quote_datetime_format')
+ let g:notmuch_reply_quote_datetime_format = s:notmuch_reply_quote_datetime_format_default
+ endif
+
  if !exists('g:notmuch_reader')
  if exists('g:notmuch_rb_reader')
  let g:notmuch_reader = g:notmuch_rb_reader
@@ -600,12 +605,17 @@ ruby << EOF
  name = addr.local + "@" if name.nil? && !addr.local.nil?
  name_format = VIM::evaluate('g:notmuch_reply_quote_format')
  name = name_format % [name, addr.address] if !addr.address.nil?
+ date_format = VIM::evaluate('g:notmuch_reply_quote_datetime_format')
+ quote_datetime = orig.date.strftime(date_format) if !date_format.empty? and orig.date
  else
  name = orig[:from]
  end
  name = "somebody" if name.nil?
 
- body_lines << "%s wrote:" % name
+ quote = []
+ quote << "On %s" % quote_datetime if quote_datetime
+ quote << "%s wrote:" % name
+ body_lines << quote.join(', ')
  part = orig.find_first_text
  part.convert.each_line do |l|
  body_lines << "> %s" % l.chomp
--
2.31.0
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH 11/13] vim: syntax: fix message description highlighting

In reply to this post by Felipe Contreras
From: Aaron Borden <[hidden email]>

Signed-off-by: Felipe Contreras <[hidden email]>
---
 vim/syntax/notmuch-show.vim | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vim/syntax/notmuch-show.vim b/vim/syntax/notmuch-show.vim
index c3a98b77..de0c43a1 100644
--- a/vim/syntax/notmuch-show.vim
+++ b/vim/syntax/notmuch-show.vim
@@ -1,8 +1,8 @@
 " notmuch show mode syntax file
 
 syntax cluster nmShowMsgDesc contains=nmShowMsgDescWho,nmShowMsgDescDate,nmShowMsgDescTags
-syntax match   nmShowMsgDescWho /[^)]\+)/ contained
-syntax match   nmShowMsgDescDate / ([^)]\+[0-9]) / contained
+syntax match   nmShowMsgDescWho /[^)]\+>/ contained
+syntax match   nmShowMsgDescDate / [^(]\+ / contained
 syntax match   nmShowMsgDescTags /([^)]\+)$/ contained
 
 syntax cluster nmShowMsgHead contains=nmShowMsgHeadKey,nmShowMsgHeadVal
--
2.31.0
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH 12/13] vim: remove backwards compatibility wrappers

In reply to this post by Felipe Contreras
Seven years is more than enough.

Signed-off-by: Felipe Contreras <[hidden email]>
---
 vim/notmuch.vim | 50 +++++++++----------------------------------------
 1 file changed, 9 insertions(+), 41 deletions(-)

diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index e717fb5a..717633c7 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -399,20 +399,16 @@ endfunction
 "" root
 
 function! s:set_defaults()
+ if !exists('g:notmuch_folders')
+ let g:notmuch_folders = s:notmuch_folders_default
+ endif
+
  if !exists('g:notmuch_date_format')
- if exists('g:notmuch_rb_date_format')
- let g:notmuch_date_format = g:notmuch_rb_date_format
- else
- let g:notmuch_date_format = s:notmuch_date_format_default
- endif
+ let g:notmuch_date_format = s:notmuch_date_format_default
  endif
 
  if !exists('g:notmuch_datetime_format')
- if exists('g:notmuch_rb_datetime_format')
- let g:notmuch_datetime_format = g:notmuch_rb_datetime_format
- else
- let g:notmuch_datetime_format = s:notmuch_datetime_format_default
- endif
+ let g:notmuch_datetime_format = s:notmuch_datetime_format_default
  endif
 
  if !exists('g:notmuch_reply_quote_format')
@@ -424,41 +420,21 @@ function! s:set_defaults()
  endif
 
  if !exists('g:notmuch_reader')
- if exists('g:notmuch_rb_reader')
- let g:notmuch_reader = g:notmuch_rb_reader
- else
- let g:notmuch_reader = s:notmuch_reader_default
- endif
+ let g:notmuch_reader = s:notmuch_reader_default
  endif
 
  if !exists('g:notmuch_sendmail')
- if exists('g:notmuch_rb_sendmail')
- let g:notmuch_sendmail = g:notmuch_rb_sendmail
- else
- let g:notmuch_sendmail = s:notmuch_sendmail_default
- endif
+ let g:notmuch_sendmail = s:notmuch_sendmail_default
  endif
 
  if !exists('g:notmuch_folders_count_threads')
- if exists('g:notmuch_rb_count_threads')
- let g:notmuch_count_threads = g:notmuch_rb_count_threads
- else
- let g:notmuch_folders_count_threads = s:notmuch_folders_count_threads_default
- endif
+ let g:notmuch_folders_count_threads = s:notmuch_folders_count_threads_default
  endif
 
  if !exists('g:notmuch_compose_start_insert')
  let g:notmuch_compose_start_insert = s:notmuch_compose_start_insert_default
  endif
 
- if !exists('g:notmuch_custom_search_maps') && exists('g:notmuch_rb_custom_search_maps')
- let g:notmuch_custom_search_maps = g:notmuch_rb_custom_search_maps
- endif
-
- if !exists('g:notmuch_custom_show_maps') && exists('g:notmuch_rb_custom_show_maps')
- let g:notmuch_custom_show_maps = g:notmuch_rb_custom_show_maps
- endif
-
  if exists('g:notmuch_custom_search_maps')
  call extend(g:notmuch_search_maps, g:notmuch_custom_search_maps)
  endif
@@ -466,14 +442,6 @@ function! s:set_defaults()
  if exists('g:notmuch_custom_show_maps')
  call extend(g:notmuch_show_maps, g:notmuch_custom_show_maps)
  endif
-
- if !exists('g:notmuch_folders')
- if exists('g:notmuch_rb_folders')
- let g:notmuch_folders = g:notmuch_rb_folders
- else
- let g:notmuch_folders = s:notmuch_folders_default
- endif
- endif
 endfunction
 
 function! s:NotMuch(...)
--
2.31.0
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH 13/13] vim: README: sync with upstream

In reply to this post by Felipe Contreras
Signed-off-by: Felipe Contreras <[hidden email]>
---
 vim/README | 27 +++++++++++++++++----------
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/vim/README b/vim/README
index c137bacd..d9a635a2 100644
--- a/vim/README
+++ b/vim/README
@@ -3,7 +3,7 @@
 This is a vim plug-in that provides a fully usable mail client interface,
 utilizing the notmuch framework, through it's ruby bindings.
 
-== install ==
+== Install ==
 
 Simply run 'make install'. However, check that you have the dependencies below.
 
@@ -12,6 +12,8 @@ Simply run 'make install'. However, check that you have the dependencies below.
 Make sure your vim version has ruby support: check for +ruby in 'vim --version'
 features.
 
+ % vim --version | grep +ruby
+
 === ruby bindings ===
 
 Check if you are able to run the following command cleanly:
@@ -28,16 +30,10 @@ directory in the notmuch source tree.
 
 Since libnotmuch library concentrates on things other than handling mail, we
 need a library to do that, and for Ruby the best library for that is called
-'mail'. The easiest way to install it is with ruby's gem. In most distro's the
-package is called 'rubygems'.
-
-Once you have gem, run:
+'mail':
 
  % gem install mail
 
-In some systems gems are installed on a per-user basis by default, so make sure
-you are running as the same user as the one that installed them.
-
 This gem is not mandatory, but it's extremely recommended.
 
 == Running ==
@@ -46,6 +42,15 @@ Simple:
 
  % gvim -c ':NotMuch'
 
+You might want to write a wrapper script (e.g. `vnm`)
+
+ #!/bin/sh
+ gvim -c ":NotMuch $*"
+
+So you can run:
+
+ vnm is:inbox date:yesterday..
+
 Enjoy ;)
 
 == More stuff ==
@@ -53,10 +58,12 @@ Enjoy ;)
 As an example to configure a key mapping to add the tag 'to-do' and archive,
 this is what I use:
 
-let g:notmuch_rb_custom_search_maps = {
+----
+let g:notmuch_custom_search_maps = {
  \ 't': 'search_tag("+to-do -inbox")',
  \ }
 
-let g:notmuch_rb_custom_show_maps = {
+let g:notmuch_custom_show_maps = {
  \ 't': 'show_tag("+to-do -inbox")',
  \ }
+----
--
2.31.0
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 00/13] vim: a bunch of updates from upstream

In reply to this post by Felipe Contreras
Felipe Contreras <[hidden email]> writes:

> I finally took some time to update notmuch-vim and include some fixes,
> as well as pull requests.
>
> Here are the transplanted patches.
>

So, big picture question. If notmuch is not upstream for this code,
should we be distributing it?

d
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 00/13] vim: a bunch of updates from upstream

On Mon, Apr 19, 2021 at 5:16 AM David Bremner <[hidden email]> wrote:

>
> Felipe Contreras <[hidden email]> writes:
>
> > I finally took some time to update notmuch-vim and include some fixes,
> > as well as pull requests.
> >
> > Here are the transplanted patches.
> >
>
> So, big picture question. If notmuch is not upstream for this code,
> should we be distributing it?

I'm not sure which should be considered "upstream" at this point.
Apparently there's also a fork by Ian Main that a lot of people are
using.

From my point of view the code in notmuch is the one that has been
maintained the best. It also has the advantage that there's debian
packaging.

However, it doesn't have all the improvements of my code-base, nor the
features from Ian's code-base.

If I manage to:

 1. Provide debian packaging
 2. Merge the important features from Ian's code (cleanly)
 3. Remain active merging future patches

Then I think we could consider removing the vim stuff from notmuch. In
the meantime I think the three code-bases serve a purpose.

Cheers.

--
Felipe Contreras
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 00/13] vim: a bunch of updates from upstream

Felipe Contreras <[hidden email]> writes:

>
> Then I think we could consider removing the vim stuff from notmuch. In
> the meantime I think the three code-bases serve a purpose.
>

Thanks for the detailed explanation. Your reasoning makes sense to
me. Now if only we could get more than one person at a time interested
in the notmuch version of the code.

d
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 00/13] vim: a bunch of updates from upstream

On Mon, Apr 19, 2021 at 5:14 PM David Bremner <[hidden email]> wrote:
> Felipe Contreras <[hidden email]> writes:
>
> > Then I think we could consider removing the vim stuff from notmuch. In
> > the meantime I think the three code-bases serve a purpose.
>
> Thanks for the detailed explanation. Your reasoning makes sense to
> me. Now if only we could get more than one person at a time interested
> in the notmuch version of the code.

Indeed, but this is open source; nobody is paying me (or others) to do
this, so not much can be demanded. I guess we'll have to wait and see.

Cheers.

--
Felipe Contreras
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 01/13] vim: fix Mail 2.8.0 warning

In reply to this post by Felipe Contreras
Felipe Contreras <[hidden email]> writes:

>   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.

applied.

d
_______________________________________________
notmuch mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]