v3 of postpone patches

2016-11-05 Thread David Bremner
This obsoletes, and hopefully doesn't break id:1478196548-19596-1-git-send-email-markwalters1...@gmail.com Compared to Mark's original patches I added the check for encryption tags discussed in that thread, and split the draft stuff to it's own file. I have to admit I (or someone else)

[Patch v3 2/2] emacs: postpone/resume support

2016-11-05 Thread David Bremner
From: Mark Walters This provides preliminary support for postponing and resuming in the emacs frontend. On postponing it uses notmuch insert to put the message in the notmuch database; resume gets the raw file from notmuch and using the emacs function mime-to-mml

[PATCH] notmuch-config: replace config reading function

2016-11-05 Thread Ioan-Adrian Ratiu
Config files are currently read using glib's g_key_file_load_from_file function which is very inconvenient because it's limited by design to read only from "regular data files" in a filesystem. Because of this limitation notmuch can't read configs from pipes, fifos, sockets, stdin, etc. Not even

[PATCH 9/9] build: only install known man pages

2016-11-05 Thread Jani Nikula
Install man pages based on $(MAN_GZIP_FILES), which directly corresponds to the man page source rst files. This way we can filter the man pages to be installed as needed. --- doc/Makefile.local | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/Makefile.local

[PATCH 8/9] build: generate man page list from source files, not conf.py

2016-11-05 Thread Jani Nikula
Use $(wildcard ...) to generate the list of man pages based on the rst source files present in the man page directories, instead of reading conf.py. This has three main benefits: 1) This makes the man page build slightly less complicated and easier to understand. At least there are fewer

[PATCH 7/9] build: do not touch roff files after sphinx-build

2016-11-05 Thread Jani Nikula
If Sphinx fails to create any of the roff files, having touch create them hides the errors until someone realizes, possibly much later, that the resulting files are empty. (Note that gzip doesn't fail on empty input files.) Sphinx will change the timestamps of any files it has written anyway. ---

[PATCH 6/9] doc: fix references in notmuch-emacs.rst

2016-11-05 Thread Jani Nikula
Fix make sphinx-texinfo warnings: WARNING: undefined label: notmuch-jump (if the link has no caption the label must precede a section header) WARNING: undefined label: notmuch-saved-searches (if the link has no caption the label must precede a section header) --- doc/notmuch-emacs.rst | 4 +++-

[PATCH 5/9] doc/conf.py: include command name in texinfo document title

2016-11-05 Thread Jani Nikula
Seems to make more sense than to have the same title for everything. --- doc/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index f8da1a422f9a..b6cfa1aa3499 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -132,7 +132,7 @@ man_pages = [

[PATCH 1/9] doc/conf.py: add notmuch-emacs-mua to texinfo documents

2016-11-05 Thread Jani Nikula
This was overlooked when adding the man page. --- doc/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index 8b9329662bf0..fce5a3afdfc2 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -153,6 +153,9 @@ texinfo_documents = [

[PATCH 3/9] doc/conf.py: abstract notmuch authors

2016-11-05 Thread Jani Nikula
Don't repeat the same stuff so much. We probably don't want to track individual authors for man/texinfo pages anyway. No user visible changes. --- doc/conf.py | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/doc/conf.py b/doc/conf.py

[PATCH 2/9] doc/conf.py: generate texinfo_documents list from man_pages list

2016-11-05 Thread Jani Nikula
No need to repeat mostly the same information twice in conf.py. We probably want to have a corresponding texinfo document for all the man pages. Python list comprehension to the rescue. (The reverse is not true; we have a texinfo document for notmuch-emacs we don't want as a man page.) There

[PATCH 0/9] doc: config and build improvements

2016-11-05 Thread Jani Nikula
Here's a bunch of fixes to the documentation config and build. BR, Jani. Jani Nikula (9): doc/conf.py: add notmuch-emacs-mua to texinfo documents doc/conf.py: generate texinfo_documents list from man_pages list doc/conf.py: abstract notmuch authors doc/conf.py: reindent, whitespace

Re: [PATCH] cli: consider files vanishing during notmuch new non-fatal

2016-11-05 Thread Paul Wise
On Sat, 2016-11-05 at 14:57 +0200, Jani Nikula wrote: > Add a new exit code for when files vanished, so the caller has a > chance to detect the race and re-run notmuch new to recover. I don't think this is the right approach for two reasons: The exit code you have chosen is still a failure so I

Re: [Paul Wise] Bug#843127: notmuch: race condition in `notmuch new`?

2016-11-05 Thread Paul Wise
On Fri, 2016-11-04 at 20:47 +0200, Jani Nikula wrote: > Do you have some other software modifying your mail store while > you're running notmuch new? The folder in question has my laptop's exim4 service writing to it when my cron jobs generate email. On Fri, 2016-11-04 at 13:26 -0300, David

[PATCH] cli: consider files vanishing during notmuch new non-fatal

2016-11-05 Thread Jani Nikula
If some software other than notmuch new renames or removes files during the notmuch new scan (specifically after scandir but before indexing the file), keep going instead of bailing out. Failing to index the file is just a race condition between notmuch and the other software; the rename could

Re: [PATCH] emacs: add check for encryption before saving.

2016-11-05 Thread Mark Walters
On Sat, 05 Nov 2016, David Bremner wrote: > Mark Walters writes: > >> >> I think this is an excellent thing to add. I agree that false positives >> aren't much of a worry. If someone bumps into them a lot then they can >> complain or come up with a

Re: [PATCH] emacs: add check for encryption before saving.

2016-11-05 Thread David Bremner
Mark Walters writes: > > I think this is an excellent thing to add. I agree that false positives > aren't much of a worry. If someone bumps into them a lot then they can > complain or come up with a better regex. > Should the regex also be a defcustom? d

Re: [PATCH] emacs: add check for encryption before saving.

2016-11-05 Thread Mark Walters
On Sat, 05 Nov 2016, David Bremner wrote: > This is intended to decrease the chance of people ending up with a bunch > of plaintext drafts of encrypted messages without knowing it. > > The check is intentionally overcautious; I think the false positive of > misplaced #secure