Re: What do people use for calendar invites?

2021-01-21 Thread Jani Nikula
On Wed, 20 Jan 2021, David Mazieres wrote: > Calendar invites and the text/calendar mime type seem to be getting > increasingly important. I asked about this five years ago and didn't > get a good response, so I apologize for the repeat question, but I'm > wondering if anything has changed

Re: [RFC PATCH] build: add meson build system

2020-01-12 Thread Jani Nikula
On Sun, 12 Jan 2020, David Bremner wrote: > Jani Nikula writes: > >> This is a draft patch adding basic configure, build and test support >> for the binaries. Everything else is left out for now. It would be a >> considerable amount of work to convert everyt

[RFC PATCH] build: add meson build system

2020-01-11 Thread Jani Nikula
Add initial support for configuring and building notmuch using the Meson Build System [1]. The "home-brew" configure script in notmuch has grown rather complicated, although the goal was originally to avoid the complexity of using autotools. Since then, meson has emerged as a viable option for

[PATCH 1/2] doc: pass specified configure options as tags to Sphinx

2020-01-11 Thread Jani Nikula
Add generic support for passing enabled configure options as tags to Sphinx. Add TAGS make variable to specify the configure options, and use the sphinx-build -t option to add the options equal to 1 as tags. The tags may be used in conf.py to conditionally adjust the configuration [1], and to

[PATCH 2/2] doc: add a hint about field processor support availability

2020-01-11 Thread Jani Nikula
In most cases the documentation and the notmuch binary will be built on the same machine and the same dependencies. Hint at the field processor support availability in the man page based on the documentation build host. --- doc/Makefile.local| 2 +-

Re: Inconsistent query results

2020-01-05 Thread Jani Nikula
On Sun, 05 Jan 2020, Nicolas Bock wrote: > When I run the following query I get no results: > > $ notmuch search --output=files folder:"mail_account/Deleted > Items" and not tag:deleted > > When I run that same query in emacs/notmuch I find one file: > > query:

Re: [PATCH] Fix format_headers_sprinter to return all headers

2019-11-10 Thread Jani Nikula
On Sat, 09 Nov 2019, David Bremner wrote: > Jani Nikula writes: > >> On Sat, 09 Nov 2019, Johan Parin wrote: >>> Modify format_headers_sprinter so that it returns all headers in the >>> sexp, instead of a fixed set of headers. >> >> I have to deal wit

Re: [PATCH] Fix format_headers_sprinter to return all headers

2019-11-10 Thread Jani Nikula
On Sat, 09 Nov 2019, Johan Parin wrote: > Jani Nikula writes: > >> On Sat, 09 Nov 2019, Johan Parin wrote: >>> Modify format_headers_sprinter so that it returns all headers in the >>> sexp, instead of a fixed set of headers. >> >> I have to deal wit

Re: [PATCH] Fix format_headers_sprinter to return all headers

2019-11-09 Thread Jani Nikula
On Sat, 09 Nov 2019, Johan Parin wrote: > Modify format_headers_sprinter so that it returns all headers in the > sexp, instead of a fixed set of headers. I have to deal with plenty of long threads that already take a very long time to open in notmuch-emacs. How's this going to impact the emacs

[PATCH] doc: add support for adding configure options as Sphinx tags

2019-03-19 Thread Jani Nikula
Add the configure options specified in $(TAGS) that equal 1 as tags on the Sphinx command line using the -t option. The tags may be used to conditionally include documentation using the Sphinx "only" directive [1]. As an example, indicate in the documentation whether the Xapian field processor is

[PATCH 3/3] python: fix threads.__str__ automethod documentation

2019-02-11 Thread Jani Nikula
Indent the directive properly to attach it to Threads autoclass documentation. Fixes: WARNING: don't know which module to import for autodocumenting '__str__' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name) ---

[PATCH 2/3] python: fix documentation title underline

2019-02-11 Thread Jani Nikula
Fix documentation build sphinx warning: filesystem.rst:18: WARNING: Title underline too short. --- bindings/python/docs/source/filesystem.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/docs/source/filesystem.rst

[PATCH 1/3] python: fix documentation build with python 3.7

2019-02-11 Thread Jani Nikula
From: Jani Nikula The simplistic mocking in conf.py falls short on python 3.7. Just use unittest.mock instead. Fixes: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/sphinx/config.py", line 368, in eval_config_file execfile_(filename, namespace) File

Re: [Bug] Cannot build python3 bindings documentation of notmuch 0.28.1

2019-02-10 Thread Jani Nikula
On Wed, 06 Feb 2019, Dan Čermák wrote: > Hi list, > > the python3 bindings documentation seems to be broken: > > on OpenSUSE Tumbleweed and Fedora 29 (both have Python 3.7 and sphinx > 1.7.6) I get this: Looks like a change in Python 3.7 makes the ctypes mocking in

Re: [PATCH v2 1/4] test: dynamically generate parser tests

2019-01-27 Thread Jani Nikula
Apologies for the noise, I sent the entire series to the wrong list. :( BR, Jani. On Mon, 28 Jan 2019, Jani Nikula wrote: > It's impossible to have expected failures or other unittest decorators > at subtest granularity. They only work at the test method level. On the > other hand

[PATCH v2 4/4] test: use html builder for directive tests

2019-01-27 Thread Jani Nikula
Slower but does not lose information as much, providing more accurate results. Switch to the basic template for speed. --- test/conf.py | 2 +- test/test_cautodoc.py | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/conf.py b/test/conf.py index

[PATCH v2 3/4] test: add support for flagging expected failures in testcase options

2019-01-27 Thread Jani Nikula
Since our tests are dynamically created, we also need to decorate expected failures dynamically. Use the testcase options file as the source. Only pass known directive options to the directive in the cautodoc test. Add a meta test to verify this works, with result "OK (expected failures=2)". ---

[PATCH v2 2/4] test: dynamically generate directive tests

2019-01-27 Thread Jani Nikula
Similar to the parser test transition to dynamically generate test methods, but with more test separation added. After this, the Sphinx build is done independently for each test case, and separately for the actual directive output and the expected output. This removes any potential C domain

[PATCH v2 1/4] test: dynamically generate parser tests

2019-01-27 Thread Jani Nikula
It's impossible to have expected failures or other unittest decorators at subtest granularity. They only work at the test method level. On the other hand we don't want to be manually adding test methods when all of the tests are defined in terms of input files and expected results. Generate test

Re: [PATCH] cli: Support --include-html and --body=false for --format=text

2018-10-25 Thread Jani Nikula
On Thu, 25 Oct 2018, ma...@kakoune.org wrote: > text format is convenient for shell based parsing of notmuch output, > adding support for --include-html and --body=false improves its > usefulness to write complex shell based scripts. It's debatable whether parsing the --format=text output

Re: Notmuch DB Problems

2018-09-05 Thread Jani Nikula
On Tue, 04 Sep 2018, mu...@nawaz.org wrote: > Hi, > > A few days ago I noticed notmuch new was no longer working (I have it > as a cron job so it took a while to figure it out). > > It just freezes. I do have a Python hook, and it was freezing on the > line that opens the database. > > I tried a

Re: notmuch shows tag which is not on any email

2018-06-04 Thread Jani Nikula
On Mon, 04 Jun 2018, Gregor Zattler wrote: > Dear notmuch developers, > > does notmuch remember tags even if at time of query there is no > message tagged with the respective tag?: > > $ notmuch search --output=tags '*' | grep telegraph > EA%3Dtelegraph%40gmx%2Enet > EA=telegr...@gmx.net > > > $

Re: [PATCH 3/4] lib: define specialized get_thread_id for use in thread subquery

2018-05-06 Thread Jani Nikula
On Sat, 05 May 2018, David Bremner wrote: > The observation is that we are only using the messages to get there > thread_id, which is kindof a pessimal access pattern for the current > notmuch_message_get_thread_id LGTM. > --- > lib/message.cc| 17 + >

Re: [PATCH 1/4] lib: add thread subqueries.

2018-05-06 Thread Jani Nikula
On Sat, 05 May 2018, David Bremner wrote: > This change allows queries of the form > > thread:{from:me} and thread:{from:jian} and not thread:{from:dave} > > This is still somewhat brute-force, but it's a big improvement over > both the shell script solution and the previous

Re: [PATCH 2/2] test: use --no-mtime-opt in T050-new.sh

2018-04-29 Thread Jani Nikula
On Sun, 29 Apr 2018, David Bremner wrote: > Wherever the test relies on directories being scanned, this option > should be used to avoid skipping them due to mtimes on directories > matching the database. I think you could additionally remove a few touch calls in the test.

Re: [PATCH 1/2] CLI/new: add mtime-opt option

2018-04-29 Thread Jani Nikula
On Sun, 29 Apr 2018, David Bremner wrote: > This option, on by default, controls whether mtimes are used to > optimize the scanning of directories. The intent is to turn this > optimization off for certain tests. > --- > notmuch-new.c | 9 ++--- > 1 file changed, 6

Re: non-deterministic behaviour of new.ignore (regexp) test

2018-04-29 Thread Jani Nikula
On Sat, 28 Apr 2018, David Bremner wrote: > For me the following seems to consistently fail after between 30 and 500 > attempts > > export NOTMUCH_TEST_QUIET=yes; count=0; while ./T050-new.sh; do (( > count++ )); echo $count; done I believe this happens because the

Re: [PATCH 1/2] cli: looking for config file in $XDG_CONFIG_HOME

2018-04-06 Thread Jani Nikula
On Thu, 15 Mar 2018, Daniel Kahn Gillmor wrote: > On Wed 2018-03-14 22:54:06 -0300, David Bremner wrote: >> There doesn't seem to be a good reason to drop ~/.notmuch-config >> completely here. As Tomi notes, that would break notmuch for all current >> users. I suppose I

Re: notmuch-search-get-tags unique candidates

2018-03-23 Thread Jani Nikula
On Wed, Mar 21, 2018 at 11:21 PM, Nicolò Balzarotti wrote: > Hi, I'm using notmuch with emacs and I'm loving it. One thing I don't > like is that in `notmuch-search`, when applying a tag to a selection the > tab completition return multiple copies of the same tag. Example: >

Re: multilingual notmuch (and Content-Language)

2018-03-18 Thread Jani Nikula
On Sun, 18 Mar 2018, Daniel Kahn Gillmor wrote: > * if we know our index expects english, and we have a message part that >*is not* english (e.g. Content-Language: es), we could avoid indexing >that part. Why would we do that? Search mostly works just fine for

Re: [PATCH] notmuch-mutt: use --format=text0 and xargs -0

2018-02-27 Thread Jani Nikula
On Tue, 27 Feb 2018, Jani Nikula <j...@nikula.org> wrote: > notmuch-mutt fails for message files with special characters such as > single quote in their filename. Use notmuch search --format=text0 and > xargs -0 combo to handle them. > > Reported and tested by "dob1

[PATCH] notmuch-mutt: use --format=text0 and xargs -0

2018-02-27 Thread Jani Nikula
notmuch-mutt fails for message files with special characters such as single quote in their filename. Use notmuch search --format=text0 and xargs -0 combo to handle them. Reported and tested by "dob1" on IRC. --- contrib/notmuch-mutt/notmuch-mutt | 4 ++-- 1 file changed, 2 insertions(+), 2

Re:

2018-02-03 Thread Jani Nikula
On Thu, 01 Feb 2018, Matthew Lear wrote: > From: Matthew Lear > To: notmuch@notmuchmail.org > Cc: Matthew Lear > Subject: [PATCH] Update date search syntax. > Date: Thu, 1 Feb 2018 20:52:18 + > Message-Id:

Re: trouble searching with unix timestamps

2018-01-29 Thread Jani Nikula
On Mon, 29 Jan 2018, Matthew Lear wrote: > Hi. I've noticed that I'm unable to notmuch search using date with unix > timestamps (ie number of seconds since Jan 1st 1970 UTC). I get a xapian > error. The notmuch man pages state that searching using > 'date:..' > where "each

Re: [PATCH v3] doc: unify definition list usage across man pages

2017-12-30 Thread Jani Nikula
On Sat, 30 Dec 2017, David Bremner <da...@tethera.net> wrote: > Jani Nikula <j...@nikula.org> writes: > >> Make all parameter descriptions etc. use reStructuredText definition >> lists with uniform style and indentation. Remove redundant indentation >> from

Re: [PATCH] cli: add support for only printing the addresses in notmuch address

2017-12-20 Thread Jani Nikula
On Tue, 19 Dec 2017, Jameson Graef Rollins <jroll...@finestructure.net> wrote: > On Wed, Dec 20 2017, Jani Nikula <j...@nikula.org> wrote: >> ~$ notmuch address --output=sender --output=recipients --output=address >> --output=count id:878tdy8a2q@ligo.

Re: [PATCH] cli: add support for only printing the addresses in notmuch address

2017-12-19 Thread Jani Nikula
On Tue, 19 Dec 2017, Jameson Graef Rollins <jroll...@finestructure.net> wrote: > On Tue, Dec 19 2017, Daniel Kahn Gillmor <d...@fifthhorseman.net> wrote: >> On Tue 2017-12-19 13:23:55 -0800, Jameson Graef Rollins wrote: >>> On Thu, Nov 02 2017, Jani Nikula <j...@ni

[PATCH v2] doc: unify definition list usage across man pages

2017-11-11 Thread Jani Nikula
Make all parameter descriptions etc. use reStructuredText definition lists with uniform style and indentation. Remove redundant indentation from around the lists. Remove blank lines between term lines and definition blocks. Use four spaces for indentation. This is almost completely whitespace and

[PATCH] test: expand argument parsing sanity checks

2017-11-11 Thread Jani Nikula
Test the boolean --arg=true and --arg=false formats. --- Extracted from id:20171014131608.17587-1-j...@nikula.org as this makes sense independent of that series. --- test/T410-argument-parsing.sh | 14 ++ 1 file changed, 14 insertions(+) diff --git a/test/T410-argument-parsing.sh

Re: what is the concept of archiving?

2017-11-09 Thread Jani Nikula
On Thu, Nov 9, 2017 at 11:56 AM, Linus Arver wrote: > Unfortunately, I cannot find enough information online about what any of > these functions do, or what the concept of "archiving" means. From > reading some of the sources in notmuch-tree.el I found out that > archiving a

Re: buggy tags

2017-11-09 Thread Jani Nikula
On Thu, Nov 9, 2017 at 12:11 PM, Tom Hirschowitz wrote: > I sometimes mistype some tags, e.g., collaegues instead of colleagues, > etc. Of course, I then replace them with the right version. > > But notmuch keeps track of these wrong tags (as of all others) and >

Re: Segfault with pkcs7 message

2017-11-03 Thread Jani Nikula
On Fri, Nov 3, 2017 at 11:05 AM, Holger Schurig wrote: > The attached e-mail makes notmuch from git HEAD segfault: > > $ notmuch --version > notmuch 0.25.1+161~g1b91884 > $ notmuch show --decrypt id:86595dab-d486-536b-fe7a-ae3e1dca1...@posteo.de > Warning: Crypto engine

[PATCH] doc: unify definition list usage across man pages

2017-11-02 Thread Jani Nikula
Make all parameter descriptions etc. use reStructuredText definition lists with uniform style and indentation. Remove redundant indentation from around the lists. Remove blank lines between term lines and definition blocks. Use four spaces for indentation. This is almost completely whitespace and

[PATCH] test: test notmuch insert --folder=""

2017-11-02 Thread Jani Nikula
Test insert into top level folder. --- test/T070-insert.sh | 7 +++ 1 file changed, 7 insertions(+) diff --git a/test/T070-insert.sh b/test/T070-insert.sh index f1650e623e35..40519bb2f217 100755 --- a/test/T070-insert.sh +++ b/test/T070-insert.sh @@ -132,6 +132,13 @@ output=$(notmuch search

[PATCH] cli: add support for only printing the addresses in notmuch address

2017-11-02 Thread Jani Nikula
The notmuch address output is much more useful for scripts with just the addresses printed. Support this using the --output=address option. --- completion/notmuch-completion.bash | 2 +- doc/man1/notmuch-address.rst | 7 ++- notmuch-search.c | 7 ++-

[PATCH] test: fix test database backup/restore location

2017-10-24 Thread Jani Nikula
backup_database() and restore_database() used to store the backups in the test specific temporary directory, through the current working directory being there. Commit 8e7fb88237ae ("test: use source and build paths in test-lib-common.sh") started using a test specific backup directories under the

Re: nmbug backtrace due to .mailmap

2017-10-22 Thread Jani Nikula
On Mon, 16 Oct 2017, "W. Trevor King" wrote: > b. Comment out the ‘_insist_committed()’ line in nmbug's ‘pull’ >definition and try again. Make sure you restore the check after >the successful pull. FWIW this fixed it for me, thanks. BR, Jani.

Re: web interface to notmuch

2017-10-21 Thread Jani Nikula
On Thu, 19 Oct 2017, Daniel Kahn Gillmor wrote: > On Thu 2017-10-19 11:01:53 -0400, Brian Sniffen wrote: >> I put together something like this, visible at >> https://github.com/briansniffen/notmuch/tree/nmweb/contrib/notmuch-web >> >> It's not much of a service. I am

[PATCH] NEWS: test suite out-of-tree builds

2017-10-21 Thread Jani Nikula
Out-of-tree builds now work and supersede --root option. --- NEWS | 13 + 1 file changed, 13 insertions(+) diff --git a/NEWS b/NEWS index 3c8198d3ef12..c2ebb6447bd0 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,16 @@ +Notmuch 0.26 (UNRELEASED) += + +Test Suite

Re: [PATCH] test: remove --root option and fix TMP_DIRECTORY cleanup

2017-10-21 Thread Jani Nikula
On Sat, 21 Oct 2017, David Bremner <da...@tethera.net> wrote: > Jani Nikula <j...@nikula.org> writes: > >> The primary motivation here is to fix TMP_DIRECTORY cleanup prior to >> running each test when the current working directory is not the test >> subdirect

[PATCH v2] test: use source path in add_gnupg_home

2017-10-21 Thread Jani Nikula
Make a distinction between source and build directories. --- v2 rebase, add_gnupg_home is now in test-lib.sh --- test/test-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 7926d2787710..5274e6e1cf2c 100644 ---

Re: [PATCH] lib: add support for thread: queries

2017-10-21 Thread Jani Nikula
On Sat, 21 Oct 2017, David Bremner <da...@tethera.net> wrote: > Jani Nikula <j...@nikula.org> writes: > >> On Tue, 17 Oct 2017, David Bremner <da...@tethera.net> wrote: >>> Jani Nikula <j...@nikula.org> writes: >>> >>> The oth

Re: [PATCH] test: remove --root option and fix TMP_DIRECTORY cleanup

2017-10-21 Thread Jani Nikula
On Sat, 21 Oct 2017, Jani Nikula <j...@nikula.org> wrote: > The primary motivation here is to fix TMP_DIRECTORY cleanup prior to > running each test when the current working directory is not the test > subdirectory. Tests with failures would leave their TMP_DIRECTORY >

[PATCH] test: remove --root option and fix TMP_DIRECTORY cleanup

2017-10-21 Thread Jani Nikula
The primary motivation here is to fix TMP_DIRECTORY cleanup prior to running each test when the current working directory is not the test subdirectory. Tests with failures would leave their TMP_DIRECTORY directory behind for debugging, and repeated out-of-tree test runs would have old temp

Re: [PATCH] lib: add support for thread: queries

2017-10-21 Thread Jani Nikula
On Tue, 17 Oct 2017, David Bremner <da...@tethera.net> wrote: > Jani Nikula <j...@nikula.org> writes: > > >> +if (strchr (thread.c_str (), '@')) >> +notmuch_database_find_message (notmuch, thread.c_str (), ); >> + >> +if (message) { >

nmbug backtrace due to .mailmap

2017-10-16 Thread Jani Nikula
Presumably because of the .mailmap added in nmbug repository: commit 5ea99ebcb7d188003bf4854b566f6d21721f5ea1 Author: W. Trevor King Date: Mon Oct 16 10:46:27 2017 -0700 .mailmap: Consolidate David and Tomi's author names The format is documented in

[PATCH] lib: add support for thread: queries

2017-10-16 Thread Jani Nikula
*notmuch->query_parser, notmuch))->release (); diff --git a/lib/thread-fp.cc b/lib/thread-fp.cc new file mode 100644 index ..f15aabba18c0 --- /dev/null +++ b/lib/thread-fp.cc @@ -0,0 +1,53 @@ +/* thread-fp.cc - "thread:" field processor glue

[PATCH] cli/crypto: fix segfault on failed gmime2 crypto context creation

2017-10-16 Thread Jani Nikula
Commit 1fdc08d0ffab ("cli/crypto: treat failure to create a crypto context as fatal.") started treating crypto context creation failures "as fatal", returning NULL from _mime_node_create(). Unfortunately, we do not have NULL checks for _mime_node_create() failures. The only caller,

Re: [PATCH 1/3] cli: add support for --no- prefixed boolean and keyword flag arguments

2017-10-14 Thread Jani Nikula
On Sat, 14 Oct 2017, William Casarin <j...@jb55.com> wrote: > Hey Jani, > > Patches look good so far, concept ack for sure. > > > Jani Nikula <j...@nikula.org> writes: > >> For example, you can use --no-exclude instead of --exclude=false in >> n

[PATCH] cli: make notmuch count --exclude a boolean argument

2017-10-14 Thread Jani Nikula
Commit 0f314c0c99be ("cli: convert notmuch_bool_t to stdbool") over-eagerly converted EXCLUDE_TRUE and EXCLUDE_FALSE to EXCLUDE_true and EXCLUDE_false in notmuch-count.c. We could just fix the case back, but convert the option to an actual boolean argument instead. We've used a keyword argument

[PATCH 2/3] cli: use the negating boolean support for new and insert --no-hooks

2017-10-14 Thread Jani Nikula
This lets us use the positive hooks variable in code, increasing clarity. --- notmuch-insert.c | 6 +++--- notmuch-new.c| 8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index 32be74193472..6878313e188f 100644 ---

[PATCH 2/2] test: test regexp based new.ignore

2017-10-14 Thread Jani Nikula
Just some basics. --- test/T050-new.sh | 22 ++ 1 file changed, 22 insertions(+) diff --git a/test/T050-new.sh b/test/T050-new.sh index 272ed417aa2e..ee9ce08c8e86 100755 --- a/test/T050-new.sh +++ b/test/T050-new.sh @@ -259,6 +259,28 @@ ln -s i_do_not_exist

[PATCH 3/3] test: expand argument parsing sanity checks

2017-10-14 Thread Jani Nikula
Test the various boolean formats and --no- prefixed boolean and keyword flag arguments. --- test/T410-argument-parsing.sh | 28 1 file changed, 28 insertions(+) diff --git a/test/T410-argument-parsing.sh b/test/T410-argument-parsing.sh index

[PATCH 1/2] cli/new: support // in new.ignore

2017-10-14 Thread Jani Nikula
Add support for using // style regular expressions in new.ignore, mixed with the old style verbatim file and directory basenames. The regex is matched against the relative path from the database path. --- doc/man1/notmuch-config.rst | 21 +-- notmuch-new.c | 134

[PATCH 1/3] cli: add support for --no- prefixed boolean and keyword flag arguments

2017-10-14 Thread Jani Nikula
Add transparent support for negating boolean and keyword flag arguments using --no-argument style on the command line. That is, if the option description contains a boolean or a keyword flag argument named "argument", --no-argument will match and negate it. For boolean arguments this obviously

[PATCH] cli: allow empty strings for notmuch insert --folder argument

2017-10-14 Thread Jani Nikula
Now that it's easy to add argument specific modifiers in opt descriptions, add a new .allow_empty field to allow empty strings for individual string arguments while retaining strict checks elsewhere. Use this for notmuch insert --folder, where the empty string means top level folder. --- This

Re: [PATCH 0/3] nmbug:

2017-10-14 Thread Jani Nikula
On Tue, 10 Oct 2017, "W. Trevor King" wrote: > I expect the best time to make that bump is just before we cut our > next notmuch release. Once we do, we can update the wiki page [1] to > suggest nmbug 0.3+ and remove the checkout step from “Getting > started”. Could we add a

Re: [bug] [emacs] notmuch-show: names not shown on some mailing lists

2017-10-14 Thread Jani Nikula
On Tue, 10 Oct 2017, William Casarin wrote: > Hey there, > > Here's something I've noticed in some mailing list threads in notmuch-show: > > https://jb55.com/s/81d7c740ef60984d.png > > It doesn't look like it is showing the correct name. > Looking at the raw message, the From

Re: [PATCH v2 04/10] index: implement notmuch_indexopts_t with try_decrypt

2017-10-14 Thread Jani Nikula
On Mon, 09 Oct 2017, Daniel Kahn Gillmor <d...@fifthhorseman.net> wrote: > On Sat 2017-09-23 19:10:18 +0300, Jani Nikula wrote: >>> --- a/lib/indexopts.c >>> +++ b/lib/indexopts.c >>> @@ -21,9 +21,27 @@ >>> #include "

[PATCH 2/2] lib: convert notmuch_bool_t to stdbool internally

2017-10-07 Thread Jani Nikula
C99 stdbool turned 18 this year. There really is no reason to use our own, except in the library interface for backward compatibility. Convert the lib internally to stdbool. --- lib/add-message.cc | 12 +- lib/built-with.c| 2 +- lib/config.cc | 10

[PATCH 1/2] cli: convert notmuch_bool_t to stdbool

2017-10-07 Thread Jani Nikula
C99 stdbool turned 18 this year. There really is no reason to use our own, except in the library interface for backward compatibility. Convert the cli and test binaries to stdbool. --- command-line-arguments.c | 58 +++ command-line-arguments.h | 10 ---

[PATCH v2 0/2] cli: support regex in new.ignore

2017-10-06 Thread Jani Nikula
The rest of the patches from id:cover.1504280923.git.j...@nikula.org with review addressed. Be more strict about parsing new.ignore, and give sensible error messages on failures. Also improve the text in man page a bit. BR, Jani. Jani Nikula (2): cli/new: support // in new.ignore test: test

[PATCH v2 1/2] cli/new: support // in new.ignore

2017-10-06 Thread Jani Nikula
Add support for using // style regular expressions in new.ignore, mixed with the old style verbatim file and directory basenames. The regex is matched against the relative path from the database path. --- doc/man1/notmuch-config.rst | 21 +-- notmuch-new.c | 134

[PATCH v2 2/2] test: test regexp based new.ignore

2017-10-06 Thread Jani Nikula
Just some basics. --- test/T050-new.sh | 22 ++ 1 file changed, 22 insertions(+) diff --git a/test/T050-new.sh b/test/T050-new.sh index 272ed417aa2e..ee9ce08c8e86 100755 --- a/test/T050-new.sh +++ b/test/T050-new.sh @@ -259,6 +259,28 @@ ln -s i_do_not_exist

Re: notmuch-emacs: Fcc to top-level directory given by database.path

2017-10-02 Thread Jani Nikula
On Sat, 30 Sep 2017, Jani Nikula <j...@nikula.org> wrote: > On Sat, 23 Sep 2017, David Bremner <da...@tethera.net> wrote: >> Do you happen to know if it calls with an empty string as the folder >> name? It would be consistent with searching for that to insert at th

[PATCH] cli: allow empty strings for notmuch insert --folder argument

2017-10-02 Thread Jani Nikula
Now that it's easy to add argument specific modifiers in opt descriptions, add a new .allow_empty field to allow empty strings for individual string arguments while retaining strict checks elsewhere. Use this for notmuch insert --folder, where the empty string means top level folder. --- This

Re: notmuch-emacs: Fcc to top-level directory given by database.path

2017-10-02 Thread Jani Nikula
On Mon, 02 Oct 2017, Arun Isaac wrote: > Mark Walters writes: > >> Incidentally, I think "/" is an alternative for the fcc line which >> already works, which is "\"/\" in notmuch-fcc-dirs. > > Perhaps, notmuch should be made to tolerate a

Re: [PATCH v2 13/15] cli: add support for --no- prefixed boolean and keyword flag arguments

2017-10-02 Thread Jani Nikula
On Sun, 01 Oct 2017, William Casarin <j...@jb55.com> wrote: > Jani Nikula <j...@nikula.org> writes: > >> @@ -171,11 +186,22 @@ parse_option (int argc, char **argv, const >> notmuch_opt_desc_t *options, int opt_ >> if (! try->name) >>

Re: [PATCH] cli: use designated initializers for opt desc

2017-10-01 Thread Jani Nikula
On Sun, 01 Oct 2017, Tomi Ollila <tomi.oll...@iki.fi> wrote: > On Sun, Oct 01 2017, Jani Nikula wrote: > >> On Sun, 01 Oct 2017, Tomi Ollila <tomi.oll...@iki.fi> wrote: >>> >>> Good stuff. It just doesn't longer compile on older compilers (so some

[PATCH v2 10/15] cli: refactor boolean argument processing

2017-10-01 Thread Jani Nikula
Clean up the control flow to prepare for future changes. No functional changes. --- command-line-arguments.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/command-line-arguments.c b/command-line-arguments.c index 39940d5fb9fd..ee8be18942d0

[PATCH v2 15/15] test: expand argument parsing sanity checks

2017-10-01 Thread Jani Nikula
Test the various boolean formats and --no- prefixed boolean and keyword flag arguments. --- test/T410-argument-parsing.sh | 28 1 file changed, 28 insertions(+) diff --git a/test/T410-argument-parsing.sh b/test/T410-argument-parsing.sh index

[PATCH v2 04/15] test: add opt_inherit to arg-test

2017-10-01 Thread Jani Nikula
Just split the arguments to two opt desc arrays. --- test/arg-test.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/test/arg-test.c b/test/arg-test.c index 9d13618bd17c..a379f23e308a 100644 --- a/test/arg-test.c +++ b/test/arg-test.c @@ -14,18 +14,23 @@ int

[PATCH v2 07/15] cli: use the arg parser .present feature to handle show --entire-thread

2017-10-01 Thread Jani Nikula
The --entire-thread default depends on other arguments, so we'll have to figure out if it was explicitly set by the user or not. The arg parser .present feature helps us clean up the code here. --- notmuch-show.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff

[PATCH v2 09/15] cli: use notmuch_bool_t for boolean argument in show

2017-10-01 Thread Jani Nikula
Pedantically correct, although they're the same underlying type. --- notmuch-show.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notmuch-show.c b/notmuch-show.c index d0e86f412e80..3d11a40c6a59 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -1085,7 +1085,7 @@

[PATCH v2 11/15] cli: change while to for in keyword argument processing

2017-10-01 Thread Jani Nikula
Using a for loop makes it easier to use continue, in preparation for future changes. No functional changes. --- command-line-arguments.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/command-line-arguments.c b/command-line-arguments.c index ee8be18942d0..c591dcbec7cc

[PATCH v2 13/15] cli: add support for --no- prefixed boolean and keyword flag arguments

2017-10-01 Thread Jani Nikula
Add transparent support for negating boolean and keyword flag arguments using --no-argument style on the command line. That is, if the option description contains a boolean or a keyword flag argument named "argument", --no-argument will match and negate it. For boolean arguments this obviously

[PATCH v2 14/15] cli: use the negating boolean support for new and insert --no-hooks

2017-10-01 Thread Jani Nikula
This lets us use the positive hooks variable in code, increasing clarity. --- notmuch-insert.c | 6 +++--- notmuch-new.c| 8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index bbbc29ea103d..7048e8ae2d7f 100644 ---

Re: [PATCH 0/9] argument parsing fixes and improvements

2017-10-01 Thread Jani Nikula
On Sun, 01 Oct 2017, David Bremner <da...@tethera.net> wrote: > Jani Nikula <j...@nikula.org> writes: >> id:20170930213239.15392-1-j...@nikula.org would make it easier to add, >> say, a notmuch_bool_t *present field to notmuch_opt_desc_t that we could >> set whene

[PATCH v2 12/15] cli: reduce indent in keyword argument processing

2017-10-01 Thread Jani Nikula
Reducing indent makes future changes easier. No functional changes. --- command-line-arguments.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/command-line-arguments.c b/command-line-arguments.c index c591dcbec7cc..3fa8d9044966 100644 ---

[PATCH v2 06/15] test: expand argument parsing tests

2017-10-01 Thread Jani Nikula
Test and use the new .present field, only output the parameters given. Test space between parameter name and value. --- test/T410-argument-parsing.sh | 22 ++ test/arg-test.c | 33 ++--- 2 files changed, 40 insertions(+), 15

[PATCH v2 08/15] hex-xcode: use notmuch_bool_t for boolean arguments

2017-10-01 Thread Jani Nikula
Pedantically correct, although they're the same underlying type. --- test/hex-xcode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/hex-xcode.c b/test/hex-xcode.c index bc2df713b2a3..221ccdb90843 100644 --- a/test/hex-xcode.c +++ b/test/hex-xcode.c @@ -45,7 +45,7 @@

[PATCH v2 05/15] cli: add .present field to opt desc to check if the arg was present

2017-10-01 Thread Jani Nikula
Add pointer to boolean .present field to opt desc, which (if non-NULL) will be set to TRUE if the argument in question is present on the command line. Unchanged otherwise. --- command-line-arguments.c | 11 --- command-line-arguments.h | 3 +++ 2 files changed, 11 insertions(+), 3

[PATCH v2 03/15] test: add boolean argument to arg-test

2017-10-01 Thread Jani Nikula
Surprisingly it's not there. --- test/T410-argument-parsing.sh | 3 ++- test/arg-test.c | 5 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/T410-argument-parsing.sh b/test/T410-argument-parsing.sh index fad134e305c5..4505c58301ea 100755 ---

[PATCH v2 01/15] cli: strip trailing "/" from the final maildir path in notmuch insert

2017-10-01 Thread Jani Nikula
Several subtle interconnected changes here: - If the folder name passed as argument is the empty string "" or slash "/", the final maildir path would end up having "//" in it. We should strip the final maildir path, not folder. - The folder variable should really be const char *, another

[PATCH v2 02/15] cli: use designated initializers for opt desc

2017-10-01 Thread Jani Nikula
Several changes at once, just to not have to change the same lines several times over: - Use designated initializers to initialize opt desc arrays. - Only initialize the needed fields. - Remove arg_id (short options) as unused. - Replace opt_type and output_var with several type safe output

[PATCH v2 00/15] cli: argument parsing changes

2017-10-01 Thread Jani Nikula
in patch 2, and patches 5-7 add support for the .present field to opt desc discussed in id:87lgkvrhpa@nikula.org. Some more tests are sprinkled here and there too. BR, Jani. Jani Nikula (15): cli: strip trailing "/" from the final maildir path in notmuch insert cli: use

Re: [PATCH] cli: use designated initializers for opt desc

2017-10-01 Thread Jani Nikula
On Sun, 01 Oct 2017, Tomi Ollila <tomi.oll...@iki.fi> wrote: > On Sun, Oct 01 2017, Jani Nikula wrote: > >> Several changes at once, just to not have to change the same lines >> several times over: >> >> - Use designated initializers to initialize opt

Re: [PATCH 0/9] argument parsing fixes and improvements

2017-09-30 Thread Jani Nikula
On Sat, 30 Sep 2017, Jani Nikula <j...@nikula.org> wrote: > Looking at the defaults from another angle, if we don't want the ability > to set --foo=default explicitly, I still think passing ints as booleans > to the argument parser and checking if a boolean is neither true nor >

[PATCH] cli: use designated initializers for opt desc

2017-09-30 Thread Jani Nikula
Several changes at once, just to not have to change the same lines several times over: - Use designated initializers to initialize opt desc arrays. - Only initialize the needed fields. - Remove arg_id (short options) as unused. - Replace opt_type and output_var with several type safe output

Re: [PATCH 0/6] Sort by from and subject

2017-09-30 Thread Jani Nikula
On Sat, 30 Sep 2017, William Casarin <j...@jb55.com> wrote: > Jani Nikula <j...@nikula.org> writes: > >> I think there are two considerations here: >> >> First, is this something we want to have? Is this generally useful? > > Sorting by from and su

  1   2   3   4   5   6   7   8   9   10   >