Re: Reply to content of "List-Post" header?

2019-03-02 Thread Gregor Zattler
Hi Ralph, * Ralph Seichter [2019-03-01; 23:26]: > Either my search-fu is lacking today, or there is really not much > information to be found about this: > > Using Notmuch with Emacs, the keys "r" and "R" are bound to "reply to > sender" and "reply to all", respectively. Neither is what I require

Re: Reply to content of "List-Post" header?

2019-03-02 Thread Ralph Seichter
* Gregor Zattler: > I do "R" for reply-to-all and then C-c C-l for message-to-list-only > which reduces the To: and Cc: to the mailing list address. I tried both "C-c C-l" and "M-x message-to-list-only" on several messages, but it does not seem to have any effect. I don't see any error reports,

[PATCH] util: make remaining headers includable from C++

2019-03-02 Thread David Bremner
libnotmuch_util.a is supposed to be usable from the library and the CLI, but much the library is compiled as C++. Add in appropriate wrapping to prevent symbol mangling. These wrappers already existed in string-util.h; it seems better to be consistent. --- util/crypto.h | 7 +++

Re: Reply to content of "List-Post" header?

2019-03-02 Thread Brian Sniffen
You can set message-subscribed-addresses or its cousins; then message-to-list-only will work for you. -- Brian Sniffen > On Mar 2, 2019, at 10:00 AM, Ralph Seichter wrote: > > * Gregor Zattler: > >> I do "R" for reply-to-all and then C-c C-l for message-to-list-only >> which reduces the

[PATCH 1/7] cli/config: refactor _stored_in_db

2019-03-02 Thread David Bremner
This will make it easier to add other prefixes that are stored in the database, compared to special casing each one as "query." was. --- notmuch-config.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/notmuch-config.c b/notmuch-config.c index

[PATCH 3/7] lib: setup user headers in query parser

2019-03-02 Thread David Bremner
These tests will need to be updated if the Xapian query print/debug format changes. --- lib/database.cc | 35 +++ test/T730-user-header.sh | 21 + 2 files changed, 56 insertions(+) diff --git a/lib/database.cc b/lib/database.cc index

[PATCH 6/7] lib/database: index user headers.

2019-03-02 Thread David Bremner
There is a O(log(#user headers)) penalty for the second lookup of the prefix name. --- lib/database.cc | 6 ++ lib/index.cc | 28 lib/notmuch-private.h| 5 + test/T730-user-header.sh | 17 + 4 files changed, 56

[PATCH 4/7] lib: cache user prefixes in database object

2019-03-02 Thread David Bremner
This will be used to avoid needing a database access to resolve a db prefix from the corresponding UI prefix (e.g. when indexing). Arguably the setup of the seperate header map does not belong here, since it is about indexing rather than querying, but we currently don't have any other indexing

[PATCH 5/7] lib: support user prefix names in term generation

2019-03-02 Thread David Bremner
This should not change the indexing process yet as nothing calls _notmuch_message_gen_terms with a user prefix name. On the other hand, it should not break anything either. --- lib/database.cc | 20 lib/message.cc| 5 - lib/notmuch-private.h | 1 + 3 files

[PATCH 2/7] cli/config: support user header index config

2019-03-02 Thread David Bremner
We don't do anything with this configuration information information yet, but nonetheless add a couple of regression tests to make sure we don't break standard functionality when we do use the configuration information. --- notmuch-config.c | 1 + test/T730-user-header.sh | 38

[PATCH 7/7] doc: document user header indexing.

2019-03-02 Thread David Bremner
It's a bit odd that the primary documentation is in notmuch-config, but it is consistent with the "query:" prefix. --- doc/man1/notmuch-config.rst | 8 doc/man7/notmuch-search-terms.rst | 3 +++ 2 files changed, 11 insertions(+) diff --git a/doc/man1/notmuch-config.rst

WIP2: index user headers

2019-03-02 Thread David Bremner
This obsoletes [1] This is getting closer to mergable, but it still needs at least to sanity check the names of user defined prefixes (see point (a) below). The main differences from [1] are (a) xapian prefixes are no longer defined via upper casing, as this is locale dependent. The do rely

Re: Reply to content of "List-Post" header?

2019-03-02 Thread Ralph Seichter
* Brian Sniffen: > You can set message-subscribed-addresses or its cousins; then > message-to-list-only will work for you. Ah, that's what was missing, thank you. -Ralph ___ notmuch mailing list notmuch@notmuchmail.org

Re: WIP2: index user headers

2019-03-02 Thread David Bremner
David Bremner writes: > This obsoletes [1] > This is getting closer to mergable, but it still needs at least to > sanity check the names of user defined prefixes (see point (a) below). > > The main differences from [1] are [1] is of course id:20181117140901.1870-1-da...@tethera.net > > (a)

[PATCH] lib/string_map: fix return type of string_cmp

2019-03-02 Thread David Bremner
I can't figure out how checking the sign of a bool ever worked. The following program demonstrates the problem (i.e. for me it prints 1). #include #include int main(int argc, char **argv) { bool x; x = -1; printf("x = %d\n", x); } This seems to be mandated by the C99 standard

Re: Reply to content of "List-Post" header?

2019-03-02 Thread Gregor Zattler
Hi Ralph, * Ralph Seichter [2019-03-02; 17:34]: > * Brian Sniffen: > >> You can set message-subscribed-addresses or its cousins; then >> message-to-list-only will work for you. > > Ah, that's what was missing, thank you. indeed, I forgot: my procmmail scripts recognize mailing list headers and

[PATCH] Fix notmuch-describe-key

2019-03-02 Thread Yang Sheng
Fix notmuch-describe-key crashing for the following two cases 1. format-kbd-macro cannot deal with keys like [(32 . 126)], switch to use key-description instead. 2. if a function in the current keymap is not bounded, it will crash the whole process. We check if it is bounded and silently skip it