* [PATCH 1/2] doc: mail store is given by database.mail_root
@ 2021-12-16 17:40 Cédric Hannotier
2021-12-16 17:40 ` [PATCH 2/2] completion: use mail_root for path completion in bash/zsh Cédric Hannotier
2022-01-03 12:25 ` [PATCH 1/2] doc: mail store is given by database.mail_root David Bremner
0 siblings, 2 replies; 3+ messages in thread
From: Cédric Hannotier @ 2021-12-16 17:40 UTC (permalink / raw)
To: notmuch; +Cc: Cédric Hannotier
The mail store directory is given by database.mail_root,
which can be different from database.path.
However, notmuch-insert documentation was still referencing the latter
as the provider of the maildir directory instead of the former.
---
doc/man1/notmuch-insert.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/man1/notmuch-insert.rst b/doc/man1/notmuch-insert.rst
index 82c4a7a0..da9ca791 100644
--- a/doc/man1/notmuch-insert.rst
+++ b/doc/man1/notmuch-insert.rst
@@ -14,7 +14,7 @@ DESCRIPTION
**notmuch insert** reads a message from standard input and delivers it
into the maildir directory given by configuration option
-**database.path**, then incorporates the message into the notmuch
+**database.mail_root**, then incorporates the message into the notmuch
database. It is an alternative to using a separate tool to deliver the
message then running :any:`notmuch-new(1)` afterwards.
@@ -38,7 +38,7 @@ Supported options for **insert** include
.. option:: --folder=<folder>
Deliver the message to the specified folder, relative to the
- top-level directory given by the value of **database.path**. The
+ top-level directory given by the value of **database.mail_root**. The
default is the empty string, which means delivering to the
top-level directory.
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] completion: use mail_root for path completion in bash/zsh
2021-12-16 17:40 [PATCH 1/2] doc: mail store is given by database.mail_root Cédric Hannotier
@ 2021-12-16 17:40 ` Cédric Hannotier
2022-01-03 12:25 ` [PATCH 1/2] doc: mail store is given by database.mail_root David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: Cédric Hannotier @ 2021-12-16 17:40 UTC (permalink / raw)
To: notmuch; +Cc: Cédric Hannotier
Since mail store and database directory can be different,
path and folder completions must use the directory given by
database.mail_root, not by database.path.
---
completion/notmuch-completion.bash | 6 +++---
completion/zsh/_notmuch | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash
index 15425697..0022b54b 100644
--- a/completion/notmuch-completion.bash
+++ b/completion/notmuch-completion.bash
@@ -103,12 +103,12 @@ _notmuch_search_terms()
COMPREPLY=( $(compgen -P "from:" -W "`_notmuch_email ${cur}`" -- ${cur##from:}) )
;;
path:*)
- local path=`notmuch config get database.path`
+ local path=`notmuch config get database.mail_root`
compopt -o nospace
COMPREPLY=( $(compgen -d "$path/${cur##path:}" | sed "s|^$path/||" ) )
;;
folder:*)
- local path=`notmuch config get database.path`
+ local path=`notmuch config get database.mail_root`
compopt -o nospace
COMPREPLY=( $(compgen -d "$path/${cur##folder:}" | \
sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )
@@ -281,7 +281,7 @@ _notmuch_insert()
$split &&
case "${prev}" in
--folder)
- local path=`notmuch config get database.path`
+ local path=`notmuch config get database.mail_root`
compopt -o nospace
COMPREPLY=( $(compgen -d "$path/${cur}" | \
sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )
diff --git a/completion/zsh/_notmuch b/completion/zsh/_notmuch
index e920f10b..e207d90b 100644
--- a/completion/zsh/_notmuch
+++ b/completion/zsh/_notmuch
@@ -69,8 +69,8 @@ _notmuch_term_mimetype() {
_notmuch_term_path() {
local ret=1 expl
- local maildir="$(notmuch config get database.path)"
- [[ -d $maildir ]] || { _message -e "database.path not found" ; return $ret }
+ local maildir="$(notmuch config get database.mail_root)"
+ [[ -d $maildir ]] || { _message -e "database.mail_root not found" ; return $ret }
_description notmuch-folder expl 'maildir folder'
_files "$expl[@]" -W $maildir -/ && ret=0
@@ -79,8 +79,8 @@ _notmuch_term_path() {
_notmuch_term_folder() {
local ret=1 expl
- local maildir="$(notmuch config get database.path)"
- [[ -d $maildir ]] || { _message -e "database.path not found" ; return $ret }
+ local maildir="$(notmuch config get database.mail_root)"
+ [[ -d $maildir ]] || { _message -e "database.mail_root not found" ; return $ret }
_description notmuch-folder expl 'maildir folder'
local ignoredfolders=( '*/(cur|new|tmp)' )
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] doc: mail store is given by database.mail_root
2021-12-16 17:40 [PATCH 1/2] doc: mail store is given by database.mail_root Cédric Hannotier
2021-12-16 17:40 ` [PATCH 2/2] completion: use mail_root for path completion in bash/zsh Cédric Hannotier
@ 2022-01-03 12:25 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2022-01-03 12:25 UTC (permalink / raw)
To: Cédric Hannotier, notmuch; +Cc: Cédric Hannotier
Cédric Hannotier <cedric.hannotier@ulb.be> writes:
> The mail store directory is given by database.mail_root,
> which can be different from database.path.
Series applied to master, should be part of release 0.35.
Thanks for your contribution.
d\r
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-03 12:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-16 17:40 [PATCH 1/2] doc: mail store is given by database.mail_root Cédric Hannotier
2021-12-16 17:40 ` [PATCH 2/2] completion: use mail_root for path completion in bash/zsh Cédric Hannotier
2022-01-03 12:25 ` [PATCH 1/2] doc: mail store is given by database.mail_root David Bremner
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).