[PATCH 4/9] cli/show: use a table for choosing the formatter

2017-01-06 Thread Jani Nikula
Continue detangling format pointer and format selection variables. No functional changes. --- notmuch-show.c | 36 +++- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index b8e45f187360..93b51008381c 100644 --- a/notm

[PATCH 5/9] cli/show: rename format_sel to simply format

2017-01-06 Thread Jani Nikula
Now that the format pointer is a temporary variable, and named formatter, shorten format_sel to format. No functional changes. --- notmuch-show.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 93b51008381c..10326

[PATCH 6/9] cli/show: group --entire-thread option handling into one place

2017-01-06 Thread Jani Nikula
The --entire-thread option handling is split around, making the logic harder to follow than necessary. Put it in one place. While at it, make the true/false values match notmuch_bool_t values for simplicity. No functional changes. --- notmuch-show.c | 17 +++-- 1 file changed, 7 insert

[PATCH 0/9] cli/show: refactoring and cleanup

2017-01-06 Thread Jani Nikula
I was planning on adding mime structure printing to notmuch show, not unlike devel/printmimestructure, but notmuch-show was in need of some cleanup first. Here goes. BR, Jani. Jani Nikula (9): cli/show: detangle overloading of params.part for single message display cli/show: remove

[PATCH 2/9] cli/show: remove unused raw member from show parameters struct

2017-01-06 Thread Jani Nikula
The raw member has been unused since b1130bc71c02 ("show: Convert raw format to the new self-recursive style, properly support interior parts"). Good riddance. No functional changes. --- notmuch-client.h | 1 - notmuch-show.c | 1 - 2 files changed, 2 deletions(-) diff --git a/notmuch-client.h

[PATCH 1/9] cli/show: detangle overloading of params.part for single message display

2017-01-06 Thread Jani Nikula
The use of params.part has become rather convoluted in notmuch show. Add another variable for selecting single message display to make the code easier to read. No functional changes. --- notmuch-show.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/notmuch-show.

[PATCH 3/9] cli/show: consistently use format_sel for checking the format

2017-01-06 Thread Jani Nikula
The mixed use of the format pointer and the format selection variables is confusing. Add more clarity by using format_sel alone. No functional changes. --- notmuch-show.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 273b5d3ba3ac..b

[BUG] notmuch-emacs highlights '>' quoted wrapped lines incorrectly

2017-01-05 Thread Jani Nikula
When the show view in notmuch-emacs highlights quoted text, any long, folded lines in quotes prefixed using '>' fail to be highlighted. Quotes prefixed using '> ' work fine. See below. BR, Jani. Quoting using '> ' works fine: > Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiu

[PATCH] cli: don't call _entry_in_ignore_list twice in count files debug

2016-12-17 Thread Jani Nikula
Split file ignores in count_files to fixed and user configured in order to not have to call _entry_in_ignore_list twice when debugging is enabled. Minor detail. --- notmuch-new.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c i

[PATCH] lib/database: reduce try block scope to things that really need it

2016-12-17 Thread Jani Nikula
No need to maintain the pure C stuff within a try block, it's arguably confusing. This also reduces indent for a bunch of code. No functional changes. --- lib/database.cc | 80 - 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a

[PATCH 1/2] cli/config: allocate config using talloc_zero

2016-12-17 Thread Jani Nikula
Do not initialize each field separately. It's more robust to allocate the config with zero initialization, and only set the non-zero defaults individually. --- notmuch-config.c | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/notmuch-config.c b/notmuch-conf

[PATCH 2/2] cli/config: rename name to key in _config_set_list

2016-12-17 Thread Jani Nikula
The other getters and setters speak of key, follow suit. No functional changes. --- notmuch-config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notmuch-config.c b/notmuch-config.c index 6d50be4c3150..b202bb1e2299 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@

[PATCH] lib: fix the todo comment placement on NOTMUCH_STATUS_XAPIAN_EXCEPTION

2016-12-17 Thread Jani Nikula
The todo comment got separated from the status it's related to at commit 3f32fd8a1c06 ("Add missing comment for NOTMUCH_STATUS_READONLY_DATABASE."). Later, commit b65ca8e0ba5e ("lib: modify notmuch.h for automatic document generation") moved it, but to the wrong place. Fix the location. --- lib/no

[PATCH] completion: add bash completion for query: and property:

2016-12-17 Thread Jani Nikula
Add prefix completion for query and property, with value completion for query. Apparently there's no way to get at the available properties in the cli. --- completion/notmuch-completion.bash | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/completion/notmuch-completion.bash

Re: [PATCH v3 2/2] notmuch-config: replace config reading function

2016-12-06 Thread Jani Nikula
On Sun, 04 Dec 2016, Ioan-Adrian Ratiu wrote: > 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 conf

[PATCH v2] test: check the handling of files vanishing between scandir and indexing

2016-11-27 Thread Jani Nikula
Add a file for scandir to find, but use gdb to remove it before it gets indexed. --- v2: Apparently our test setup is clever enough to gracefully handle missing prerequisites, and ignore subtest results. Just make sure we remove the test file also in case gdb isn't there, to not leave garbage beh

[PATCH v3] completion: complete notmuch emacs-mua

2016-11-27 Thread Jani Nikula
With subcommand handling for external commands we can easily complete 'notmuch emacs-mua' using the existing completion system. --- v3: complete --hello option --- completion/notmuch-completion.bash | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --

[PATCH v3] build: update the desktop database after installing the desktop file

2016-11-26 Thread Jani Nikula
This makes the option to choose Notmuch as mailto: handler show up in the desktop environment settings. Ignore errors. --- v3: ignore errors on update-desktop-database. I don't want to skip desktop-file-install if update-desktop-database is not available, and if update fails, it's likely a transi

[PATCH v3] build: install notmuch-emacs-mua.desktop file with emacs

2016-11-26 Thread Jani Nikula
There is really no need to have a separate install target for the desktop file. Just install the desktop file with emacs, with a configure option to opt out. --- v3: check for desktop-file-install in configure. I don't see a reason to differentiate between "with desktop" and "have desktop-file-i

[PATCH] test: check the handling of files vanishing between scandir and indexing

2016-11-26 Thread Jani Nikula
Add a file for scandir to find, but use gdb to remove it before it gets indexed. --- The ugly part is that this should require gdb as external dep... but we shouldn't skip all of T050-new.sh if gdb isn't there. I'm in a hurry, any good ideas? --- test/T050-new.sh | 30 +++

Re: [PATCH] cli/new: document new exit code

2016-11-26 Thread Jani Nikula
On Sat, 26 Nov 2016, David Bremner wrote: > It seems important to give the numeric return code for people writing > scripts. Hopefully deviations from this convention are rare. *blush* As a token of my gratitude, a test for the change follows. I'm not sure if it's quite ready for merging, but th

[PATCH v2 9/9] build: update the desktop database after installing the desktop file

2016-11-21 Thread Jani Nikula
This makes the option to choose Notmuch as mailto: handler show up in the desktop environment settings. --- emacs/Makefile.local | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs/Makefile.local b/emacs/Makefile.local index ffa8421ebd45..de4f40d1316b 100644 --- a/emacs/Makefile.local +++ b/

[PATCH v2 7/9] emacs/desktop: update to use notmuch-emacs-mua and handle mailto

2016-11-21 Thread Jani Nikula
With the mailto: handling in notmuch-emacs-mua, we can update the desktop file to advertize we can be set as the default application to handle email. While at it, add GenericName and Comment to be more informative. With --hello, notmuch-emacs-mua will run (notmuch) if mailto: url is not given. ---

[PATCH v2 8/9] build: install notmuch-emacs-mua.desktop file with emacs

2016-11-21 Thread Jani Nikula
There is really no need to have a separate install target for the desktop file. Just install the desktop file with emacs, with a configure option to opt out. --- configure| 13 + emacs/Makefile.local | 5 ++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git

[PATCH v2 5/9] build: install notmuch-emacs-mua with notmuch-emacs

2016-11-21 Thread Jani Nikula
notmuch-emacs-mua is good enough to be installed with notmuch-emacs. --- emacs/Makefile.local | 4 1 file changed, 4 insertions(+) diff --git a/emacs/Makefile.local b/emacs/Makefile.local index 90a57cca74ed..8ab7b1260924 100644 --- a/emacs/Makefile.local +++ b/emacs/Makefile.local @@ -36,6 +

[PATCH v2 0/9] improvements around notmuch-emacs-mua

2016-11-21 Thread Jani Nikula
v2 of id:cover.1478205331.git.j...@nikula.org, with rebase plus David's concern about .desktop opening mail composition vs. hello screen addressed. BR, Jani. Jani Nikula (9): completion: complete notmuch emacs-mua man: advertize notmuch-emacs-mua as notmuch emacs-mua subcommand

[PATCH v2 1/9] completion: complete notmuch emacs-mua

2016-11-21 Thread Jani Nikula
With subcommand handling for external commands we can easily complete 'notmuch emacs-mua' using the existing completion system. --- completion/notmuch-completion.bash | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/completion/notmuch-completio

[PATCH v2 3/9] emacs: move notmuch-emacs-mua under emacs

2016-11-21 Thread Jani Nikula
While the notmuch-emacs-mua script is a sort of cli command, it is really a part of notmuch-emacs. Move it under the emacs directory. --- notmuch-emacs-mua => emacs/notmuch-emacs-mua | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename notmuch-emacs-mua => emacs/notmuch-emacs-mua (100%) d

[PATCH v2 4/9] notmuch-emacs-mua: add --hello parameter

2016-11-21 Thread Jani Nikula
If the --hello parameter is given, display the notmuch hello buffer instead of the message composition buffer if no message composition parameters are given. Signed-off-by: Jani Nikula --- doc/man1/notmuch-emacs-mua.rst | 4 emacs/notmuch-emacs-mua| 8 +++- 2 files changed, 11

[PATCH v2 2/9] man: advertize notmuch-emacs-mua as notmuch emacs-mua subcommand

2016-11-21 Thread Jani Nikula
With subcommand handling for external commands we can now hide the implementation detail of emacs-mua being a separate notmuch-emacs-mua script. --- doc/man1/notmuch-emacs-mua.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man1/notmuch-emacs-mua.rst b/doc/man1/notm

[PATCH v2 6/9] notmuch.desktop: move under emacs as notmuch-emacs-mua.desktop

2016-11-21 Thread Jani Nikula
The notmuch.desktop file is part of notmuch-emacs. Move it under emacs, and rename as notmuch-emacs-mua.desktop to reflect this. --- Makefile.local | 5 - emacs/Makefile.local | 6 ++ notmuch.desktop => emacs/notmuch-emacs-m

Re: [PATCH 6/8] emacs/desktop: update to use notmuch-emacs-mua and handle mailto

2016-11-21 Thread Jani Nikula
On Mon, 21 Nov 2016, Jani Nikula wrote: > On Mon, 21 Nov 2016, Keith Amidon wrote: >> However, this did not seem to work when I tried it out in my gnome >> session. I'm pretty sure creating two separate desktop files >> (duplicating some of the fields) would work. &g

Re: [PATCH 6/8] emacs/desktop: update to use notmuch-emacs-mua and handle mailto

2016-11-21 Thread Jani Nikula
On Mon, 21 Nov 2016, Keith Amidon wrote: > However, this did not seem to work when I tried it out in my gnome > session. I'm pretty sure creating two separate desktop files > (duplicating some of the fields) would work. I see three options here: 1) Just always go to message composition directly

Re: [PATCH] gzclose_r() and gzclose_w() are not available in older...

2016-11-21 Thread Jani Nikula
On Mon, 21 Nov 2016, Tomi Ollila wrote: > On Mon, Nov 21 2016, David Bremner wrote: > >> I take the submitters word for the first version supporting gzclose > > I tried this patch on Scientific Linux 6.2 -- after applied it I changed > the check to >= 1.2.3 (to the one used in sl62). > > This com

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

2016-11-21 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 happ

Re: [PATCH 6/8] emacs/desktop: update to use notmuch-emacs-mua and handle mailto

2016-11-21 Thread Jani Nikula
On Mon, Nov 21, 2016 at 1:34 PM, David Bremner wrote: > Jani Nikula writes: > >> -Exec=emacs -f notmuch >> +GenericName=Email Client >> +Comment=Emacs based email client >> +Exec=notmuch-emacs-mua %u > > This seems like a fairly substantial change in func

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

2016-11-12 Thread Jani Nikula
On Sat, 12 Nov 2016, Brian Sniffen wrote: >> >> OK, but the patch proposed works both for people who want to be notified >> of this problem, and those that don't (with appropriate shell wrapping >> checking the return code). > > I think it will loop; how do I guarantee termination and indexing

Re: Notmuch dev workflow: applying patches to local trees

2016-11-08 Thread Jani Nikula
On Tue, Nov 8, 2016 at 1:16 AM, Matt Armstrong wrote: > I'm not experienced with managing patches via email on this list, > especially when it comes to applying patches sent out for review and > testing. Is there a documented best practice? Not sure about best practice, but this works for me: M

[PATCH] cli: abstract config file reading to a separate function

2016-11-06 Thread Jani Nikula
Simplify and fix the coding style while at it. --- notmuch-config.c | 65 ++-- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/notmuch-config.c b/notmuch-config.c index e5d42a0cbfd5..bd527901f7b5 100644 --- a/notmuch-config.c +++

Re: [PATCH] notmuch-config: replace config reading function

2016-11-06 Thread Jani Nikula
ere. Please consider this prep patch first. The error handling will be easier to follow. BR, Jani. Jani Nikula (1): cli: abstract config file reading to a separate function notmuch-config.c | 65 ++-- 1 file changed, 35 insertions(+), 3

[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 b/doc/Mak

[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 moving

[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 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 = [ texi

[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 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 = [ ('man1/notmuch-dump','notmuch-dump',

[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 index

[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 shoul

[PATCH 4/9] doc/conf.py: reindent, whitespace clean man page, texinfo lists

2016-11-05 Thread Jani Nikula
No functional changes. --- doc/conf.py | 106 +--- 1 file changed, 52 insertions(+), 54 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 3cec01451f35..f8da1a422f9a 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -55,73 +55,71 @@ htmlh

[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, white

[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 happ

Re: rfc for notmuch remote access script

2016-11-04 Thread Jani Nikula
On Sun, 30 Oct 2016, David Bremner wrote: > I'm not using remote access, and I don't really have opinions about the > best way to do it. I do have 2 concerns about the overall idea > > 1. I worry about the maintenance burden of extra code ./configure > 2. I worry about promoting remote-notmuch for

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

2016-11-04 Thread Jani Nikula
On Fri, 04 Nov 2016, David Bremner wrote: > I wonder if this some kind of race condition in `notmuch new` > processing. Do you have some other software modifying your mail store while you're running notmuch new? BR, Jani. ___ notmuch mailing list notmu

Re: Is there a separate git repo for the notmuch website?

2016-11-04 Thread Jani Nikula
On Fri, 04 Nov 2016, Matt Armstrong wrote: > I noticed that https://notmuchmail.org/emacstips/#index21h2 is stale > (the patch it mentions is now part of notmuch). Is there a git > repository for the website that I can suggest patches against? Please see https://notmuchmail.org/wikiwriteaccess/

[PATCH 5/8] notmuch.desktop: move under emacs as notmuch-emacs-mua.desktop

2016-11-03 Thread Jani Nikula
The notmuch.desktop file is part of notmuch-emacs. Move it under emacs, and rename as notmuch-emacs-mua.desktop to reflect this. --- Makefile.local | 5 - emacs/Makefile.local | 6 ++ notmuch.desktop => emacs/notmuch-emacs-m

[PATCH 8/8] build: update the desktop database after installing the desktop file

2016-11-03 Thread Jani Nikula
This makes the option to choose Notmuch as mailto: handler show up in the desktop environment settings. --- emacs/Makefile.local | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs/Makefile.local b/emacs/Makefile.local index a984023f7840..3192b5a9c3cc 100644 --- a/emacs/Makefile.local +++ b/

[PATCH 7/8] build: install notmuch-emacs-mua.desktop file with emacs

2016-11-03 Thread Jani Nikula
There is really no need to have a separate install target for the desktop file. Just install the desktop file with emacs, with a configure option to opt out. --- configure| 13 + emacs/Makefile.local | 5 ++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git

[PATCH 0/8] improvements around notmuch-emacs-mua

2016-11-03 Thread Jani Nikula
459-5359-1-git-send-email-j...@nikula.org [2] id:1478113767-25875-1-git-send-email-j...@nikula.org [3] id:1478111914-21927-1-git-send-email-j...@nikula.org Jani Nikula (8): completion: complete notmuch emacs-mua man: advertize notmuch-emacs-mua as notmuch emacs-mua subcommand emacs: move notmuch

[PATCH 1/8] completion: complete notmuch emacs-mua

2016-11-03 Thread Jani Nikula
With subcommand handling for external commands we can easily complete 'notmuch emacs-mua' using the existing completion system. --- completion/notmuch-completion.bash | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/completion/notmuch-completio

[PATCH 2/8] man: advertize notmuch-emacs-mua as notmuch emacs-mua subcommand

2016-11-03 Thread Jani Nikula
With subcommand handling for external commands we can now hide the implementation detail of emacs-mua being a separate notmuch-emacs-mua script. --- doc/man1/notmuch-emacs-mua.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man1/notmuch-emacs-mua.rst b/doc/man1/notm

[PATCH 3/8] emacs: move notmuch-emacs-mua under emacs

2016-11-03 Thread Jani Nikula
While the notmuch-emacs-mua script is a sort of cli command, it is really a part of notmuch-emacs. Move it under the emacs directory. --- notmuch-emacs-mua => emacs/notmuch-emacs-mua | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename notmuch-emacs-mua => emacs/notmuch-emacs-mua (100%) d

[PATCH 4/8] build: install notmuch-emacs-mua with notmuch-emacs

2016-11-03 Thread Jani Nikula
notmuch-emacs-mua is good enough to be installed with notmuch-emacs. --- emacs/Makefile.local | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emacs/Makefile.local b/emacs/Makefile.local index 2d6aedbdfd5d..56b9714d91d7 100644 --- a/emacs/Makefile.local +++ b/emacs/Makefile.local @@ -27,6 +2

[PATCH 6/8] emacs/desktop: update to use notmuch-emacs-mua and handle mailto

2016-11-03 Thread Jani Nikula
With the mailto: handling in notmuch-emacs-mua, we can update the desktop file to advertize we can be set as the default application to handle email. While at it, add GenericName and Comment to be more informative. --- emacs/notmuch-emacs-mua.desktop | 5 - 1 file changed, 4 insertions(+), 1 d

[PATCH 2/2] notmuch.desktop: update to use notmuch-emacs-mua and handle mailto

2016-11-02 Thread Jani Nikula
With the mailto: handling in notmuch-emacs-mua, we can update the desktop file to advertize we can be set as the default application to handle email. While at it, add GenericName and Comment to be more informative. --- notmuch.desktop | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH 1/2] build: only install the notmuch desktop file with emacs

2016-11-02 Thread Jani Nikula
The notmuch desktop file execs the emacs interface; no use installing it if notmuch-emacs has not been installed. --- Makefile.local | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.local b/Makefile.local index c60f4e7d4792..7cf694b068a0 100644 --- a/Makefile.local +++ b/Makefile.loc

[PATCH] build: install notmuch-emacs-mua if configured with emacs

2016-11-02 Thread Jani Nikula
notmuch-emacs-mua is good enough to be installed with notmuch-emacs. --- Makefile.local | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.local b/Makefile.local index d1b0585f2866..c60f4e7d4792 100644 --- a/Makefile.local +++ b/Makefile.local @@ -311,6 +311,9 @@ notmuch-shared: $(not

[PATCH v3] completion: complete mimetype: search prefix

2016-11-02 Thread Jani Nikula
Use /etc/mime.types if available, parsed using a sed one-liner, and fall back to a handful of common types otherwise. --- v2: smarter sed thanks to Lucas Hoffmann v3: use Tomi's sed... though I'm not sure what the improvement is... --- completion/notmuch-completion.bash | 32 +++

Re: [PATCH] man: advertize notmuch-emacs-mua as notmuch emacs-mua subcommand

2016-11-02 Thread Jani Nikula
On Wed, 02 Nov 2016, David Bremner wrote: > Jani Nikula writes: > >> With subcommand handling for external commands we can now hide the >> implementation detail of emacs-mua being a separate notmuch-emacs-mua >> script. >> --- >> doc/man1/notmuch-emacs-mu

[PATCH] man: advertize notmuch-emacs-mua as notmuch emacs-mua subcommand

2016-11-02 Thread Jani Nikula
With subcommand handling for external commands we can now hide the implementation detail of emacs-mua being a separate notmuch-emacs-mua script. --- doc/man1/notmuch-emacs-mua.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man1/notmuch-emacs-mua.rst b/doc/man1/notm

Re: rfc for notmuch remote access script

2016-10-30 Thread Jani Nikula
On Sun, Oct 30, 2016 at 2:39 PM, Mark Walters wrote: > The only possible downside I can see with this is if the address for the > notmuch-server varies. For example my router does NAT the address from > inside and outside my home network is different. I don't know if that is > a common setup, and

Re: [PATCH v2] completion: complete mimetype: search prefix

2016-10-30 Thread Jani Nikula
On Tue, 25 Oct 2016, Tomi Ollila wrote: > Jani Nikula writes: > >> Use /etc/mime.types if available, with a homebrew sed parser, and fall >> back to a handful of common types otherwise. > > I'd suggest the following line: > > sed -n '/^[[:alpha:]]/ s

Re: rfc for notmuch remote access script

2016-10-30 Thread Jani Nikula
On Fri, 28 Oct 2016, David Bremner wrote: > Jani Nikula writes: > >> On Thu, Oct 27, 2016 at 8:25 PM, Tomi Ollila wrote: >>> j4ni on irc expressed interest of having an installation option for >>> notmuch-emacs and a notmuch remote access script as 'notmuch

Re: rfc for notmuch remote access script

2016-10-27 Thread Jani Nikula
On Thu, Oct 27, 2016 at 8:25 PM, Tomi Ollila wrote: > j4ni on irc expressed interest of having an installation option for > notmuch-emacs and a notmuch remote access script as 'notmuch' > > This got me thinking what kind of script would fulfill all the needs > that I know of. This here fulfills a

Re: [PATCH] emacs: interesting-buffer bugfixes/updates

2016-10-23 Thread Jani Nikula
On Sat, 22 Oct 2016, Tomi Ollila wrote: > On Sat, Oct 22 2016, Mark Walters wrote: > >> The command notmuch-interesting-buffer has got out of date -- it >> doesn't mention notmuch-tree, and it still refers to message-mode not >> notmuch-message-mode. Update both of these. >> >> This fixes the bug

Re: [PATCH] cli: try to run external notmuch- prefixed commands as subcommands

2016-10-23 Thread Jani Nikula
On Sun, 23 Oct 2016, Mark Walters wrote: > On Sat, 22 Oct 2016, Jani Nikula wrote: >> If the given subcommand is not known to notmuch, try to execute >> external notmuch- instead. This allows users to have their >> own notmuch related tools be run via the notmuch command, n

[PATCH v2] completion: complete mimetype: search prefix

2016-10-23 Thread Jani Nikula
Use /etc/mime.types if available, with a homebrew sed parser, and fall back to a handful of common types otherwise. --- v2: smarter sed thanks to Lucas Hoffmann --- completion/notmuch-completion.bash | 32 1 file changed, 32 insertions(+) diff --git a/completion

Re: [PATCH] emacs: add mimetype completions to searches

2016-10-22 Thread Jani Nikula
On Sat, 22 Oct 2016, Keith Amidon wrote: > On Sat, 2016-10-22 at 12:55 +0300, Jani Nikula wrote: >> Any ideas how to get a list of mime types in shell, so I could do the >> same in bash completion without hard-coding some limited list? > > Not sure if this is really what yo

[PATCH] completion: complete mimetype: search prefix

2016-10-22 Thread Jani Nikula
Use /etc/mime.types if available, with a homebrew sed parser, and fall back to a handful of common types otherwise. --- completion/notmuch-completion.bash | 32 1 file changed, 32 insertions(+) diff --git a/completion/notmuch-completion.bash b/completion/notmuch-

[PATCH] man: advertize notmuch-emacs-mua as notmuch emacs-mua subcommand

2016-10-22 Thread Jani Nikula
With subcommand handling for external commands we can now hide the implementation detail of emacs-mua being a separate notmuch-emacs-mua script. --- doc/man1/notmuch-emacs-mua.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man1/notmuch-emacs-mua.rst b/doc/man1/notm

[PATCH] completion: complete notmuch emacs-mua

2016-10-22 Thread Jani Nikula
With subcommand handling for external commands we can easily complete 'notmuch emacs-mua' using the existing completion system. --- completion/notmuch-completion.bash | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/completion/notmuch-completio

[PATCH] cli: try to run external notmuch- prefixed commands as subcommands

2016-10-22 Thread Jani Nikula
If the given subcommand is not known to notmuch, try to execute external notmuch- instead. This allows users to have their own notmuch related tools be run via the notmuch command, not unlike git does. Also notmuch-emacs-mua will be executable via 'notmuch emacs-mua'. By design, this does not allo

[PATCH v2] notmuch-emacs-mua: add support for mailto: URL handling

2016-10-22 Thread Jani Nikula
Add support for composing an email in the Notmuch Emacs UI using a mailto: URL. The mailto: URL mode is mutually exclusive with specifying other message modifying parameters and positional arguments. --- v2: wrap the progn in one assignment, with matching parens (Tomi) --- doc/man1/notmuch-emacs

Re: bash completion install location

2016-10-22 Thread Jani Nikula
On Tue, 04 Oct 2016, David Bremner wrote: > Debian complains about /etc/bash_completion.d begin obsolete and also > claims that /usr/share/bash-completion/completions is the right location > [1]. Can someone who uses bash (ideally also some non-Debian platform) > please confirm or deny this? I d

Re: [PATCH] emacs: add mimetype completions to searches

2016-10-22 Thread Jani Nikula
On Tue, 27 Sep 2016, Mark Walters wrote: > When doing the patch for commit > f94921520778ae4005500f5d1b943e2d4ddd3b2a emacs: show: let the user > override the mime-type of an attachment, I discovered how to do > mimetype completion (in particular where to get a list of mimetypes), > so we may as w

[PATCH] notmuch-emacs-mua: add support for mailto: URL handling

2016-09-30 Thread Jani Nikula
Add support for composing an email in the Notmuch Emacs UI using a mailto: URL. The mailto: URL mode is mutually exclusive with specifying other message modifying parameters and positional arguments. --- doc/man1/notmuch-emacs-mua.rst | 8 +--- notmuch-emacs-mua | 35

Re: filter for List-Id ?

2016-09-30 Thread Jani Nikula
On Fri, Sep 30, 2016 at 5:00 PM, ng0 wrote: > However reading `info notmuch-search-terms(7)' and trying to just search > for list:bug-guix.gnu.org or without the list: prefix, not much turns up > as result (only unrelated results). Is this not implemented in notmuch, > and if it is not, how could

Re: [PATCH] emacs: add tag jump menu

2016-09-18 Thread Jani Nikula
On Sun, 18 Sep 2016, Ioan-Adrian Ratiu wrote: > On Sun, 18 Sep 2016, Mark Walters wrote: >> On Sun, 18 Sep 2016, Ioan-Adrian Ratiu wrote: >>> Hi >>> >>> I have implemented something similar in my tree and I really like the >>> idea. I have one issue though. >>> >>> On Sat, 17 Sep 2016, Mark Walt

Re: [PATCH] emacs: add tag jump menu

2016-09-18 Thread Jani Nikula
On Sun, 18 Sep 2016, David Bremner wrote: > Mark Walters writes: > >> I agree that C-u is a little cumbersome -- I think I would be happy for >> a toggle for single messages (with a single tag change), but for >> multiple messages like a thread I think it would be very unclear what it >> was doin

[PATCH v3 15/15] cli/reply: only pass gmime message to add recipients to reply message

2016-09-13 Thread Jani Nikula
The notmuch message is no longer needed. Simplify. --- notmuch-reply.c | 37 ++--- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index 5421ca80116e..8c894974485d 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @

[PATCH v3 14/15] cli/reply: pass gmime message to Reply-To: redundancy detection

2016-09-13 Thread Jani Nikula
Use gmime message instead of notmuch message in Reply-To: redundancy detection. This allows us to easily iterate over all recipient email addresses accurately, instead of just scanning for strings in the relevant message headers. This improves the accuracy of the detection in many ways. This also

[PATCH v3 09/15] cli/reply: reduce the reply format abstractions

2016-09-13 Thread Jani Nikula
Now that we've made the various reply formats quite similar to each other, there's no point in keeping the abstractions. They are now close enough to be put in one function. For now, a mime node will be uselessly created for the headers-only case, but this is insignificant, and may change in the f

[PATCH v3 10/15] cli/reply: use dedicated functions for reply to mapping

2016-09-13 Thread Jani Nikula
The main motivation here is to move the special casing around reply-to/from handling into a function of its own, clarifying the main logic. --- notmuch-reply.c | 82 ++--- 1 file changed, 49 insertions(+), 33 deletions(-) diff --git a/notmuch-re

[PATCH v3 08/15] cli/reply: reuse create_reply_message() also for headers-only format

2016-09-13 Thread Jani Nikula
Add an option for "limited" headers for the (slightly misleadingly named) headers-only format. There should be no functional changes. --- notmuch-reply.c | 46 +++--- 1 file changed, 15 insertions(+), 31 deletions(-) diff --git a/notmuch-reply.c b/notmuch-r

[PATCH v3 13/15] cli/reply: do not parse Reply-To: header into internet address list twice

2016-09-13 Thread Jani Nikula
Avoid parsing Reply-To: header into internet address list twice. Move the parsing outside of reply_to_header_is_redundant(), and pass the parsed internet address list in as parameter. This also avoids leaking the memory of one copy of the internet address list. --- notmuch-reply.c | 20 +++

[PATCH v3 11/15] cli/reply: check for NULL list first in scan_address_list()

2016-09-13 Thread Jani Nikula
Support passing NULL list later on. Also use it to simplify the recursion. --- notmuch-reply.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index 9b78ea2c2b20..d90f46f9bed3 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -192,6 +

[PATCH v3 12/15] cli/reply: return internet address list from get header funcs

2016-09-13 Thread Jani Nikula
Pass in GMimeMessage to simplify To/Cc/Bcc headers. We'll eventually remove the notmuch message passing altogether, but keep both for now to not make too big changes at once. Getting the headers from GMimeMessage using GMime functions fixes the error on duplicate Cc headers reported by Daniel Kahn

[PATCH v3 06/15] cli/reply: reorganize create_reply_message()

2016-09-13 Thread Jani Nikula
Again, in preparation for later unification, reorganize create_reply_message() to be more similar to the headers-only format reply code in notmuch_reply_format_headers_only(). Due to "pretty" header ordering, there should be no change in output. There should be no functional changes. --- notmuch-r

[PATCH v3 07/15] cli/reply: make references header creation easier to follow

2016-09-13 Thread Jani Nikula
Just use strdup when original references is not available, instead of trying to cram everything into a monster asprintf. There should be no functional changes. --- notmuch-reply.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c in

[PATCH v3 03/15] cli/reply: push notmuch reply format abstraction lower in the stack

2016-09-13 Thread Jani Nikula
There's quite a bit of duplication, and some consequent deviation, between the various notmuch reply format code paths. Perform the query and message iteration in common code, and make the format specific functions operate on single messages. There should be no functional changes. --- notmuch-rep

[PATCH v3 05/15] cli/reply: unify reply format functions

2016-09-13 Thread Jani Nikula
Prepare for further future unification by making the code similar. The only functional change is that errors in mime_node_open() also break execution in default reply format. --- notmuch-reply.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/notmuch-reply.c

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