Notmuch 0.24 freeze

2017-03-05 Thread David Bremner

I've tagged 0.24_rc0 (and uploaded it to Debian experimental). I hope to
release 0.24 in about a week. I've started NEWS, but there is a fair
amount I haven't covered.  Please send patches for NEWS describing any
of your contributions that are user visible and reaching some subjective
threshold for notability. Mark, feel free to improve my emacs draft
note, it's more of a placeholder.


Ioan-Adrian Ratiu (5):
  emacs: notmuch-search: add no-display functionality
  emacs: notmuch-search-refresh-view: reuse buffer
  emacs: notmuch-show: refresh all windows displaying buffer
  emacs: notmuch-lib: add refresh all buffers function
  notmuch-config: replace config reading function

Jani Nikula (39):
  cli: try to run external notmuch- prefixed commands as subcommands
  notmuch-emacs-mua: add support for mailto: URL handling
  completion: complete mimetype: search prefix
  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 clean man page, texinfo lists
  doc/conf.py: include command name in texinfo document title
  doc: fix references in notmuch-emacs.rst
  build: do not touch roff files after sphinx-build
  build: generate man page list from source files, not conf.py
  build: only install known man pages
  man: advertize notmuch-emacs-mua as notmuch emacs-mua subcommand
  emacs: move notmuch-emacs-mua under emacs
  notmuch-emacs-mua: add --hello parameter
  build: install notmuch-emacs-mua with notmuch-emacs
  notmuch.desktop: move under emacs as notmuch-emacs-mua.desktop
  build: install notmuch-emacs-mua.desktop file with emacs
  build: update the desktop database after installing the desktop file
  test: check the handling of files vanishing between scandir and indexing
  cli: abstract config file reading to a separate function
  cli/config: allocate config using talloc_zero
  cli/config: rename name to key in _config_set_list
  lib: fix the todo comment placement on NOTMUCH_STATUS_XAPIAN_EXCEPTION
  lib: use glib for sha1 digests instead of embedding libsha1
  build & util: drop byte order configure check and endian util header
  configure: remove leftover byte order test cleanup
  cli: don't call _entry_in_ignore_list twice in count files debug
  emacs: use (system-name) instead of system-name
  cli/show: list all filenames of a message in the formatted output
  test: test format version difference between v2 and v3
  completion: add bash completion for query: and property:
  cli/show: abstract get content disposition
  cli/show: add content-disposition to structured output message parts
  cli/config: don't try to open config file for 'notmuch help'
  completion: complete notmuch emacs-mua
  emacs/desktop: update to use notmuch-emacs-mua and handle mailto
  lib: use delete[] to free buffer allocated using new[]
  test: shrink T590-thread-breakage test decription to one line

Mark Walters (27):
  emacs: add a tag jump menu
  emacs: tag-jump: make k binding for the reverse tag change map
  emacs: add mimetype completions to searches
  emacs: include first match in address completion
  emacs: mua: extract a common message-send function.
  emacs: mua: check for misplaced secure mml tags
  emacs: tag-jump: docstring fix
  emacs: jump: make multilevel keys do multilevel jump
  emacs: tree: make refresh use generic binding
  emacs: make the refresh functions more consistent
  emacs: hello: stop update from forcing the buffer to be displayed
  emacs: add global keybinding M-= for refresh all buffers
  devel: Document emacs keybindings
  emacs: tree: make tag updates show in the message pane
  emacs: make notmuch-search-tag tag the region when called 
non-interactively.
  emacs: tree: allow the user to decrypt the message pane
  emacs: tree: use message pane decryption state for replies
  emacs: tree: remove binding for pressing button in message pane
  emacs: postpone a message
  Test: fix draft test for emacs23
  emacs: address: move address-full-harvest-finished to a function
  emacs: address: save hash
  emacs: fully add the notmuch-address customize group
  emacs: company: remove two build warnings
  emacs: show: stop display of application/* parts
  Test: emacs: test for folding long headers.
  emacs: compat: backport fix for folding long headers when sending

Matt Armstrong (2):
  Add notmuch-show--build-queries.
  emacs: make faces readable on dark backgrounds.

Matthew Lear (1):
  Fix reply to encrypted mail when discouraging plain text.

Steven Allen (1):
  docs: fix notmuch_message_properties_value documentation

Tomi Ollila (7):
  test/T000-basic: replaced 

[PATCH] configure: removed $zlib_(cflags|ldflags) from compat code build

2017-03-05 Thread Tomi Ollila
When pkg-config does not find configure, a compat version of the
zlib.pc is created. In creation of that configure attempted to
read values of $zlib_cflags and $zlib_ldflags. In the usual case
those were undefined, and with `set -a` now in the beginning of
configure, configure broke.

Even if $zlib_cflags and $zlib_ldflags had values which were used
to create zlib.pc, the values were overwritten (with static content)
a few lines later in next pkg-config --cflags and --libs run. These
values would not be different and probably useless -- the following
boild would probably fail.

But instead of using those, CPATH and LIBRARY_PATH environment
variables can be used successfully (both while configuring and
building).
---
 configure | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/configure b/configure
index fa77eb8..e16a9b7 100755
--- a/configure
+++ b/configure
@@ -493,8 +493,7 @@ else
 fi
 
 if ! pkg-config --exists zlib; then
-  ${CC} ${zlib_cflags} -o compat/gen_zlib_pc \
- "$srcdir"/compat/gen_zlib_pc.c ${zlib_ldflags} > /dev/null 2>&1 &&
+  ${CC} -o compat/gen_zlib_pc "$srcdir"/compat/gen_zlib_pc.c >/dev/null 2>&1 &&
   compat/gen_zlib_pc > compat/zlib.pc &&
   PKG_CONFIG_PATH="$PKG_CONFIG_PATH":compat &&
   export PKG_CONFIG_PATH
-- 
2.9.3

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: notmuch new: emails with BOM are ignored

2017-03-05 Thread David Bremner
Andreas Amann  writes:

> Hi,
>
> I recently received some spam mails, which have a utf-16 byte order mark
> (BOM) U+FEFF as the first character in one of their "Received:"
> lines. When I run "notmuch new" I get the following:
>
> Note: Ignoring non-mail file: /home/user/Mail/new/path_to_email_with_BOM
>
> Could this be a bug in notmuch? Possible emails with BOM are not "legal"
> anyhow, but in my opinion it would be better to simply ignore the BOM.
>
> I am using notmuch 0.18.
>
> Andreas
>

I couldn't duplicate this old report with current notmuch. I replaced
"Received: " with "Received: " but the message was picked up by
notmuch new.

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH v4 2/3] emacs: `notmuch-show-buttonize-links' only `notmuch-show's a message if it exists

2017-03-05 Thread David Bremner
David Edmondson  writes:

> [ Trimmed to/cc list. ]
>
> On Sun, Jan 22 2012, Pieter Praet wrote:
>> * emacs/notmuch-show.el (notmuch-show-found-target-p): new predicate function
>>   that uses notmuch(1) 'count' to see if a query turns up any results.
>>
>> * emacs/notmuch-show.el (notmuch-show-if-found): new function that only shows
>>   a message/thread if present in the database and otherwise returns an error.
>>
>> * emacs/notmuch-show.el (notmuch-show-buttonize-links): some deduplication,
>>   and use new function `notmuch-show-if-found' instead of `notmuch-show'
>>   to prevent showing a blank screen for Message-Id's which aren't present
>>   in the database.
>
> Mark provided some feedback about this (relating to exclusions), but
> more generally there is a problem that `M-x notmuch-show id:doesntexist'
> will result in an error ("notmuch-show-message-top: Beginning of
> buffer"). That seems like a bug that should be fixed.

This also now seems fixed in 0.23.7-131-g85df8b39

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH v2] emacs: call notmuch-show instead of notmuch-search in buttonised id: links

2017-03-05 Thread David Bremner
Pieter Praet  writes:

>
> Anti-RSI FTW!
>
> However...  If no message with that id: exists, `notmuch-show'
> will drop us to a blank screen.
>
> See id:"87lisjzrsc@kepler.schwinge.homeip.net" for some mock
> 'id:' links which demonstrate this nicely.

This old bug seems fixed to me in current notmuch (0.23.7-131-g85df8b39)

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [RFE] Call `gpg --recv-keys` asynchronously

2017-03-05 Thread Jani Nikula
On Tue, 28 Feb 2017, David Bremner  wrote:
> Sebastian Schwarz  writes:
>> Even with all keys already present signature verification takes
>> some time as well.  It would be nice if this was done
>> asynchronously as well.  This would greatly improve the speed of
>> opening threads with large numbers of signed messages.
>
> Offhand, that sounds even harder.

Indeed. I think this could only be sensibly considered if we ever
decided to support decryption/verification in notmuch-emacs.

> With a noticable loss in security, we could cache the verifications in
> the database so the cost is only paid once.

From implementation POV one downside is that a read-only operation would
have to be turned into a read-write operation to store the cached result
in the database.

Assuming the database is as secure as the key store, I suppose the
reduction in security is related to key expiry and revocation. Those
bring in the problem of invalidating the cached verification. All of
this is something that has to be opt-in, judged by the user.

Even if the mechanisms might be fairly straightforward to implement, I'm
not really fond of the idea of adding somewhat complicated features not
enabled by default for all users. or features we couldn't even recommend
for people who can't make the judgement themselves.

BR,
Jani.

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Bug/Issue: References header doesn't wrap in emacs package

2017-03-05 Thread David Bremner
Allan Streib  writes:

> Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.4.1
>
> Replying to a message in a deeply nested thread can trigger a complaint:
>
>   sendmail: command failed: 550 5.7.1 Delivery not authorized, message 
> refused: Message is not RFC 2822 compliant
>
> The problem is a References header that is too long/not wrapped.
>
> Regards,
>

This bug should now be fixed in notmuch (commit 95e9c137e18a, will be
part of notmuch 0.24)

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Bug: counting messages twice after excluding tags yields different results

2017-03-05 Thread David Bremner
Lucas  writes:

> Dear list members,
>
> I think I found a bug or at least undocumented behaviour in the notmuch
> library.  I would like to report this here.  Originally I found the bug
> in the python library but I attached a c program that shows the same
> behaviour.  I am running notmuch version 0.22.1 from the Arch Linux
> repositories.
>
> The setup:
> 1. chose a query string, e.g. "is:inbox or is:spam"
> 2. chose a tag to exclude that is matched by the query, e.g. "spam"
> 3. open the database
> 4. create a query
> 5. check the message or thread count any number of times
> 6. exclude the tag from the query
> 7. check the message or thread count any number of times
>
> The result:
> - In step 5 the result stays the same if I repeatedly call
>   notmuch_query_count_messages_st or query.count_messages.
> - In step 7 the count is different between the first call and all
>   subsequent calls.  But neither seems correct to me.  I always get the
>   same number as in step 5 for the first call and 0 afterwards.

This bug should be fixed in commit  dfacfe14, which will be part of
notmuch 0.24. Thanks for your clear report and test case.

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[REBASED RFC PATCH] cli/show: include content type parameters in formatted output

2017-03-05 Thread Jani Nikula
This is primarily to be able to handle "text/plain; format=flowed",
but I don't see much point in making this specific to
format=flowed. Just include all content type parameters in the
formatted output, like this:

"content-type" : "text/plain",
"content-type-params" : [
{
"format" : "flowed"
}
],

It might make sense to change the content-type key in schemata to
include the parameters in a more structured fashion instead of adding
a separate key like here, but this doesn't require a change in
consumers or schemata version bump.

This was just a quick proof of concept, and obviously lacks tests,
schemata updates, etc.
---
 notmuch-show.c | 13 +
 1 file changed, 13 insertions(+)

diff --git a/notmuch-show.c b/notmuch-show.c
index 744b62727c26..866b974fcefa 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -625,6 +625,19 @@ format_part_sprinter (const void *ctx, sprinter_t *sp, 
mime_node_t *node,
 sp->map_key (sp, "content-type");
 sp->string (sp, g_mime_content_type_to_string (content_type));
 
+const GMimeParam *params = g_mime_content_type_get_params (content_type);
+if (params) {
+   sp->map_key (sp, "content-type-params");
+   sp->begin_list (sp);
+   sp->begin_map (sp);
+   for (; params; params = params->next) {
+   sp->map_key (sp, params->name);
+   sp->string (sp, params->value);
+   }
+   sp->end (sp);
+   sp->end (sp);
+}
+
 if (disposition) {
sp->map_key (sp, "content-disposition");
sp->string (sp, disposition);
-- 
2.11.0

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch