[PATCH v3 3/3] notmuch-mutt: check that the search cache Maildir is not a real Maildir

2023-05-27 Thread Paul Wise
This prevents data loss when users configure the search cache Maildir to be a real Maildir containing their real mail data, since the search cache Maildir is expected to contain only symlinks to the real mail data. Prevents: --- contrib/notmuch-mutt/notmuch-mutt | 46

[PATCH v2 3/3] notmuch-mutt: check that the search cache Maildir is not a real Maildir

2023-05-27 Thread Paul Wise
This prevents data loss when users configure the search cache Maildir to be a real Maildir containing their real mail data, since the search cache Maildir is expected to contain only symlinks to the real mail data. Prevents: --- contrib/notmuch-mutt/notmuch-mutt | 46

[PATCH v2 1/3] notmuch-mutt: clarify the empty Maildir function operates on search caches

2023-05-27 Thread Paul Wise
Rename the function and adjust the documentation comment. --- contrib/notmuch-mutt/notmuch-mutt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/notmuch-mutt/notmuch-mutt b/contrib/notmuch-mutt/notmuch-mutt index 01db6908..0f7379ac 100755 ---

[PATCH v2 2/3] notmuch-mutt: do not clear search cache Maildir when nothing is found

2023-05-27 Thread Paul Wise
The previous results might be useful to the user but an empty directory definitely isn't useful. --- contrib/notmuch-mutt/notmuch-mutt | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/notmuch-mutt/notmuch-mutt b/contrib/notmuch-mutt/notmuch-mutt index 0f7379ac..875fd032 100755 ---

Re: [PATCH] notmuch-mutt: check that the search cache Maildir is not a real Maildir WAS: Re: Data loss

2023-05-27 Thread Paul Wise
On Sat, 2023-05-27 at 21:10 -0300, David Bremner wrote: > If possible, please use git-send-email for future series. Will do, I forgot about the --cover-letter option. > This seems to have introduced a warning, and I think there's a bug. > > % notmuch mutt search tag:inbox > Argument "new"

[PATCH] notmuch-mutt: check that the search cache Maildir is not a real Maildir WAS: Re: Data loss

2023-05-23 Thread Paul Wise
68ff09cef2fd1eddd10ba89d41d16 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Wed, 24 May 2023 08:26:38 +0800 Subject: [PATCH 1/3] notmuch-mutt: clarify the empty Maildir function operates on search caches Rename the function and adjust the documentation comment. --- contrib/notmuch-mutt/notmuch-mut

[PATCH] notmuch-mutt: convert ISO-8859-15 copyright statement to UTF-8

2023-05-23 Thread Paul Wise
Suggested-by: isutf8 & check-all-the-things --- contrib/notmuch-mutt/notmuch-mutt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/notmuch-mutt/notmuch-mutt b/contrib/notmuch-mutt/notmuch-mutt index d1e2c084..1e12038c 100755 --- a/contrib/notmuch-mutt/notmuch-mutt +++

Re: [PATCH] notmuch-mutt: replace extra command with notmuch-native thread search feature

2023-04-09 Thread Paul Wise
On Sun, 2023-04-09 at 13:00 -0300, David Bremner wrote: > You might be interested in the s-expression query parser. Part of the > goal is to be less dwim/quirky than the native Xapian query parser, and > to make it easier / safer to construct notmuch queries via programs. That does seem saner to

Re: [PATCH] notmuch-mutt: replace extra command with notmuch-native thread search feature

2023-04-08 Thread Paul Wise
On Sat, 2023-04-08 at 08:42 -0300, David Bremner wrote: > did you test this with a message-id with spaces in it? > the quoting is a delicate. You are correct that the quoting for this was wrong, as it was also wrong in the code before my patch and I just copied that, however... I noticed that

[PATCH v2 1/2] notmuch-mutt: fix Xapian query construction

2023-04-08 Thread Paul Wise
Spaces need to be stripped when querying the Message-Id, because notmuch stores them in Xapian with spaces stripped. All double-quote characters need to be doubled to escape them, otherwise they will be added as extra query terms outside the id. --- contrib/notmuch-mutt/notmuch-mutt | 11

[PATCH v2 2/2] notmuch-mutt: replace extra command with notmuch thread search feature

2023-04-08 Thread Paul Wise
This should be be slightly faster since it avoids forking a shell and is less code in and less dependencies for the script. Since String::ShellQuote isn't used elsewhere, drop mention of it. --- contrib/notmuch-mutt/README | 2 -- contrib/notmuch-mutt/notmuch-mutt | 9 ++---

[PATCH] notmuch-mutt: replace extra command with notmuch-native thread search feature

2023-04-07 Thread Paul Wise
This should be be slightly faster since it avoids forking a shell and is less code in and less dependencies for the script. Since String::ShellQuote isn't used elsewhere, drop mention of it. --- contrib/notmuch-mutt/README | 2 -- contrib/notmuch-mutt/notmuch-mutt | 6 +-

Re: [PATCH] cli: consider files vanishing during notmuch new non-fatal

2016-11-05 Thread Paul Wise
On Sat, 2016-11-05 at 14:57 +0200, Jani Nikula wrote: > Add a new exit code for when files vanished, so the caller has a > chance to detect the race and re-run notmuch new to recover. I don't think this is the right approach for two reasons: The exit code you have chosen is still a failure so I

Re: [Paul Wise] Bug#843127: notmuch: race condition in `notmuch new`?

2016-11-05 Thread Paul Wise
On Fri, 2016-11-04 at 20:47 +0200, Jani Nikula wrote: > Do you have some other software modifying your mail store while > you're running notmuch new? The folder in question has my laptop's exim4 service writing to it when my cron jobs generate email. On Fri, 2016-11-04 at 13:26 -0300, David