* [PATCH] lib: load user config. in notmuch_database_open_verbose()
@ 2021-08-14 19:36 Austin Ray
2021-08-14 19:56 ` David Bremner
0 siblings, 1 reply; 5+ messages in thread
From: Austin Ray @ 2021-08-14 19:36 UTC (permalink / raw)
To: notmuch; +Cc: Austin Ray
Docstring for notmuch_database_open_verbose() states it calls
notmuch_database_open_with_config() with "config_path=NULL"; however,
the implementation uses an empty string. This results in libnotmuch
ignoring the user's configuration and may cause issues in downstream
library consumers.
Signed-off-by: Austin Ray <austin@austinray.io>
---
NeoMutt has an open bug[0] related to this. The user is using a separate
database and email directory so libnotmuch returns file paths rooted in
the database directory when calling notmuch_database_open_verbose(). If
calling notmuch_database_open_with_config() with "config_path=NULL",
libnotmuch returns the correct file paths.
[0] https://github.com/neomutt/neomutt/issues/3017
---
lib/open.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/open.cc b/lib/open.cc
index 7b95c5b1..0d25ba72 100644
--- a/lib/open.cc
+++ b/lib/open.cc
@@ -36,7 +36,7 @@ notmuch_database_open_verbose (const char *path,
notmuch_database_t **database,
char **status_string)
{
- return notmuch_database_open_with_config (path, mode, "", NULL,
+ return notmuch_database_open_with_config (path, mode, NULL, NULL,
database, status_string);
}
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] lib: load user config. in notmuch_database_open_verbose()
2021-08-14 19:36 [PATCH] lib: load user config. in notmuch_database_open_verbose() Austin Ray
@ 2021-08-14 19:56 ` David Bremner
2021-08-14 20:48 ` Austin Ray
0 siblings, 1 reply; 5+ messages in thread
From: David Bremner @ 2021-08-14 19:56 UTC (permalink / raw)
To: Austin Ray, notmuch; +Cc: Austin Ray
Austin Ray <austin@austinray.io> writes:
> Docstring for notmuch_database_open_verbose() states it calls
> notmuch_database_open_with_config() with "config_path=NULL"; however,
> the implementation uses an empty string. This results in libnotmuch
> ignoring the user's configuration and may cause issues in downstream
> library consumers.
>
> Signed-off-by: Austin Ray <austin@austinray.io>
I'm not sure about this. Ignoring the user's configuration is actually
the upward compatible thing to do. So maybe it's a doc bug?
d
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lib: load user config. in notmuch_database_open_verbose()
2021-08-14 19:56 ` David Bremner
@ 2021-08-14 20:48 ` Austin Ray
2021-08-14 21:22 ` David Bremner
0 siblings, 1 reply; 5+ messages in thread
From: Austin Ray @ 2021-08-14 20:48 UTC (permalink / raw)
To: David Bremner; +Cc: notmuch
[-- Attachment #1.1: Type: text/plain, Size: 350 bytes --]
> So maybe it's a doc bug?
That sounds good to me.
Since notmuch_database_open() has a similar doc bug, would you like the
corrections in one or two patches during the resubmit?
Also, since I'm new to this git workflow, should I use the "-vN" option
for the resubmit or leave it off as this patch won't be included?
Thanks!
Austin
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lib: load user config. in notmuch_database_open_verbose()
2021-08-14 20:48 ` Austin Ray
@ 2021-08-14 21:22 ` David Bremner
2021-08-14 22:40 ` Austin Ray
0 siblings, 1 reply; 5+ messages in thread
From: David Bremner @ 2021-08-14 21:22 UTC (permalink / raw)
To: Austin Ray; +Cc: notmuch
Austin Ray <austin@austinray.io> writes:
>> So maybe it's a doc bug?
>
> That sounds good to me.
>
> Since notmuch_database_open() has a similar doc bug, would you like the
> corrections in one or two patches during the resubmit?
One patch is fine.
> Also, since I'm new to this git workflow, should I use the "-vN"
> option for the resubmit or leave it off as this patch won't be
> included?
I guess "-v 2" makes sense here. It's just a hint that the new patch
obsoletes a previous one.
d
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lib: load user config. in notmuch_database_open_verbose()
2021-08-14 21:22 ` David Bremner
@ 2021-08-14 22:40 ` Austin Ray
0 siblings, 0 replies; 5+ messages in thread
From: Austin Ray @ 2021-08-14 22:40 UTC (permalink / raw)
To: David Bremner; +Cc: notmuch
[-- Attachment #1.1: Type: text/plain, Size: 139 bytes --]
> I guess "-v 2" makes sense here. It's just a hint that the new patch
> obsoletes a previous one.
Thanks! I appreciate the help!
Austin
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-14 22:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-14 19:36 [PATCH] lib: load user config. in notmuch_database_open_verbose() Austin Ray
2021-08-14 19:56 ` David Bremner
2021-08-14 20:48 ` Austin Ray
2021-08-14 21:22 ` David Bremner
2021-08-14 22:40 ` Austin Ray
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).