I'm trying to update an archiving tool that used the old folder: search
terms to use the newer folder: or path: terms. From playing around with
it, I think that the path: term is what I want to use. However, I am
getting some behavior I don't understand unless path: searches don't
properly handle
Keith Amidon writes:
>
> notmuch search --output=files path:'dir/INBOX/INBOX/Sent Items'
>
> I don't get any results, but it seems like the two results above should
> be shown, right? Am I doing something wrong here? If it looks like I'm
> doing it correctly, what can I do to help troubleshoot
Many functions that implement the search command need to access command
line options. Instead of passing each option in a separate variable, put
them in a structure and pass only this structure.
This will become handy in the following patches.
---
notmuch-search.c | 122 ++
---
test/T090-search-output.sh | 59 +++
test/T095-search-unique.sh | 63 ++
2 files changed, 122 insertions(+)
create mode 100755 test/T095-search-unique.sh
diff --git a/test/T090-search-output.sh b/test/T090-se
The code here is an extended version of a path from Jani Nikula.
---
completion/notmuch-completion.bash | 6 ++-
completion/notmuch-completion.zsh | 3 +-
doc/man1/notmuch-search.rst| 33
notmuch-search.c | 101 ++---
4 f
The new outputs allow printing senders, recipients or both of matching
messages.
This code based on a patch from Jani Nikula.
---
completion/notmuch-completion.bash | 2 +-
completion/notmuch-completion.zsh | 3 +-
doc/man1/notmuch-search.rst| 22 +++-
notmuch-search.c
Hello all,
this patch series adds support for --output=addresses and similar
arguments in notmuch search. It is a reworked and extended version of
id:1410021689-15901-1-git-send-email-j...@nikula.org.
Compared to Jani's patches, I do not use keyword-flag command line
parser for the --output optio
This series refactors and cleans up insert, improves error handling and
reporting, and adds post-insert hook. I intend to add documentation and
more tests, but the code is ready for review. Also, at least some of the
cleanups and fixes in the beginning of the series could go in without
additional t
Move add_file_to_database around to keep the filesystem related
functions grouped together, improving readability. No functional
changes.
---
notmuch-insert.c | 92 +++---
1 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/notmuch-ins
The function takes great care to preserve the first error status it
encounters, yet fails to return that status to the caller. Fix it.
---
lib/message.cc |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/message.cc b/lib/message.cc
index 68f7e68..7e82548 100644
--- a/li
An "is something" predicate conveys the meaning better. While at it,
improve the function documentation and error message. Besides the
error message change, no functional changes.
---
notmuch-insert.c | 13 -
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/notmuch-inse
Combine make_directory() and make_directory_and_parents() into a
single recursive mkdir_recursive() function. Clarify the code and
improve error handling. Improve error messages. Switch to using the
new function in maildir_create_folder(). Constify talloc context.
---
notmuch-insert.c | 131 +
The copying has nothing to do with stdin, so call it copy_fd
instead. While at it, improve documentation and reverse the
parameters, as destination is traditionally the first parameter.
---
notmuch-insert.c | 11 ++-
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/notmuch-
Clarify the code slightly, improve error messages. Apart from the
error message changes, no functional changes.
---
notmuch-insert.c | 17 +
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/notmuch-insert.c b/notmuch-insert.c
index 5d47806..7375c54 100644
--- a/notm
This will clean up the usage. There's the slight functional change of
potentially ending up doing extra gethostname and getpid calls, but
this is neglible.
---
notmuch-insert.c | 39 +++
1 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/notmuch-
Handle failures gracefully in add_file_to_database, renamed simply
add_file while at it. Add keep option to not remove the message from
database if tagging or tag syncing to maildir flags fails. Expand the
function documentation to cover the changes.
---
notmuch-insert.c | 89 +++
Make the function calls make more sense as independent building blocks
of the big picture, with clear inputs and outputs. Split up
write_message into two. Improve function documentation. Cleanup and
clarify the error paths.
---
notmuch-insert.c | 127 --
Add --keep option to keep any remaining stuff in index or file. We
could distinguish between failures to index and failures to apply tags
or maildir sync, but for simplicity just have one.
---
notmuch-insert.c| 20 +++-
test/T070-insert.sh |2 +-
2 files changed, 16 inser
The post-new hook might no longer be needed or run very often if
notmuch insert is being used. Therefore a post-insert hook is needed
(arguably pre-insert not so much, so don't add one). Also add the
--no-hooks option to skip hooks.
---
notmuch-insert.c |7 +++
1 files changed, 7 insertion
Excerpts from Gaute Hope's message of August 6, 2014 10:29:
Austin Clements wrote on Fri, 01 Aug 2014 14:55:05 -0400:
I have a prototype implementation of message modification times on my
lastmod-v1 branch at
https://github.com/aclements/notmuch/tree/lastmod-v1
It builds on my database feat
On Mon, 2014-09-22 at 11:20 +0200, David Bremner wrote:
> Keith Amidon writes:
> >
> > notmuch search --output=files path:'dir/INBOX/INBOX/Sent Items'
> >
> > I don't get any results, but it seems like the two results above should
> > be shown, right? Am I doing something wrong here? If it looks
Quoth Keith Amidon on Sep 22 at 7:42 am:
> On Mon, 2014-09-22 at 11:20 +0200, David Bremner wrote:
> > Keith Amidon writes:
> > >
> > > notmuch search --output=files path:'dir/INBOX/INBOX/Sent Items'
> > >
> > > I don't get any results, but it seems like the two results above should
> > > be show
On Mon, Sep 22 2014, Gaute Hope wrote:
> Excerpts from Gaute Hope's message of August 6, 2014 10:29:
>> Austin Clements wrote on Fri, 01 Aug 2014 14:55:05 -0400:
>>> I have a prototype implementation of message modification times on my
>>> lastmod-v1 branch at
>>>
>>> https://github.com/aclem
On Mon, 22 Sep 2014, Gaute Hope wrote:
> Excerpts from Gaute Hope's message of August 6, 2014 10:29:
>> Austin Clements wrote on Fri, 01 Aug 2014 14:55:05 -0400:
>>> I have a prototype implementation of message modification times on my
>>> lastmod-v1 branch at
>>>
>>> https://github.com/acleme
In Xapian, closing a database implicitly aborts any outstanding
transaction and commits changes. For historical reasons,
notmuch_database_close had grown to almost, but not quite duplicate
this behavior. Before closing the database, it would explicitly (and
unnecessarily) commit it. However, if
On Mon, Sep 22, 2014 at 11:43:35AM -0400, Austin Clements wrote:
> This patch simplifies notmuch_database_close to just call
> Database::close. This works for both read-only and read/write
> databases, takes care of committing changes, unifies the exception
> handling path, and codifies aborting o
I like nmbug's distributed tag maintenance, but not everyone has
notmuch/nmbug installed locally (yet ;). However, everyone that I
know does have a browser and a mail client. They can submit messages
with their mail client already, but we've been missing a way for them
to help tag messages. Nmhi
On Mon, Sep 22, 2014 at 10:19:35AM -0700, W. Trevor King wrote:
> I like nmbug's distributed tag maintenance, but not everyone has
> notmuch/nmbug installed locally (yet ;). However, everyone that I
> know does have a browser and a mail client. They can submit
> messages with their mail client al
Quoth W. Trevor King on Sep 22 at 9:59 am:
> On Mon, Sep 22, 2014 at 11:43:35AM -0400, Austin Clements wrote:
> > This patch simplifies notmuch_database_close to just call
> > Database::close. This works for both read-only and read/write
> > databases, takes care of committing changes, unifies th
LGTM. I'm a little surprised this is necessary, but whatever.
I think the eval-and-compile has to be top-level; it's certainly not
wrong for it to be top-level. (I like the comment in the
eval-and-compile implementation: ";; Remember, it's magic.")
On Thu, 04 Sep 2014, Mark Walters wrote:
> no
On Mon, Sep 22, 2014 at 06:50:50PM +, Austin Clements wrote:
> Quoth W. Trevor King on Sep 22 at 9:59 am:
> > On Mon, Sep 22, 2014 at 11:43:35AM -0400, Austin Clements wrote:
> > > This patch simplifies notmuch_database_close to just call
> > > Database::close. This works for both read-only a
On Mon, 2014-09-22 at 15:06 +, Austin Clements wrote:
> I assume you're doing this from the command line? Does the following
> work?
>
> notmuch search --output=files 'path:"dir/INBOX/INBOX/Sent Items/**"'
>
> Shell quoting and Xapian quoting interact in often confusing ways. In
> your orig
Keith Amidon writes:
>
> What do you think about adding a section to the notmuch-search-terms web
> page that talks in more detail about the quoting interactions? If there
> were on obvious section about this in the man page it might have helped
> me find the issue myself. If this seems like a
22. sep. 2014 17:40 skrev "Austin Clements"
følgende:
>
> On Mon, 22 Sep 2014, Gaute Hope wrote:
> > Excerpts from Gaute Hope's message of August 6, 2014 10:29:
> >> Austin Clements wrote on Fri, 01 Aug 2014 14:55:05
-0400:
> >>> I have a prototype implementation of message modification times on
Keith Amidon writes:
>
> notmuch search --output=files path:'dir/INBOX/INBOX/Sent Items'
>
> I don't get any results, but it seems like the two results above should
> be shown, right? Am I doing something wrong here? If it looks like I'm
> doing it correctly, what can I do to help troubleshoot
Many functions that implement the search command need to access command
line options. Instead of passing each option in a separate variable, put
them in a structure and pass only this structure.
This will become handy in the following patches.
---
notmuch-search.c | 122 ++
---
test/T090-search-output.sh | 59 +++
test/T095-search-unique.sh | 63 ++
2 files changed, 122 insertions(+)
create mode 100755 test/T095-search-unique.sh
diff --git a/test/T090-search-output.sh b/test/T090-se
This allows having multiple flags as a value of a command line
option (e.g. --foo=bar,baz). The values of the given flags are OR'd
together.
This was inspired by a similar patch from Jani Nikula.
---
command-line-arguments.c | 40
command-line-argumen
The code here is an extended version of a path from Jani Nikula.
---
completion/notmuch-completion.bash | 6 ++-
completion/notmuch-completion.zsh | 3 +-
doc/man1/notmuch-search.rst| 33
notmuch-search.c | 101 ++---
4 f
The new outputs allow printing senders, recipients or both of matching
messages.
This code based on a patch from Jani Nikula.
---
completion/notmuch-completion.bash | 2 +-
completion/notmuch-completion.zsh | 3 +-
doc/man1/notmuch-search.rst| 22 +++-
notmuch-search.c
Hello all,
this patch series adds support for --output=addresses and similar
arguments in notmuch search. It is a reworked and extended version of
id:1410021689-15901-1-git-send-email-jani at nikula.org.
Compared to Jani's patches, I do not use keyword-flag command line
parser for the --output op
This series refactors and cleans up insert, improves error handling and
reporting, and adds post-insert hook. I intend to add documentation and
more tests, but the code is ready for review. Also, at least some of the
cleanups and fixes in the beginning of the series could go in without
additional t
The function takes great care to preserve the first error status it
encounters, yet fails to return that status to the caller. Fix it.
---
lib/message.cc |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/message.cc b/lib/message.cc
index 68f7e68..7e82548 100644
--- a/li
An "is something" predicate conveys the meaning better. While at it,
improve the function documentation and error message. Besides the
error message change, no functional changes.
---
notmuch-insert.c | 13 -
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/notmuch-inse
Move add_file_to_database around to keep the filesystem related
functions grouped together, improving readability. No functional
changes.
---
notmuch-insert.c | 92 +++---
1 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/notmuch-ins
The copying has nothing to do with stdin, so call it copy_fd
instead. While at it, improve documentation and reverse the
parameters, as destination is traditionally the first parameter.
---
notmuch-insert.c | 11 ++-
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/notmuch-
Clarify the code slightly, improve error messages. Apart from the
error message changes, no functional changes.
---
notmuch-insert.c | 17 +
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/notmuch-insert.c b/notmuch-insert.c
index 5d47806..7375c54 100644
--- a/notm
Combine make_directory() and make_directory_and_parents() into a
single recursive mkdir_recursive() function. Clarify the code and
improve error handling. Improve error messages. Switch to using the
new function in maildir_create_folder(). Constify talloc context.
---
notmuch-insert.c | 131 +
This will clean up the usage. There's the slight functional change of
potentially ending up doing extra gethostname and getpid calls, but
this is neglible.
---
notmuch-insert.c | 39 +++
1 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/notmuch-
Make the function calls make more sense as independent building blocks
of the big picture, with clear inputs and outputs. Split up
write_message into two. Improve function documentation. Cleanup and
clarify the error paths.
---
notmuch-insert.c | 127 --
Handle failures gracefully in add_file_to_database, renamed simply
add_file while at it. Add keep option to not remove the message from
database if tagging or tag syncing to maildir flags fails. Expand the
function documentation to cover the changes.
---
notmuch-insert.c | 89 +++
Add --keep option to keep any remaining stuff in index or file. We
could distinguish between failures to index and failures to apply tags
or maildir sync, but for simplicity just have one.
---
notmuch-insert.c| 20 +++-
test/T070-insert.sh |2 +-
2 files changed, 16 inser
The post-new hook might no longer be needed or run very often if
notmuch insert is being used. Therefore a post-insert hook is needed
(arguably pre-insert not so much, so don't add one). Also add the
--no-hooks option to skip hooks.
---
notmuch-insert.c |7 +++
1 files changed, 7 insertion
Excerpts from Gaute Hope's message of August 6, 2014 10:29:
> Austin Clements wrote on Fri, 01 Aug 2014 14:55:05
> -0400:
>> I have a prototype implementation of message modification times on my
>> lastmod-v1 branch at
>>
>> https://github.com/aclements/notmuch/tree/lastmod-v1
>>
>> It builds
On Mon, 2014-09-22 at 11:20 +0200, David Bremner wrote:
> Keith Amidon writes:
> >
> > notmuch search --output=files path:'dir/INBOX/INBOX/Sent Items'
> >
> > I don't get any results, but it seems like the two results above should
> > be shown, right? Am I doing something wrong here? If it looks
Quoth Keith Amidon on Sep 22 at 7:42 am:
> On Mon, 2014-09-22 at 11:20 +0200, David Bremner wrote:
> > Keith Amidon writes:
> > >
> > > notmuch search --output=files path:'dir/INBOX/INBOX/Sent Items'
> > >
> > > I don't get any results, but it seems like the two results above should
> > > be show
On Mon, Sep 22 2014, Gaute Hope wrote:
> Excerpts from Gaute Hope's message of August 6, 2014 10:29:
>> Austin Clements wrote on Fri, 01 Aug 2014 14:55:05
>> -0400:
>>> I have a prototype implementation of message modification times on my
>>> lastmod-v1 branch at
>>>
>>> https://github.com/a
On Mon, 22 Sep 2014, Gaute Hope wrote:
> Excerpts from Gaute Hope's message of August 6, 2014 10:29:
>> Austin Clements wrote on Fri, 01 Aug 2014 14:55:05
>> -0400:
>>> I have a prototype implementation of message modification times on my
>>> lastmod-v1 branch at
>>>
>>> https://github.com/ac
In Xapian, closing a database implicitly aborts any outstanding
transaction and commits changes. For historical reasons,
notmuch_database_close had grown to almost, but not quite duplicate
this behavior. Before closing the database, it would explicitly (and
unnecessarily) commit it. However, if
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL:
<http://notmuchmail.org/pipermail/notmuch/attachments/20140922/e44bf0ac/attachment.pgp>
next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL:
<http://notmuchmail.org/pipermail/notmuch/attachments/20140922/b07e5322/attachment.pgp>
more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL:
<http://notmuchmail.org/pipermail/notmuch/attachments/20140922/de3e518b/attachment.pgp>
Quoth W. Trevor King on Sep 22 at 9:59 am:
> On Mon, Sep 22, 2014 at 11:43:35AM -0400, Austin Clements wrote:
> > This patch simplifies notmuch_database_close to just call
> > Database::close. This works for both read-only and read/write
> > databases, takes care of committing changes, unifies th
LGTM. I'm a little surprised this is necessary, but whatever.
I think the eval-and-compile has to be top-level; it's certainly not
wrong for it to be top-level. (I like the comment in the
eval-and-compile implementation: ";; Remember, it's magic.")
On Thu, 04 Sep 2014, Mark Walters wrote:
> no
mation, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL:
<http://notmuchmail.org/pipermail/notmuch/attachments/20140922/4cb115a4/attachment.pgp>
On Mon, 2014-09-22 at 15:06 +, Austin Clements wrote:
> I assume you're doing this from the command line? Does the following
> work?
>
> notmuch search --output=files 'path:"dir/INBOX/INBOX/Sent Items/**"'
>
> Shell quoting and Xapian quoting interact in often confusing ways. In
> your orig
66 matches
Mail list logo