Re: [PATCH] python: Fix database.add_message

2017-09-11 Thread David Bremner
David Bremner  writes:

> Dylan Baker  writes:
>
>> b10ce6bc23002d48916b1b2f375480e7540e3164 introduced a new index_file
>> method as a replacement for add_message. It helpfully made add_message
>> an alias for index_file, unfortunately it got the signature wrong by
>> explicitly passing self as an argument.
>>
>> cc: Daniel Kahn Gillmor 
>
> Thanks. We have another version that I was about to commit
>
> https://www.mail-archive.com/notmuch@notmuchmail.org/msg45038.html
>
> The only difference is that Gaute (more or less by request) added a
> deprecation warning.  I don't really know how warnings in python work,
> does that sound sensible?

Oof. Two minutes of internet search reveal that DeprecationWarnings are
ignored by default, so that should be OK.

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


Re: [PATCH] python: Fix database.add_message

2017-09-11 Thread David Bremner
Dylan Baker  writes:

> b10ce6bc23002d48916b1b2f375480e7540e3164 introduced a new index_file
> method as a replacement for add_message. It helpfully made add_message
> an alias for index_file, unfortunately it got the signature wrong by
> explicitly passing self as an argument.
>
> cc: Daniel Kahn Gillmor 

Thanks. We have another version that I was about to commit

https://www.mail-archive.com/notmuch@notmuchmail.org/msg45038.html

The only difference is that Gaute (more or less by request) added a
deprecation warning.  I don't really know how warnings in python work,
does that sound sensible?

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


notmuch release 0.25.1 now available

2017-09-11 Thread David Bremner

Where to obtain notmuch 0.25.1
===
  https://notmuchmail.org/releases/notmuch-0.25.1.tar.gz

Which can be verified with:

  https://notmuchmail.org/releases/notmuch-0.25.1.tar.gz.sha256
  b4bf09ec9b7b64180704faa26d66cad5f911a5a00ef812da34cb02c3f8872831  
notmuch-0.25.1.tar.gz

  https://notmuchmail.org/releases/notmuch-0.25.1.tar.gz.sha256.asc
  (signed by David Bremner)

What's new in notmuch 0.25.1
=

Emacs
-

Disable handling x-display in text/enriched messages. Mitigation for
Emacs bug #28350.

What is notmuch
===
Notmuch is a system for indexing, searching, reading, and tagging
large collections of email messages in maildir or mh format. It uses
the Xapian library to provide fast, full-text search with a convenient
search syntax.

For more about notmuch, see https://notmuchmail.org

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


[PATCH] python: Fix database.add_message

2017-09-11 Thread Dylan Baker
b10ce6bc23002d48916b1b2f375480e7540e3164 introduced a new index_file
method as a replacement for add_message. It helpfully made add_message
an alias for index_file, unfortunately it got the signature wrong by
explicitly passing self as an argument.

cc: Daniel Kahn Gillmor 
---
 bindings/python/notmuch/database.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bindings/python/notmuch/database.py 
b/bindings/python/notmuch/database.py
index a2c025eb..f553e9d0 100644
--- a/bindings/python/notmuch/database.py
+++ b/bindings/python/notmuch/database.py
@@ -471,7 +471,7 @@ class Database(object):
 def add_message(self, filename, sync_maildir_flags=False):
 """Deprecated alias for :meth:`index_file`
 """
-self.index_file(self, filename, sync_maildir_flags=sync_maildir_flags)
+self.index_file(filename, sync_maildir_flags=sync_maildir_flags)
 
 _remove_message = nmlib.notmuch_database_remove_message
 _remove_message.argtypes = [NotmuchDatabaseP, c_char_p]
-- 
2.14.1

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


Re: [PATCH] emacs: override enriched-decode-display-prop for text/enriched display

2017-09-11 Thread David Edmondson
Looks good.

On Monday, 2017-09-11 at 23:09:49 +0300, Jani Nikula wrote:

> Switch to a local version of enriched-decode-display-prop if we
> encounter a text/enriched part. This is to mitigate
> https://bugs.gnu.org/28350. Normally it would be prudent to remove the
> override afterwards, but in this case just leave it in.
> ---
>  emacs/notmuch-show.el | 9 +
>  1 file changed, 9 insertions(+)
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index cd901e471930..993902770095 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -773,6 +773,15 @@ will return nil if the CID is unknown or cannot be 
> retrieved."
>  (defun notmuch-show-insert-part-text/x-vcalendar (msg part content-type nth 
> depth button)
>(notmuch-show-insert-part-text/calendar msg part content-type nth depth 
> button))
>  
> +;; https://bugs.gnu.org/28350
> +(defun notmuch-show--enriched-decode-display-prop (start end  param)
> +  (list start end))
> +
> +(defun notmuch-show-insert-part-text/enriched (msg part content-type nth 
> depth button)
> +  (advice-add 'enriched-decode-display-prop :override
> +   #'notmuch-show--enriched-decode-display-prop)
> +  nil)
> +
>  (defun notmuch-show-get-mime-type-of-application/octet-stream (part)
>;; If we can deduce a MIME type from the filename of the attachment,
>;; we return that.
> -- 
> 2.11.0
>
> ___
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

dme.
-- 
There's too many people on the bus from the airport.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] emacs: override enriched-decode-display-prop for text/enriched display

2017-09-11 Thread Jani Nikula
Switch to a local version of enriched-decode-display-prop if we
encounter a text/enriched part. This is to mitigate
https://bugs.gnu.org/28350. Normally it would be prudent to remove the
override afterwards, but in this case just leave it in.
---
 emacs/notmuch-show.el | 9 +
 1 file changed, 9 insertions(+)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index cd901e471930..993902770095 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -773,6 +773,15 @@ will return nil if the CID is unknown or cannot be 
retrieved."
 (defun notmuch-show-insert-part-text/x-vcalendar (msg part content-type nth 
depth button)
   (notmuch-show-insert-part-text/calendar msg part content-type nth depth 
button))
 
+;; https://bugs.gnu.org/28350
+(defun notmuch-show--enriched-decode-display-prop (start end  param)
+  (list start end))
+
+(defun notmuch-show-insert-part-text/enriched (msg part content-type nth depth 
button)
+  (advice-add 'enriched-decode-display-prop :override
+ #'notmuch-show--enriched-decode-display-prop)
+  nil)
+
 (defun notmuch-show-get-mime-type-of-application/octet-stream (part)
   ;; If we can deduce a MIME type from the filename of the attachment,
   ;; we return that.
-- 
2.11.0

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


Re: [PATCH 2/2] devel: add script to test out-of-tree builds

2017-09-11 Thread Jani Nikula
On Mon, 11 Sep 2017, Tomi Ollila  wrote:
> On Sun, Sep 10 2017, Jani Nikula wrote:
> Thanks for an excellent example why ``set -u`` should be included in
> *every* shell script. >;D

https://upload.wikimedia.org/wikipedia/commons/3/3b/Paris_Tuileries_Garden_Facepalm_statue.jpg

Fix sent.

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


[PATCH v2] devel: add script to test out-of-tree builds

2017-09-11 Thread Jani Nikula
Something I used for 'git bisect run', but we should really add this
as part of our process.

---

v2: add set -u, and remove the useless cd.
---
 devel/out-of-tree-build-check.sh | 15 +++
 1 file changed, 15 insertions(+)
 create mode 100755 devel/out-of-tree-build-check.sh

diff --git a/devel/out-of-tree-build-check.sh b/devel/out-of-tree-build-check.sh
new file mode 100755
index ..984b4b5f65f5
--- /dev/null
+++ b/devel/out-of-tree-build-check.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# test out-of-tree builds in a temp directory
+# passes all args to make
+
+set -eu
+
+srcdir="$(cd "$(dirname "$0")"/.. && pwd)"
+builddir=$(mktemp -d)
+
+cd $builddir
+
+$srcdir/configure
+make "$@"
+
+rm -rf $builddir
-- 
2.11.0

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


Re: [PATCH 2/2] devel: add script to test out-of-tree builds

2017-09-11 Thread Tomi Ollila
On Sun, Sep 10 2017, Jani Nikula wrote:

> Something I used for 'git bisect run', but we should really add this
> as part of our process.

Thanks for an excellent example why ``set -u`` should be included in
*every* shell script. >;D

Tomi

Sent from N9

> ---
>  devel/out-of-tree-build-check.sh | 16 
>  1 file changed, 16 insertions(+)
>  create mode 100755 devel/out-of-tree-build-check.sh
>
> diff --git a/devel/out-of-tree-build-check.sh 
> b/devel/out-of-tree-build-check.sh
> new file mode 100755
> index ..cf938ed20f26
> --- /dev/null
> +++ b/devel/out-of-tree-build-check.sh
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +# test out-of-tree builds in a temp directory
> +# passes all args to make
> +
> +set -e
> +
> +srcdir="$(cd "$(dirname "$0")"/.. && pwd)"
> +builddir=$(mktemp -d)
> +
> +cd $builddir
> +
> +$srcdir/configure
> +make "$@"
> +
> +cd $notmuch_dir
> +rm -rf $builddir
> -- 
> 2.11.0
>
> ___
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [BUG] Notmuch keeps adding notmuch-address-expand-name to message-completion-alist

2017-09-11 Thread Attic Hermit
You can get rid of the bug by using `member` instead of `memq` in
`nomtuch-address-setup`:

diff -u a/notmuch-address.el b/notmuch-address.el
--- a/notmuch-address.el2017-08-05 18:45:40.0 +0900
+++ b/notmuch-address.el2017-09-11 19:40:41.230872915 +0900
@@ -159,7 +159,7 @@
   #'notmuch-address-expand-name)))
   (when setup-company
(notmuch-company-setup))
-  (unless (memq pair message-completion-alist)
+  (unless (member pair message-completion-alist)
(setq message-completion-alist
  (push pair message-completion-alist)

David Bremner  writes:

> Attic Hermit  writes:
>
>> When I invocate compose-mail or something related with the message-mode
>> buffer and Notmuch, Notmuch keeps adding a pair like below to
>> `message-completion-alist`:
>>
>>   
>> ("^\\(Resent-\\)?\\(To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):"
>>   . notmuch-address-expand-name)
>>
>
> I don't know much about the cause, but I can confirm that many such
> pairs are added to this list.
>
> d
-- 
Attic Hermit
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [BUG] Notmuch keeps adding notmuch-address-expand-name to message-completion-alist

2017-09-11 Thread David Bremner
Attic Hermit  writes:

> When I invocate compose-mail or something related with the message-mode
> buffer and Notmuch, Notmuch keeps adding a pair like below to
> `message-completion-alist`:
>
>   
> ("^\\(Resent-\\)?\\(To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):"
>   . notmuch-address-expand-name)
>

I don't know much about the cause, but I can confirm that many such
pairs are added to this list.

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