The renaming and extra values will make sense when we start to convert
subcommands to the new configuration framework. It will also avoid
collisions with a new enum for configuration keys to be introduced in
a future commit.
---
notmuch-client.h | 10 ++
notmuch-config.c | 6 +++---
This will allow transitioning individual subcommands to the new
configuration framework. Eventually when they are all converted we can
remove the notmuch_config_t * argument.
For now, live with the parameter shadowing in some some subcommands;
it will go away when they are converted.
---
This will be used (and tested) by the configuration caching code to be
added in the next commit.
---
lib/notmuch-private.h | 5 +
lib/string-map.c | 15 +++
2 files changed, 20 insertions(+)
diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h
index 57ec7f72..51016b0b
In addition to changing configuration access, change talloc context
for allocation.
---
notmuch-tag.c | 25 ++---
notmuch.c | 2 +-
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/notmuch-tag.c b/notmuch-tag.c
index 205f2733..464874b4 100644
---
This commit fills in the remainder of the documented functionality for
n_d_open_with_config with respect to config file location. Similar
searching default locations of the database file still needs to be
added.
---
lib/open.cc| 95 +
test/T590-libconfig.sh |
The main effort is changing from the old argv style config list
iterators to the new more opaque ones provided by the library (and
backed by the database+file config cache).
---
notmuch-count.c| 48 --
notmuch.c | 2 +-
test/T060-count.sh
Booleans have no out of band values, so return a status for errors.
---
lib/config.cc | 26 ++
lib/notmuch.h | 19 +++
2 files changed, 45 insertions(+)
diff --git a/lib/config.cc b/lib/config.cc
index 4500fe1a..17af4b46 100644
--- a/lib/config.cc
+++
The main goal is to allow configuration information to be temporarily
overridden by a separate config file. That will require further
changes not in this commit.
The performance impact is unclear, and will depend on the balance
between number of queries and number of distinct metadata items read
This conversion is trivial because the only configuration information
accessed by dump is that stored in the database (in order to dump
it). We do need to be careful to keep the write lock on the database
to ensure dump consistency.
---
notmuch-dump.c| 7 +--
notmuch.c
This is a simple convenience routine to cache a configuration value
without writing it to the database.
---
lib/config.cc | 5 +
lib/notmuch-private.h | 4
2 files changed, 9 insertions(+)
diff --git a/lib/config.cc b/lib/config.cc
index 17af4b46..99fcda1f 100644
---
By using an enum we can have better error detection than copy pasting
key strings around.
The question of what layer this belongs in is a bit
tricky. Historically most of the keys are defined by the CLI. On the
other hand features like excludes are supported in the
library/bindings, and it makes
Since we are already passing a search context around as a kind of
parameter block, add a new talloc context to that to replace relying
on 'config'.
Convert notmuch-search and notmuch-address at the same time, because
they share some code.
Add a test to make sure we don't break passing
Switch one configuration check to new n_c_get_bool function, and
switch use of config as talloc context to notmuch.
---
notmuch-restore.c | 17 ++---
notmuch.c | 2 +-
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/notmuch-restore.c b/notmuch-restore.c
index
The new talloc context is needed to run the hook at the very end of
the function. That in turn is needed so that this process gives up the
write lock on the database.
---
notmuch-insert.c| 59 +++--
notmuch.c | 2 +-
test/T070-insert.sh | 8
This is messier than some of the other conversions because the
extensive use of 'config' as a talloc context.
---
notmuch-reply.c| 100 ++---
notmuch.c | 2 +-
test/T220-reply.sh | 24 +++
3 files changed, 74 insertions(+), 52
This will need some cleanup when the transition completes, and we stop
passing notmuch_config_t structs to the subcommands.
Unlike the general case, we open the database in the subcommand, since
we don't know whether it should be opened read/write until we parse
the command line arguments.
Add a
This emulates the behaviour of notmuch_config_open defined in the CLI,
in that it fills in default values if they are not otherwise defined.
---
lib/config.cc | 50 +-
lib/notmuch-private.h | 3 +++
lib/open.cc| 4
Initially document the intended API and copy the code from
notmuch_database_open_verbose. Most of the documented functionality is
not there yet.
---
lib/config.cc | 34 ++
lib/notmuch-private.h | 3 +
lib/notmuch.h | 138
The only non-trivial part is switching the talloc context for
query_string_from args from 'config' to 'notmuch'.
---
notmuch-reindex.c| 9 ++---
notmuch.c| 2 +-
test/T700-reindex.sh | 10 ++
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git
Switch to the newly created API function notmuch_database_compact_db,
which takes the database opened in main().
---
notmuch-compact.c | 7 +++
notmuch.c | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/notmuch-compact.c b/notmuch-compact.c
index
This is intended for use in temporary code transitioning to the new
configuration system. The name is chosen to avoid cluttering the
notmuch_config_* namespace further with non-library functions.
---
notmuch-client.h | 2 ++
notmuch-config.c | 3 +++
2 files changed, 5 insertions(+)
diff --git
This will be used to make iterators for configuration values.
---
util/string-util.c | 23 +++
util/string-util.h | 14 ++
2 files changed, 37 insertions(+)
diff --git a/util/string-util.c b/util/string-util.c
index de8430b2..27f8a26b 100644
---
This is intended to avoid duplicating the string splitting and
traversal code for all clients of the config API.
---
lib/config.cc | 52 ++
lib/notmuch.h | 64 ++
notmuch.c | 35
The "back end" function takes an open notmuch database, which should
know its own path (i.e. the path needs to be cached in the
configuration data).
---
lib/database.cc | 42 +-
lib/notmuch.h | 12
2 files changed, 45 insertions(+), 9
This is a revised version of the series at
id:20200808141653.1124111-1-da...@tethera.net
It now converts everything but notmuch-setup and notmuch-config to the
new framework, which means that the distinction between configuration
stored in the database and that in an auxilary config file is
On Thu 2020-01-16 15:20:49 -0500, Daniel Kahn Gillmor wrote:
> On Wed 2020-01-08 10:25:50 -0500, Daniel Kahn Gillmor wrote:
>> Thanks for the pointer! it looks like
>> message-forward-{ignored,included}-headers should do (roughly) what i
>> want. I'll try them out.
>
> Just reporting back that
Hi Johannes,
On Wed 23 Dec 2020 at 02:34 +0100, Johannes Larsen wrote:
> A typo in Database._create_query loses the exclude_tag names during the
> string to utf-8 conversion.
>
>
> The problem is fixed by this patch applied to current master (ced341e8):
>
> diff --git
On Sun 20 Dec 2020 at 19:22 -0400, David Bremner wrote:
Hi David,
I'm just catching up on some mailing lists...
> David Bremner writes:
>
>> David Bremner writes:
>>
>>> I hope Floris (or someone) can tell me what is going on here, I don't
>>> understand the memory management in the CFFI
On 2020-12-23 12:53, "inwit" writes:
> What I would like to, then, is to use notmuch-el to read and classify my
> mail. And the functionality I'm missing at the moment is a way to move
> an email from the inbox to its corresponding folder, hopefully updating
> its folder tags at the same time.
29 matches
Mail list logo