RE: notmuch-vim doesn't respect notmuch config defaults

Subject: RE: notmuch-vim doesn't respect notmuch config defaults

Date: Thu, 02 Oct 2014 12:22:10 -0700

To: Sergei Shilovsky, notmuch@notmuchmail.org

Cc:

From: Ian Main


Sergei Shilovsky wrote:
> I would suggest to use `notmuch config list` to get configuration
> values in vim if possible
> 
> Reproduction example follows:
> 
>  /home/sh> cat .notmuch-config
>  [new]
>  tags=new;inbox;unread
>  ignore=
> 
>  [search]
>  exclude_tags=deleted;spam
> 
>  [maildir]
>  synchronize_flags=false
> 
>  /home/sh> notmuch config list
>  new.tags=new;inbox;unread
>  new.ignore=
>  search.exclude_tags=deleted;spam
>  maildir.synchronize_flags=false
>  database.path=/home/sh/mail
>  user.name=Sergei Shilovsky
>  user.primary_email=sshilovsky@gmail.com
> 
>  /home/sh> vim -c :NotMuch
>  Error detected while processing function
> <SNR>13_NotMuch..<SNR>13_folders..<SNR>
>  13_new_buffer:
>  line    6:
>  TypeError: no implicit conversion of nil into String
>  Error detected while processing function <SNR>13_NotMuch..<SNR>13_folders:
>  line    2:
>  NoMethodError: undefined method `query' for nil:NilClass
> 
> Having explicit database.path=/home/sh/mail in the configuration file
> makes it work

Right, so you didn't have database.path in your config file before right?
Doesn't the default notmuch setup set that for you?

It wouldn't be too hard to change vim to use 'notmuch config list' to get
its configuration information, but as mentioned a library would be much
nicer.

Anyone have any thoughts on this?  How does the emacs client do it?  If
the config list method is superior I'll write up a patch for it.

   Ian

Thread: