* notmuch-vim doesn't respect notmuch config defaults
@ 2014-10-02 8:55 Sergei Shilovsky
2014-10-02 11:24 ` David Bremner
2014-10-02 19:22 ` Ian Main
0 siblings, 2 replies; 4+ messages in thread
From: Sergei Shilovsky @ 2014-10-02 8:55 UTC (permalink / raw)
To: notmuch
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
--
С уважением,
Сергей Шиловский
Sergei Shilovsky
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: notmuch-vim doesn't respect notmuch config defaults
2014-10-02 8:55 notmuch-vim doesn't respect notmuch config defaults Sergei Shilovsky
@ 2014-10-02 11:24 ` David Bremner
2014-10-02 19:32 ` Ian Main
2014-10-02 19:22 ` Ian Main
1 sibling, 1 reply; 4+ messages in thread
From: David Bremner @ 2014-10-02 11:24 UTC (permalink / raw)
To: sshilovsky, notmuch
Sergei Shilovsky <sshilovsky@gmail.com> writes:
> I would suggest to use `notmuch config list` to get configuration
> values in vim if possible
I guess this is a general question we haven't really resolved, namely
sharing configuration information between various notmuch frontends.
.notmuch-config is really the configuration file for the notmuch CLI; it
isn't read by library, so clients using language bindings won't see it
at all by default.
On a somewhat related note I've been thinking how to best associate
configuration information with a database (see e.g. the thread at
id:1411805835-3563-1-git-send-email-david@tethera.net ). Note that this
would not help this particular case.
Offhand, I wouldn't be personally to some interface at the library level
wrapping the reading and writing of ~/.notmuch-config, although as I
mentioned before, the size and complexity of notmuch-config.c perturb me
a little as far as being suitable for library code.
d
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: notmuch-vim doesn't respect notmuch config defaults
2014-10-02 8:55 notmuch-vim doesn't respect notmuch config defaults Sergei Shilovsky
2014-10-02 11:24 ` David Bremner
@ 2014-10-02 19:22 ` Ian Main
1 sibling, 0 replies; 4+ messages in thread
From: Ian Main @ 2014-10-02 19:22 UTC (permalink / raw)
To: Sergei Shilovsky, notmuch
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: notmuch-vim doesn't respect notmuch config defaults
2014-10-02 11:24 ` David Bremner
@ 2014-10-02 19:32 ` Ian Main
0 siblings, 0 replies; 4+ messages in thread
From: Ian Main @ 2014-10-02 19:32 UTC (permalink / raw)
To: notmuch
David Bremner wrote:
> Sergei Shilovsky <sshilovsky@gmail.com> writes:
>
> > I would suggest to use `notmuch config list` to get configuration
> > values in vim if possible
>
> I guess this is a general question we haven't really resolved, namely
> sharing configuration information between various notmuch frontends.
> .notmuch-config is really the configuration file for the notmuch CLI; it
> isn't read by library, so clients using language bindings won't see it
> at all by default.
>
> On a somewhat related note I've been thinking how to best associate
> configuration information with a database (see e.g. the thread at
> id:1411805835-3563-1-git-send-email-david@tethera.net ). Note that this
> would not help this particular case.
>
> Offhand, I wouldn't be personally to some interface at the library level
> wrapping the reading and writing of ~/.notmuch-config, although as I
> mentioned before, the size and complexity of notmuch-config.c perturb me
> a little as far as being suitable for library code.
I could change the vim client to use notmuch config list easily enough.
Any consensus here? How does the emacs client do it? I can make up a patch if
this seems like the right way to go.
Also, someone on IRC mentioned making it so config list could dump JSON
which would make that more reasonable.
Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-02 19:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-02 8:55 notmuch-vim doesn't respect notmuch config defaults Sergei Shilovsky
2014-10-02 11:24 ` David Bremner
2014-10-02 19:32 ` Ian Main
2014-10-02 19:22 ` Ian Main
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).