Re: [RFC 3/5] lib: remove commented out NOTMUCH_DEPRECATED()

2021-10-13 Thread Jani Nikula
On Wed, 13 Oct 2021, David Bremner wrote: > Jani Nikula writes: > >> Having comments between the documentation comment and the object being >> documented throws Hawkmoth off. Remove the placeholder >> NOTMUCH_DEPRECATED() comments. >> >> --- >> >&

Re: [RFC 2/5] lib: remove enum names from typedefs

2021-10-13 Thread Jani Nikula
On Wed, 13 Oct 2021, Tomi Ollila wrote: > On Wed, Oct 13 2021, David Bremner wrote: > >> Jani Nikula writes: >> >>> Given the named enum typedef: >>> >>> typedef enum _name_t { ... } name_t; >>> >>> Hawkmoth uses _name_

[PATCH] lib: fix commented out NOTMUCH_DEPRECATED()

2021-10-13 Thread Jani Nikula
Remove the comment markers from the placeholder NOTMUCH_DEPRECATED(), added in commit e5f3c3ed5024 ("lib: add stub for notmuch_database_open_with_config"). --- This does lead to deprecation warnings now. --- lib/notmuch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 2/2] cli: remove enum names from typedefs

2021-10-13 Thread Jani Nikula
There are some enum typedefs with the enum name: typedef enum _name_t { ... } name_t; We don't need or use the enum names _name_t for anything, and not all of the enum typedefs have them. We have the typedefs specifically to use the typedef name. Use the anonymous enum in the typedefs:

[PATCH 1/2] lib: remove enum names from typedefs

2021-10-13 Thread Jani Nikula
There are some enum typedefs with the enum name: typedef enum _name_t { ... } name_t; We don't need or use the enum names _name_t for anything, and not all of the enum typedefs have them. We have the typedefs specifically to use the typedef name. Use the anonymous enum in the typedefs:

Re: [RFC 0/5] doc: api docs overhaul

2021-10-13 Thread Jani Nikula
On Wed, 13 Oct 2021, David Bremner wrote: > Jani Nikula writes: > >> The main downside is that Hawkmoth is not available via distro >> packaging, only PyPI. > > I guess another issue is the new dependency on Clang + > bindings. Although maybe that's a fair trade for

Re: [RFC 1/5] doc: replace doxygen with hawkmoth sphinx extension for api docs

2021-10-13 Thread Jani Nikula
On Wed, 13 Oct 2021, Tomi Ollila wrote: > Interesting stuff... > > On Tue, Oct 12 2021, Jani Nikula wrote: > >> Hawkmoth is a Sphinx extension for incorporating documentation >> comments from C source to Sphinx. For Notmuch API documentation needs, >> Doxygen

[RFC 5/5] lib: documentation comment overhaul for hawkmoth

2021-10-12 Thread Jani Nikula
Convert from Doxygen to Hawkmoth, and improve while at it. - Use rst :param: field lists for parameters. - Use :deprecated: and :since:. - Cross-reference all constructs. - Use preformatted text for TRUE, FALSE, NULL, parameter references, etc. Comment changes only. --- lib/notmuch.h |

[RFC 4/5] lib: remove #ifndef __DOXYGEN__ conditions

2021-10-12 Thread Jani Nikula
These are now unnecessary. Hawkmoth does not require similar constructs. --- lib/notmuch.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index abbc5ace9d1b..700e9b7b25c1 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -29,8 +29,6 @@ #ifndef NOTMUCH_H

[RFC 3/5] lib: remove commented out NOTMUCH_DEPRECATED()

2021-10-12 Thread Jani Nikula
Having comments between the documentation comment and the object being documented throws Hawkmoth off. Remove the placeholder NOTMUCH_DEPRECATED() comments. --- They were added in commit e5f3c3ed5024 ("lib: add stub for notmuch_database_open_with_config"); maybe the comment markers should be

[RFC 2/5] lib: remove enum names from typedefs

2021-10-12 Thread Jani Nikula
Given the named enum typedef: typedef enum _name_t { ... } name_t; Hawkmoth uses _name_t as the name for documentation. Typedef the anonymous enum: typedef enum { ... } name_t; instead to use name_t. We don't really need the enum names for anything, and not all of the enum typedefs

[RFC 1/5] doc: replace doxygen with hawkmoth sphinx extension for api docs

2021-10-12 Thread Jani Nikula
Hawkmoth is a Sphinx extension for incorporating documentation comments from C source to Sphinx. For Notmuch API documentation needs, Doxygen is overkill, and Hawkmoth also directly integrates with Sphinx. Hawkmoth is currently not packaged for distros, just PyPI. To try this out on Debian: $

[RFC 0/5] doc: api docs overhaul

2021-10-12 Thread Jani Nikula
, Jani. [1] https://github.com/jnikula/hawkmoth Jani Nikula (5): doc: replace doxygen with hawkmoth sphinx extension for api docs lib: remove enum names from typedefs lib: remove commented out NOTMUCH_DEPRECATED() lib: remove #ifndef __DOXYGEN__ conditions lib: documentation comment

Re: [PATCH 0/5] doc: man page cleanup

2021-05-22 Thread Jani Nikula
On Sat, 22 May 2021, David Bremner wrote: > Jani Nikula writes: >> On Sat, 22 May 2021, David Bremner wrote: >> I was wondering about that myself. Should I respin with that? >> > > Either that or an addon to the series, whatever is easiest. If I get to choose, I

Re: [PATCH 0/5] doc: man page cleanup

2021-05-22 Thread Jani Nikula
On Sat, 22 May 2021, David Bremner wrote: > Jani Nikula writes: > >> I saw [1] and decided to give it some love. :) >> >> Mostly this is all about adding html cross-references all over the place >> while trying to keep the roff man pages roughly the same. Als

[PATCH 4/5] doc: use program and option directives to document options

2021-05-21 Thread Jani Nikula
Use the program and option directives to document the subcommand options. This unifies a lot of option documentation throughout. This also makes it possible to reference options with :option:`--foo` (within .. program::) or :option:`subcommand --foo` (globally). This is left for later work. See

[PATCH 5/5] doc: example command-line option reference

2021-05-21 Thread Jani Nikula
Example reference to a command-line option using the option role reference. This creates a hyperlink in html, and the usual boldface style in man page. This could be used throughout the man pages. --- doc/man1/notmuch-config.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 3/5] doc: use envvar directive and role for environment variables

2021-05-21 Thread Jani Nikula
Make man1/notmuch.rst the single point of truth for describing notmuch environment variables. Use the envvar directive for that, and reference them with the envvar role. Drive-by cleanup configuration file and hook directory search order documentation. --- doc/man1/notmuch-compact.rst | 10

[PATCH 2/5] doc: cross-reference notmuch man pages with actual links

2021-05-21 Thread Jani Nikula
Add internal hyperlink targets for man pages and cross-reference them using the any role reference. There are a number of alternatives to accomplish this, but this seems like the combination that retains the man page section number and the same boldface style in the man pages. As a bonus, we get

[PATCH 1/5] doc: use manpage role references to external man pages

2021-05-21 Thread Jani Nikula
Using manpage role references generates helpful links in html documentation, while retaining the same boldface style in the man pages. The external man page site is configurable. The Debian manpage site seems like a good fit for Notmuch. --- doc/conf.py | 5 +

[PATCH 0/5] doc: man page cleanup

2021-05-21 Thread Jani Nikula
/latest/ Jani Nikula (5): doc: use manpage role references to external man pages doc: cross-reference notmuch man pages with actual links doc: use envvar directive and role for environment variables doc: use program and option directives to document options doc: example command-line

[PATCH] emacs: update default mailing list archives for stashing links

2021-05-21 Thread Jani Nikula
Gmane web interface is long gone, remove it. Make MARC the new default. Update LKML to Lore, where it already redirects anyway. Also add Notmuch web archive. --- Note: I observed M-x customize-variable RET notmuch-show-stash-mlarchive-link-default RET does not take user customized

Re: [PATCH] doc: fix man page build for Sphinx 4.x

2021-05-18 Thread Jani Nikula
On Tue, 18 May 2021, David Bremner wrote: > Jani Nikula writes: > >> >> The Sphinx documentation on this [1] is confusing, and has the change >> backwards. Git history says the default changed from False to True. >> >> [1] >> https://www.sphinx-doc.org/

[PATCH] doc: fix man page build for Sphinx 4.x

2021-05-18 Thread Jani Nikula
Sphinx 4.0 changed the default value of man_make_section_directory from False to True. We create the section directories and move the files manually, so fix the immediate man build failure by disabling the feature. The Sphinx documentation on this [1] is confusing, and has the change backwards.

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

  1   2   3   4   5   6   7   8   9   10   >