Re: [PATCH] ruby: query: fix get sort

2023-05-25 Thread David Bremner
Felipe Contreras writes: > The order was wrong, right now `query.sort` doesn't return a number. > applied to master d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: git.notmuchmail.org changes

2023-05-20 Thread David Bremner
David Bremner writes: > The notmuch git repo is now hosted in gitolite [1]. This will allow more > fine-grained access control. There should not be any visible change to > https access, but let me know if something broke. Michael Gruber mentioned offlist that git:// cloning was broken

git.notmuchmail.org changes

2023-05-20 Thread David Bremner
The notmuch git repo is now hosted in gitolite [1]. This will allow more fine-grained access control. There should not be any visible change to https access, but let me know if something broke. d [1] a front end for git, see https://gitolite.com signature.asc Description: PGP signature

Re: T350-crypto T357-index-decryption: possible race condition?

2023-05-12 Thread David Bremner
Michael J Gruber writes: > oh well, attachments ... > Can you encrypt to the key 6D92612D94E46381 interactively using an approriately simplified version of that command? ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email

Re: T350-crypto T357-index-decryption: possible race condition?

2023-05-11 Thread David Bremner
Michael J Gruber writes: > Building notmuch 0.37 with my usual spec-file as a rawhide-mock build > (a local chroot for the development "version" of Fedora which will > become Fedora 39) I see: > ``` > T350-crypto: Testing PGP/MIME signature verification and decryption > PASS emacs delivery of

Re: [PATCH 0/2] vim: doc: trivial fixes

2023-05-08 Thread David Bremner
Felipe Contreras writes: > These are some trivial patches long overdue from upstream. > > They have been already sent in some form long time ago > id:20210418224851.88240-3-felipe.contre...@gmail.com, but hopefully in a > smaller batch they'll get merged. > applied to master. Of course I still

Re: [PATCH v2 3/3] test/emacs: Add test cases for notmuch-search-hide-excluded

2023-05-07 Thread David Bremner
mohk...@kisara.moe writes: > From: Mohsin Kaleem > thanks for writing such an extensive set of tests for the new feature. All I'd ask is a bit more detail in the commit message. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe

Re: [PATCH v2 2/3] emacs: Allow notmuch-saved-searches to hide excluded messages

2023-05-07 Thread David Bremner
mohk...@kisara.moe writes: > From: Mohsin Kaleem > Apologies for the many messages. I think this commit message falls a bit short of our usual standards (as well as a one line subject, we like to have some kind of "why"). If you figure out the right answer to toggling saved searches with

Re: [PATCH v2 1/3] emacs: Add new option notmuch-search-hide-excluded

2023-05-07 Thread David Bremner
mohk...@kisara.moe writes: > Lastly I've amended some calls to notmuch-tree and notmuch-unthreaded > which didn't pass through the buffer local value of > notmuch-search-oldest-first (and now notmuch-search-exclude). > Examples of where I've done this > + include notmuch-jump-search if

Re: [PATCH v2 2/3] emacs: Allow notmuch-saved-searches to hide excluded messages

2023-05-07 Thread David Bremner
mohk...@kisara.moe writes: > + :excludedWhether to show mail with excluded tags in the > + search. Possible values are `hide', `show', > + or nil. Nil means use the default value of > + `notmuch-search-hide-excluded'. So if I

Re: [PATCH v2 1/3] emacs: Add new option notmuch-search-hide-excluded

2023-05-07 Thread David Bremner
Mohsin Kaleem writes: > We could workaround this by changing the semantics of the variable. Make > it notmuch-search-show-excluded and default to nil so nothing has to be > changed in existing functions that call notmuch-search. Or we could > switch to using cl-defun and have the default value

Re: [PATCH v2 1/3] emacs: Add new option notmuch-search-hide-excluded

2023-05-03 Thread David Bremner
> diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh > index 9d0df187..b89a100e 100755 > --- a/test/T310-emacs.sh > +++ b/test/T310-emacs.sh > @@ -1030,7 +1030,7 @@ End of search results. > YYY/notmuch_fail exited with status 1 (see *Notmuch errors* for more details) > === ERROR === >

Re: JSON Output Documentation

2023-05-03 Thread David Bremner
David Bremner writes: > "Tim Culverhouse" writes: > >> Hey everyone - >> >> I've scoured the manpages and website for some documentation on the JSON >> output format, but haven't found what I'm looking for. For the most >> part, the commands are

Re: JSON Output Documentation

2023-05-03 Thread David Bremner
"Tim Culverhouse" writes: > Hey everyone - > > I've scoured the manpages and website for some documentation on the JSON > output format, but haven't found what I'm looking for. For the most > part, the commands are easy to figure out, but `notmuch show` has me > confused on the array nesting.

Re: Correcting message references

2023-04-25 Thread David Bremner
David Bremner writes: > Al Haji-Ali writes: > >> So it does seem to be a lingering ghost message, but I am sure that there >> are no messages in the database referring to this ID (except messages in >> this current thread which have the ID in the message bo

Re: Correcting message references

2023-04-22 Thread David Bremner
> > As long as some message refers to that ID, notmuch will create a "ghost > message", used for threading. You can look for a specific ghost message with something like $ quest -btype:T -b id:Q -d .local/share/notmuch/default/xapian \ "type:ghost and

Re: Correcting message references

2023-04-22 Thread David Bremner
Al Haji-Ali writes: > is completely unconnected the other 4 messages in the thread. Note > that if I change the "In-Reply-To" field in this message to anything > else, notmuch no longer groups these 5 messages into a single thread. > Yes, that's puzzling. I did not think about "ghost messages"

Re: Correcting message references

2023-04-22 Thread David Bremner
Al Haji-Ali writes: > I changed the message, removed "B" from "References" and deleted the > files of all old (and intermediate) drafts that have "B" in > "References". But no matter what I do, I have "B" grouped with "D" > and any other messages which I create with "In-Reply-To" being "A".

Re: API docs: notmuch_database_open_with_config with NULL config

2023-04-15 Thread David Bremner
James Cook writes: > It is possible that a short note indicating that detailed descriptions > will follow, placed at the top of the man page and/or at the top of the > "Functions" section, would have saved me from my impatience. I think I > do tend to read the first sentence or two of a man page

Re: API docs: notmuch_database_open_with_config with NULL config

2023-04-15 Thread David Bremner
James Cook writes: > Hi list, > > If I'm not mistaken, calling notmuch_database_open_with_config with > config_path = NULL causes notmuch to try to find the config file > automatically. > > It would be nice if that were documented in the notmuch(3) man page. I > can try drafting a patch if that

Re: [PATCH] doc: fix typos

2023-04-13 Thread David Bremner
Jakub Wilk writes: > --- > doc/man1/notmuch-config.rst | 2 +- > doc/man1/notmuch-git.rst | 4 ++-- > doc/man7/notmuch-sexp-queries.rst | 8 > doc/notmuch-emacs.rst | 6 +++--- > 4 files changed, 10 insertions(+), 10 deletions(-) applied to master, thanks

Re: [PATCH 3/3] ruby: remove FileNames object

2023-04-12 Thread David Bremner
Felipe Contreras writes: > Not used anymore now that we return an array of strings directly. series applied to master, with one whitespace tweak in patch 2/3 ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to

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

2023-04-10 Thread David Bremner
Paul Wise writes: > that changes the meaning of the query but I couldn't find any way to > prevent an arbitrary Message-Id from inserting parentheses into the > query. Also notmuch converts Message-Id (test)@hostname to just > @hostname in the Xapian database. I think that right now I am not

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

2023-04-09 Thread David Bremner
Paul Wise writes: > So I think that it would be good if there were a library for notmuch > query construction that would take care of all the different quoting > levels, Message-Id munging etc. This could then get language bindings > so that notmuch based tools and MUAs could use them for

[PATCH v3 5/5] debian: add autopkgtests

2023-04-09 Thread David Bremner
We generate output to stderr for BROKEN tests, which are not failures, so tell the test runner not to fail because of output on stderr. --- debian/tests/control | 17 + 1 file changed, 17 insertions(+) create mode 100644 debian/tests/control diff --git a/debian/tests/control

[PATCH v3 1/5] test: use bash specific test for feature tests

2023-04-09 Thread David Bremner
It is desirable to have the tests consider these variables being undefined as equivalent to the feature not being present, and in particular for the tests not to generate errors. We know the test suite is tied to bash anyway, so this is a simple fix. --- test/T060-count.sh | 2 +-

[PATCH v3 4/5] test: support testing notmuch as installed

2023-04-09 Thread David Bremner
We put some effort into testing the built copy rather than some installed copy. On the other hand for people like packagers, testing the installed copy is also of interest. When NOTMUCH_TEST_INSTALLED is set to a nonempty value, tests do not require a built notmuch tree or running configure.

[PATCH v3 2/5] test: check for empty/missing files in test_expect_equal_message_body

2023-04-09 Thread David Bremner
Messages can have empty bodies, but empty files are not messages. --- test/test-lib.sh | 8 1 file changed, 8 insertions(+) diff --git a/test/test-lib.sh b/test/test-lib.sh index 1a6525df..b5aa94dd 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -388,6 +388,14 @@

[PATCH v3 3/5] test: Guess a value for NOTMUCH_PYTHON

2023-04-09 Thread David Bremner
python3 will work for many people, and reduce the friction to running the tests without running configure first. --- test/test-lib-common.sh | 4 1 file changed, 4 insertions(+) diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh index 18fa29c0..4d14e0b3 100644 ---

v3 test notmuch as installed

2023-04-09 Thread David Bremner
Compared to the previous version [1], the first patch is now applied, and the setup for running without configure now relies on the various NOTMUCH_HAVE_* environment variables working OK when unset. This allows eliminating the "defaults.sh". There is also some added documentation on how to use

Re: Data loss

2023-04-08 Thread David Bremner
Carl Worth writes: > > What it could also do is create some placeholder file like > .NOTMUCH-MUTT-OUTPUT-DIR when it writes its output. And then it could > check for that file's existence before removing a directory. > Sounds reasonable to me. Would someone like to make a patch for notmuch-mutt?

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

2023-04-08 Thread David Bremner
Paul Wise writes: > +search($results_dir, $remove_dups, qq{thread:"{id:$mid}"}); did you test this with a message-id with spaces in it? the quoting is a delicate. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email

Re: Reimagining notmuch-git/nmbug

2023-04-06 Thread David Bremner
Felipe Contreras writes: > On Tue, Apr 4, 2023 at 12:54 PM David Bremner wrote: >> >> This sounds right. Can we use the detection of missing messages in >> wr_export to reset the appropriate counters? It looks like yes, given >> the call to store_lastmod.

Re: Reimagining notmuch-git/nmbug

2023-04-04 Thread David Bremner
Felipe Contreras writes: > On Mon, Apr 3, 2023 at 6:37 PM David Bremner wrote: > Or we could say that after jumping a certain threshold of lastmod we > delete all the messages and start from scratch, perhaps every 1000 > revisions. > > Or maybe the query could gene

Re: Reimagining notmuch-git/nmbug

2023-04-04 Thread David Bremner
Felipe Contreras writes: > > I'm not familiar with git-annex, I would need to see an example of > such merging happening. I was confused, git-annex is using the builtin merge strategy "union", which is not eliminating duplicates or sorting, so probably not applicable here. I still have to try

Re: Reimagining notmuch-git/nmbug

2023-04-03 Thread David Bremner
Felipe Contreras writes: > > That should work to update existing tags, but how are we going to > detect if a message has disappeared? Or is that not a thing? Indeed the same thought had occurred to me not long ago. I remembered (belately) that I'd been through some similar thought process with

Re: Reimagining notmuch-git/nmbug

2023-04-03 Thread David Bremner
David Bremner writes: > Indeed that speeds up the initial clone on this machine from 39 minutes > (I switched machines) to 30s. I will play with it a bit more, and report > back. It's not a showstopper, but "git pull" takes about 1/2 the wall time (about 2/3 of the CPU ti

Re: Reimagining notmuch-git/nmbug

2023-04-03 Thread David Bremner
Felipe Contreras writes: > By distributing the files in multiple directories like notmuch-git > does using BLAKE2b, the operation is much faster. > > I've pushed the changes, now there's a dependency, but you can just > `gem install blake2b`. > > I'm able to clone the database of the performance

Re: Data loss

2023-04-03 Thread David Bremner
Fulvio Pizzigoni writes: > > After this my .mutt directory (~ 4 GB di mail-boxess) appears so: > fulvio@linux:~$ ll .mutt > totale 12 > drwxr-xr-x 2 fulvio fulvio 4096 18 feb 20.32 cur > drwxr-xr-x 2 fulvio fulvio 4096 18 feb 20.32 new > drwxr-xr-x 2 fulvio fulvio 4096 18 feb 20.32 tmp Hi

Re: Reimagining notmuch-git/nmbug

2023-04-03 Thread David Bremner
David Bremner writes: > > I'm intrigued (and indeed I hadn't really thought about the degree to > which we were re-inventing git-fast-import and friends); however so far > my experiments did not get far enough to say anything conclusive. > I did manage to finish, about 70

[PATCH] CLI/git: add reset command

2023-04-03 Thread David Bremner
Sometimes merging is not what we want with tags; in particular it tends to keep tags in the local repo that have been removed elsewhere. This commit provides a new reset command; the reset itself is trivial, but the work is to provide a safety check that uses the existing --force and

Re: Reimagining notmuch-git/nmbug

2023-04-03 Thread David Bremner
Felipe Contreras writes: > Hi, > > I noticed you promoted notmuch-git as a user tool to toy around with it. > > Very quickly I realized that most of what it does is something I've > been working on for at least 10 years: making git work with other > tools. > > I presume you haven't heard of git

Re: v2 Index some attachements as text

2023-04-02 Thread David Bremner
David Bremner writes: > This obsoletes the series starting with > > id:20220903232839.1473915-2-da...@tethera.net > > Compared to that series this is rebased against master, it has some > more tests (including both positive and negative tests) and it > documents

Re: [PATCH 0/3] ruby: get rid of Tags object

2023-04-02 Thread David Bremner
Felipe Contreras writes: > We don't need a Tags enumerable object only for a small number of strings, we > can just get them directly. > > This fixes an interaction problem where we might request two tags iterables > from the same message: > > tags_0 = notmuch_message_get_tags(message); I

Re: [PATCH 1/1] lib: replace some uses of Query::MatchAll with a thread-safe alternative

2023-03-31 Thread David Bremner
Kevin Boulain writes: > This replaces two instances of Xapian::Query::MatchAll with the > equivalent but thread-safe alternative Xapian::Query(std::string()). > Xapian::Query::MatchAll maintains an internal pointer to a refcounted > Xapian::Internal::QueryTerm. > Applied to master, thanks, and

Re: [PATCH 0/2] ruby: database open improvements

2023-03-31 Thread David Bremner
Felipe Contreras writes: > Essentially we want to do notmuch_database_open_with_config() and load the > default database. > Applied to master. Thanks for this change, both are things I'd wanted to fix. d ___ notmuch mailing list --

Re: [PATCH v2 5/5] test: add test for notmuch_message_remove_all_properties_with_prefix

2023-03-30 Thread David Bremner
Kevin Boulain writes: > It wasn't covered, though it shares most of its implementation with > notmuch_message_remove_all_properties. I have applied this series to master, with one commit added in the middle commit 336334996750240608d5f29ed5dd8e40a69c4d79 Author: David Bremner Date: T

Re: [PATCH v3 1/2] test: uncaught exception when editing properties of a removed message

2023-03-30 Thread David Bremner
Kevin Boulain writes: > These two functions don't fail gracefully when editing a removed > message: > BROKEN edit property on removed message without uncaught exception > --- T610-message-property.20.EXPECTED 2023-02-27 11:33:25.792764376 > + > +++

Re: [PATCH 2/2] lib/message-property: sync removed properties to the database

2023-03-29 Thread David Bremner
Kevin Boulain writes: > > Yeah, talloc's documentation confirms that when the context is free'd > every child is also free'd. Not quite sure what style is preferred > (explicit or implicit, implicit sure leads to nicer code here). In general implicit de-allocation is fine.

Re: [PATCH 2/2] lib/message-property: sync removed properties to the database

2023-03-29 Thread David Bremner
Kevin Boulain writes: > On 2023-03-03 at 00:39 +02, Tomi Ollila wrote: >> Somehow testkey1 = testvalue1 disappeared from the test code (which is >> probably expected -- perhaps the commit message of the *change* 1/2 >> tried to point to that ;D) > > Yes, that proves

Re: [PATCH v2 1/2] test: uncaught exception when editing properties of a removed message

2023-03-29 Thread David Bremner
Kevin Boulain writes: > +== stderr == > +A Xapian exception occurred at message-property.cc:XXX: No termlist for > document 54 > +EOF > +test_expect_equal_file EXPECTED OUTPUT > + > +add_email_corpus Hi Kevin; Thanks for the speedy update. I hate to do this but I think the message is now

Re: [PATCH 0/3] ruby: get rid of FileNames object

2023-03-27 Thread David Bremner
Felipe Contreras writes: > We don't need a FileNames enumerable object only for a small number of > strings, > we can just get them directly. > > This iterator is meant to be transient and works only once, so we better just > iterate it once. > > This is the same approach I took with the Tags

Re: [PATCH 2/2] lib/message-property: catch xapian exceptions

2023-03-27 Thread David Bremner
Kevin Boulain writes: > Since libnotmuch exposes a C interface there's no way for clients to > diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh > index 944e1810..f7cabe4d 100755 > --- a/test/T610-message-property.sh > +++ b/test/T610-message-property.sh > @@ -363,7

Re: Help in Emacs config

2023-03-07 Thread David Bremner
Atanas Janackovski writes: > I have justed strated using `notmuch' in Emacs (doom configuration), and I > love > it! However, there are a couple of things I'd like help with. > > 1. I have a number of accounts that I use. How do I configure my config to > save >draft messages based on the

Re: crash on incoming email

2023-03-01 Thread David Bremner
Antoine Beaupré writes: > > Still, one has to wonder: if emacs can just dump core if someone messes > with my eln-cache, that's... bad, no? Yes, it is bad, but the native compilation functionality is new, so hopefully things will get better over time.

Re: [PATCH 1/1] lib/notmuch: update example

2023-02-27 Thread David Bremner
Kevin Boulain writes: > Likely missed in 86cbd215e, when notmuch_query_search_messages_st was > renamed to notmuch_query_search_messages. > --- Applied to master, thanks. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an

Re: [DRAFT 1/1] lib: replace some uses of Query::MatchAll with a thread-safe alternative

2023-02-26 Thread David Bremner
Kevin Boulain writes: > This is what can be expected from the tests when they fail: >== stderr == > +== > +WARNING: ThreadSanitizer: data race (pid=207931) > + Read of size 1 at 0x7b1001a0 by thread T2: > +#0 memcpy (libtsan.so.2+0x62506) > +#1 void

Re: [DRAFT 0/1] lib: replace some uses of Query::MatchAll with a thread-safe alternative

2023-02-26 Thread David Bremner
Kevin Boulain writes: > > Thoughts? Should clients using the library gate every function call to > Notmuch behind a lock instead? Ideally that should not be necessary. On the other hand, it may take some time to fix issues with concurrent access. > I can also start a discussion in sfsexp's

Re: [PATCH 1/1] lib/notmuch: update example

2023-02-26 Thread David Bremner
Kevin Boulain writes: > Likely missed in 86cbd215e, when notmuch_query_search_messages_st was > renamed to notmuch_query_search_messages. > --- > lib/notmuch.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/notmuch.h b/lib/notmuch.h > index ce375c04..73e246e0

Re: notmuch-emacs inline image display broken in emacs-29

2023-02-25 Thread David Bremner
David Bremner writes: > Alex Murray writes: > > I tried replacing indent-rigidly with a simplified version the and that > leaves the image inserted, but unfortunately doesn't indent it > properly. If you want to play with it, my half working patch is > attached. >

Re: notmuch-emacs inline image display broken in emacs-29

2023-02-25 Thread David Bremner
but then apparently deleted by indent-rigidly (probably because it looks like whitespace). I tried replacing indent-rigidly with a simplified version the and that leaves the image inserted, but unfortunately doesn't indent it properly. If you want to play with it, my half working patch is attached

Re: crash on incoming email

2023-02-22 Thread David Bremner
Antoine Beaupré writes: > When I have the attached email in my `inbox` and hit ENTER on the email > (notmuch-search-show-thread here), Emacs crashes completely with: > > fév 22 11:57:10 angela emacs[112721]: >

Re: Thread safety?

2023-02-22 Thread David Bremner
Kevin Boulain writes: > The documentation of MatchNothing says it's thread-safe. > > If you'd like, I'm happy to submit a patch (likely very small, given the > limited number of occurrences) after I review a bit more the > documentation and the code (I'm just starting with Notmuch and Xapian so

Re: [PATCH] emacs/tree: use two argument form of setq-local

2023-02-21 Thread David Bremner
David Bremner writes: > Apparently the macro setq-local only takes two arguments in Emacs 26.1 > --- > emacs/notmuch-tree.el | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el > index 1477

Re: Thread safety?

2023-02-21 Thread David Bremner
Kevin Boulain writes: > So, is Notmuch expected to be thread safe? There are some indications it > should be (e.g.: lib/init.cc has locking) but all instances of > Xapian::Query::MatchAll would have to be replaced. > Xapian states it's thread safe: >

[PATCH] emacs/tree: use two argument form of setq-local

2023-02-21 Thread David Bremner
Apparently the macro setq-local only takes two arguments in Emacs 26.1 --- emacs/notmuch-tree.el | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index 14775d59..b58fa6a6 100644 --- a/emacs/notmuch-tree.el +++

Re: v2 of long filename diagnostics

2023-02-20 Thread David Bremner
David Bremner writes: > This one use a more reasonable error code. As far as showing up every > time, it does if I use --full-scan. That is the same (for me) as > non-email files. series applied to master. d ___ notmuch mailing list -

Re: [PATCH v9] emacs: notmuch-tree-outline-mode

2023-02-20 Thread David Bremner
"Jose A. Ortega Ruiz" writes: > On Mon, Dec 26 2022, David Bremner wrote: > >> Amended by db: Copy docstring to manual and edit for presentation. Add >> two tests. > > Thanks for the grunt work, David. Just a comment on a sloppy comment of > mine below: >

Re: emacs/notmuch hangs opening email

2023-02-20 Thread David Bremner
Jon Fineman writes: > When I try and open one specific email, I get a message of > "Fontifying..." and then the mouse pointer turns into a watch. > > If I C-G it breaks out and shows the email message with a red warning > at the top of "[some mark read tag changes may have failed]", but > since

Re: Proof of concept for counting messages in thread

2023-02-19 Thread David Bremner
David Bremner writes: > Michael J Gruber writes: > >> >> Yes, the extra ones all are ghosts, and I slowly remember that they >> scared me in the past already ... >> >> These ghosts appear to be pretty common. It happens all the time that >> I am joine

Re: Proof of concept for counting messages in thread

2023-02-19 Thread David Bremner
Michael J Gruber writes: > > Yes, the extra ones all are ghosts, and I slowly remember that they > scared me in the past already ... > > These ghosts appear to be pretty common. It happens all the time that > I am joined to an existing discussion thread where I do not have all > references. I

[PATCH 5/6] WIP/test: (count ...) tests

2023-02-18 Thread David Bremner
The most interesting case is probably tags with a small number of uses, since these could be typos or similar errors. --- test/T083-sexpr-count.sh | 8 1 file changed, 8 insertions(+) diff --git a/test/T083-sexpr-count.sh b/test/T083-sexpr-count.sh index 858aa8bf..1be3f62d 100755 ---

[PATCH 4/6] WIP/test: pathname related tests

2023-02-18 Thread David Bremner
--- test/T083-sexpr-count.sh | 21 + 1 file changed, 21 insertions(+) diff --git a/test/T083-sexpr-count.sh b/test/T083-sexpr-count.sh index f3010d11..858aa8bf 100755 --- a/test/T083-sexpr-count.sh +++ b/test/T083-sexpr-count.sh @@ -112,4 +112,25 @@ notmuch@notmuchmail.org

[PATCH 2/6] WIP/lib: support count modifier in sexp queries

2023-02-18 Thread David Bremner
In this initial commit, support all term based fields, but only document/test the thread size feature. --- lib/parse-sexp.cc| 65 ++-- test/T083-sexpr-count.sh | 30 +++ 2 files changed, 79 insertions(+), 16 deletions(-) create mode

[PATCH 3/6] WIP/test: (count ...) tests for to / from

2023-02-18 Thread David Bremner
--- test/T083-sexpr-count.sh | 85 1 file changed, 85 insertions(+) diff --git a/test/T083-sexpr-count.sh b/test/T083-sexpr-count.sh index e825ef3d..f3010d11 100755 --- a/test/T083-sexpr-count.sh +++ b/test/T083-sexpr-count.sh @@ -27,4 +27,89 @@ cat

[PATCH 6/6] WIP/tests: (count ...) tests for subject

2023-02-18 Thread David Bremner
--- test/T083-sexpr-count.sh | 8 1 file changed, 8 insertions(+) diff --git a/test/T083-sexpr-count.sh b/test/T083-sexpr-count.sh index 1be3f62d..b1c0a3ac 100755 --- a/test/T083-sexpr-count.sh +++ b/test/T083-sexpr-count.sh @@ -141,4 +141,12 @@ test_begin_subtest "no tag is used less

WIP: add a (count ...) modifier for sexp-queries

2023-02-18 Thread David Bremner
This updates and obsoletes the series at [1]. The backend that constructs queries is unmodified from that series, but the parser now allows the use of count modifier in several more places. Basically there is not much more code to maintain to do it for any field based on terms (notably not date),

[PATCH 1/6] WIP/lib: add count query backend

2023-02-18 Thread David Bremner
on few / many messages. + * + * This file is part of notmuch. + * + * Copyright © 2023 David Bremner + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version

Re: Proof of concept for counting messages in thread

2023-02-13 Thread David Bremner
Michael J Gruber writes: > That is really weird: > ``` > xapian-delve -t G00021229 . > Posting List for term 'G00021229' (termfreq 115, collfreq 0, > wdf_max 0): 146259 ... > ``` > with 115 record numbers, all different. > Doing `xapian-delve -1r` for each of them and grepping

Re: Proof of concept for counting messages in thread

2023-02-13 Thread David Bremner
Michael J Gruber writes: > > It has 5, as confirmed by the search output and that of `notmuch > count`. But it is matched by `count 115`. > `xapian-check` is happy. (There used to be some issue with additional > thread entries at some point.) > > Michael A simple test to try is % xapian-delve

Re: Proof of concept for counting messages in thread

2023-02-13 Thread David Bremner
Michael J Gruber writes: > I am getting a few surprising matches, e.g. > ``` > notmuch search --query=sexp '(thread (count 115)))' > thread:00021229 2021-05-17 [5/5] Michael J Gruber ... redacted > notmuch count --exclude=false thread:00021229 > 5 > ``` > It could be some

[PATCH 1/2] WIP/lib: add count query backend

2023-02-13 Thread David Bremner
on few / many messages. + * + * This file is part of notmuch. + * + * Copyright © 2023 David Bremner + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version

Proof of concept for counting messages in thread

2023-02-13 Thread David Bremner
So for this only supports counting messages in threads, and the sexp based query parser. It seems useful to expand it to other fields (from, e.g.). I'm not sure how motivated I am to shim this into the infix query parser, but we will see how it goes.

[PATCH 2/2] WIP: support thread count queries

2023-02-13 Thread David Bremner
--- lib/parse-sexp.cc | 35 --- test/T081-sexpr-search.sh | 6 ++ 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/lib/parse-sexp.cc b/lib/parse-sexp.cc index 9cadbc13..1faa9023 100644 --- a/lib/parse-sexp.cc +++ b/lib/parse-sexp.cc @@

Re: Cannot find notmuch.el file

2023-02-12 Thread David Bremner
Vishal Chourasia writes: > Thanks! Installing the emacs-notmuch package from epel 8 worked. > Great, thanks for letting us know. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: Cannot find notmuch.el file

2023-02-09 Thread David Bremner
Vishal Chourasia writes: > On 2/7/23 19:53, David Bremner wrote: >> Which distribution? At least on Debian based distributions, the emacs >> interface is packaged seperately as elpa-notmuch > RHEL Fedora has a separate emacs-notmuch package. Perhaps that also exists

Re: Cannot find notmuch.el file

2023-02-07 Thread David Bremner
Vishal Chourasia writes: > Greetings, > > > where can I find the notmuch.el file when notmuch was installed from the > distribution's package repository? > > # notmuch --version > notmuch 0.35 Which distribution? At least on Debian based distributions, the emacs interface is packaged

Re: emacs: keybindings in notmuch-show for copying the target of a link for a text/html part? (M-x shr-copy-url)

2023-01-27 Thread David Bremner
Daniel Kahn Gillmor writes: > it appears that by positioning the point somewhere within the link and > doing "M-x shr-copy-url" i can copy the target of the link to the kill > ring. > I think it can be added to the mode-map in emacs/notmuch-show.el. does > anyone have a preference about what

Re: ## error when running notmuch from emacsclient, but not from standalone emacs instance

2023-01-18 Thread David Bremner
ricardomart...@riseup.net writes: > Ok, so I tested this. I tried stopping the systemd unit of the emacs > server, opened an emacs instance, and started the server from within > emacs (M-x server-start ). Connected to this server in a new frame > ($ emacsclient -nc) and tried executing notmuch

Re: ## error when running notmuch from emacsclient, but not from standalone emacs instance

2023-01-18 Thread David Bremner
ricardomart...@riseup.net writes: > > When I try to run notmuch from the emacsclient instance (M-x notmuch > ), I get an error > "notmuch count --batch failed > Please check that the notmuch CLI is new enough to support `count > --batch'. In general we recommend running matching versions of > the

ANNOUNCE: muchsync 7 released

2023-01-11 Thread David Mazieres
be an order of magnitude faster when deleting large numbers of mail messages or reorganizing your mail directory structure. You can download muchsync from the usual place: https://www.muchsync.org/ Enjoy, David ___ notmuch mailing list -- notmuch

Re: [PATCH] configure: use pkg-config for gpgme

2023-01-10 Thread David Bremner
Daniel Kahn Gillmor writes: > Just a nudge on this patch: > > any chance we can have it applied in the notmuch tree? > > --dkg > Applied to master. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to

Re: [PATCH] emacs: add global tag history

2023-01-06 Thread David Bremner
inwit writes: > Save a list of every tag change in the new variable notmuch-tag-history. > --- > Storing the full history of tags can prove useful for a) repeated tag > changes as in [0] and b) eventually logging and undoing tag changes. > > This is my first commit in elisp. I expect turbulences

Re: [PATCH 1/4] test: mark some tests as broken when run as root.

2023-01-05 Thread David Bremner
Tomi Ollila writes: > > Good progress -- bash has: > > $ bash -c 'set' | grep UID > EUID=1001 > UID=1001 I made that change. > another question is whether test_subtest_broken_for_root > is good name. perhaps it is tolerable enough I couldn't think of anything better, but am happy to search

[PATCH v2 2/3] lib: parse index.as_text

2023-01-05 Thread David Bremner
We pre-parse into a list of compiled regular expressions to avoid calling regexc on the hot (indexing) path. As explained in the code comment, this cannot be done lazily with reasonable error reporting, at least not without touching a lot of the code in index.cc. --- lib/database-private.h | 4

[PATCH v2 1/3] lib: add config key INDEX_AS_TEXT

2023-01-05 Thread David Bremner
Higher level processing as a list of regular expressions and documentation will follow. --- lib/config.cc| 3 +++ lib/notmuch.h| 1 + test/T030-config.sh | 1 + test/T055-path-config.sh | 1 + test/T590-libconfig.sh | 5 + 5 files changed, 11 insertions(+) diff

[PATCH v2 3/3] lib: index attachments with mime types matching index.as_text

2023-01-05 Thread David Bremner
quot; +notmuch config set index.as_text '[' +notmuch reindex '*' >& OUTPUT +cat< EXPECTED +Error in index.as_text: Invalid regular expression: [ +EOF +test_expect_equal_file EXPECTED OUTPUT + +test_done diff --git a/test/corpora/indexing/fake-pdf:2,S b/test/corpora/indexing/fake-

v2 Index some attachements as text

2023-01-05 Thread David Bremner
This obsoletes the series starting with id:20220903232839.1473915-2-da...@tethera.net Compared to that series this is rebased against master, it has some more tests (including both positive and negative tests) and it documents the non-anchoredness of the involved regex search.

[PATCH 1/4] test: mark some tests as broken when run as root.

2023-01-04 Thread David Bremner
File permission errors e.g., are hard to trigger as root. --- test/T050-new.sh | 1 + test/T150-tagging.sh | 1 + test/test-lib.sh | 6 ++ 3 files changed, 8 insertions(+) diff --git a/test/T050-new.sh b/test/T050-new.sh index cb67889c..240c1810 100755 --- a/test/T050-new.sh +++

[PATCH 4/4] debian: add autopkgtests

2023-01-04 Thread David Bremner
We generate output to stderr for BROKEN tests, which are not failures, so tell the test runner not to fail because of output on stderr. --- debian/tests/control | 13 + test/T800-asan.sh| 8 ++-- test/defaults.sh | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-)

<    1   2   3   4   5   6   7   8   9   10   >