Re: emacs-notmuch: A Xapian exception occurred parsing query

2018-02-15 Thread Olly Betts
On 2018-02-07, David Bremner wrote:
> The underlying issue is that * is parsed (simplistically) by notmuch
> before passing to Xapian, so only works if it is the entire query.
>
> For cases like you report, where the user has not entered '*', but
> rather it is contained in some generated query string, we could fix the
> problem by adding a prefix like "special:*".

If you're generating the query string, you could presumably just
generate « tag:flagged » for this case.

Though it's generally better not to try to generate a string to parse,
but instead to parse any part(s) the user actually wrote and combine
the resulting Xapian::Query objects with directly constructed objects
for other filters, etc.

> This would allow Xapian to parse it, but only for Xapian versions >=
> 3.5.  How many users of older systems do we think this would affect?
> E.g. users of Debian oldstable (jessie) would have to compile Xapian
> in order to use the newest notmuch.

(That should be >= 1.3.5 I think - certainly 3.5 is wrong).

For Debian oldstable users, there's a backport of 1.4.3:

https://packages.debian.org/source/oldstable-backports/xapian-core

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


Re: a temporary nmweb view of notmuch mailing list archive

2018-02-15 Thread Daniel Kahn Gillmor
On Thu 2018-02-15 15:47:21 -0500, Brian Sniffen wrote:
> show_thread_nav = True , and take through 
> https://github.com/briansniffen/notmuch/commit/021c914fc5cc1029778794cc5630373041066889

ah, i'd missed some of your commits, apparently.  thanks for the
pointer.  https://notmuchmail.org/btsmail is now running my merged changes.


We're moving in the right direction!  Since i pulled these in and made a
few more changes, we've now got the following:

 * we have a threaded view from each message

 * nmweb is configurable via the environment, no need to tweak config in
   the code itself


I've also just opened a pull request on github for you to merge my
cleanup, if you're interested:

https://github.com/briansniffen/notmuch/pull/1

We're going to need to do some git history cleanup eventually if we want
this merged on the notmuch mainline, but i figure it'd be better if we
sync up earlier rather than later :)


for the record, there are a few errors i'm seeing now from poking around
on nmweb.  in particular, i get an error here in the tree walk when
looking at what appears to be a bounced e-mail (the fact that bounced
e-mails probably shouldn't show up in this archive is a separate bug):

https://nmbug.notmuchmail.org/btsmail/show/E1ehr4h-Dc-0w%40nmbug

Feb 15 18:27:13 nmbug gunicorn3[30460]: Traceback (most recent call last):
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File 
"/usr/lib/python3/dist-packages/web/application.py", line 257, in process
Feb 15 18:27:13 nmbug gunicorn3[30460]: return self.handle()
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File 
"/usr/lib/python3/dist-packages/web/application.py", line 248, in handle
Feb 15 18:27:13 nmbug gunicorn3[30460]: return self._delegate(fn, 
self.fvars, args)
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File 
"/usr/lib/python3/dist-packages/web/application.py", line 488, in _delegate
Feb 15 18:27:13 nmbug gunicorn3[30460]: return handle_class(cls)
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File 
"/usr/lib/python3/dist-packages/web/application.py", line 466, in handle_class
Feb 15 18:27:13 nmbug gunicorn3[30460]: return tocall(*args)
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File 
"/home/nmweb/notmuch/contrib/notmuch-web/nmweb.py", line 172, in GET
Feb 15 18:27:13 nmbug gunicorn3[30460]: sprefix=webprefix)
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File 
"/usr/lib/python3/dist-packages/jinja2/environment.py", line 989, in render
Feb 15 18:27:13 nmbug gunicorn3[30460]: return 
self.environment.handle_exception(exc_info, True)
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File 
"/usr/lib/python3/dist-packages/jinja2/environment.py", line 754, in 
handle_exception
Feb 15 18:27:13 nmbug gunicorn3[30460]: reraise(exc_type, exc_value, tb)
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File 
"/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
Feb 15 18:27:13 nmbug gunicorn3[30460]: raise value.with_traceback(tb)
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "templates/show.html", line 1, 
in top-level template code
Feb 15 18:27:13 nmbug gunicorn3[30460]: {% extends "base.html" %}
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "templates/base.html", line 32, 
in top-level template code
Feb 15 18:27:13 nmbug gunicorn3[30460]: {% block content %}
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "templates/show.html", line 12, 
in block "content"
Feb 15 18:27:13 nmbug gunicorn3[30460]: {% for part in 
format_message(m.get_filename(),mid): %}{{ part|safe }}{% endfor %}
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File 
"/home/nmweb/notmuch/contrib/notmuch-web/nmweb.py", line 241, in 
format_message_walk
Feb 15 18:27:13 nmbug gunicorn3[30460]: parts.pop()
Feb 15 18:27:13 nmbug gunicorn3[30460]: IndexError: pop from empty list



Also, i noticed that just searching by date (with no terms) fails
with a Xapian error because " date:…" gets quote_plus'ed to "+date:…"
and notmuch gets confused by the leading "+" -- maybe we're missing an
unquote_plus or something?



Finally, we're clearly not escaping the subject lines correctly.  Look
at the threading here:


https://nmbug.notmuchmail.org/btsmail/show/cover.1392309570.git.wking%40tremily.us


Does anyone have a preference for the URL to use for more permanent
web-based view of the mailing list archive?

thanks for this work, Brian!

   --dkg


signature.asc
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Gmane vs. Mail Archive notmuch-report config

2018-02-15 Thread W. Trevor King
On Thu, Feb 15, 2018 at 03:02:58PM -0500, Daniel Kahn Gillmor wrote:
> On Thu 2018-02-15 10:56:29 -0800, W. Trevor King wrote:
> > On Thu, Feb 15, 2018 at 11:01:40AM -0500, Daniel Kahn Gillmor wrote:
> >> -  "message-url": "http://mid.gmane.org/{message-id}";
> >> +  "message-url": "https://mid.gmane.org/{message-id}";
> >
> > I was wondering whether it made sense to change these to something
> > else with Gmane down.  But it appears that Gmane is back up, possibly
> > since ~2016-09-14 [1]).  The current notmuch-report output [2] is
> > linking to the Mail Archive though (e.g. [3]) and not to Gmane
> > (e.g. [4]).  Perhaps we want to revert 2d6500a0 (change mid link to
> > mail-archive.com, 2017-03-19) and go back to Gmane?  Or use one of the
> > other notmuch-based archives that has been floating around on the list
> > recently?
> 
> while i'm game to reconsider this (and clearly my work on
> https://nmbug.notmuchmail.org/btsmail is intended for a future
> replacement), i don't want to block the proposed patch from landing.
> what did you think of the rest of the patch? :)

No opinions on the rest of the patch ;).  I'm generally in favor of
HTTPS, but didn't check all the links and such.  I just thought “why
bother updating these if Gmane is down?” and then found out that it
was back up and that our notmuch-report wasn't using it.  This “Gmane
vs. Mail Archive notmuch-report config” sub-thread is just about that,
and not part of patch review.

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy


signature.asc
Description: OpenPGP digital signature
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Gmane vs. Mail Archive notmuch-report config (was: [PATCH] move more http -> https)

2018-02-15 Thread Daniel Kahn Gillmor
On Thu 2018-02-15 10:56:29 -0800, W. Trevor King wrote:
> On Thu, Feb 15, 2018 at 11:01:40AM -0500, Daniel Kahn Gillmor wrote:
>> -  "message-url": "http://mid.gmane.org/{message-id}";
>> +  "message-url": "https://mid.gmane.org/{message-id}";
>
> I was wondering whether it made sense to change these to something
> else with Gmane down.  But it appears that Gmane is back up, possibly
> since ~2016-09-14 [1]).  The current notmuch-report output [2] is
> linking to the Mail Archive though (e.g. [3]) and not to Gmane
> (e.g. [4]).  Perhaps we want to revert 2d6500a0 (change mid link to
> mail-archive.com, 2017-03-19) and go back to Gmane?  Or use one of the
> other notmuch-based archives that has been floating around on the list
> recently?

while i'm game to reconsider this (and clearly my work on
https://nmbug.notmuchmail.org/btsmail is intended for a future
replacement), i don't want to block the proposed patch from landing.
what did you think of the rest of the patch? :)

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


Re: a temporary nmweb view of notmuch mailing list archive

2018-02-15 Thread Brian Sniffen
show_thread_nav = True , and take through 
https://github.com/briansniffen/notmuch/commit/021c914fc5cc1029778794cc5630373041066889

-- 
Brian Sniffen

> On Feb 15, 2018, at 11:06 AM, Daniel Kahn Gillmor  
> wrote:
> 
>> On Sun 2018-02-11 15:03:05 -0500, Daniel Kahn Gillmor wrote:
>>> On Sat 2018-02-10 13:57:34 -0500, Brian Sniffen wrote:
>>> It looks like you have thread next/pref turned off. Is there a reason,
>>> including the reason that I hadn’t documented it?
>> 
>> nope, i just didn't fiddle with it much beyond setting it up and trying
>> to make sure the system integration didn't seem wildly dangerous.  happy
>> to tweak it further, and will take any recommendations. :)
> 
> hm, looking into this a little bit, i don't actually see how to turn it
> on.  if you've got pointers or documentation, i would be happy to read
> it.
> 
>--dkg
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Gmane vs. Mail Archive notmuch-report config (was: [PATCH] move more http -> https)

2018-02-15 Thread W. Trevor King
On Thu, Feb 15, 2018 at 11:01:40AM -0500, Daniel Kahn Gillmor wrote:
> -  "message-url": "http://mid.gmane.org/{message-id}";
> +  "message-url": "https://mid.gmane.org/{message-id}";

I was wondering whether it made sense to change these to something
else with Gmane down.  But it appears that Gmane is back up, possibly
since ~2016-09-14 [1]).  The current notmuch-report output [2] is
linking to the Mail Archive though (e.g. [3]) and not to Gmane
(e.g. [4]).  Perhaps we want to revert 2d6500a0 (change mid link to
mail-archive.com, 2017-03-19) and go back to Gmane?  Or use one of the
other notmuch-based archives that has been floating around on the list
recently?

Cheers,
Trevor

[1]: http://home.gmane.org/2016/09/14/anatomy-gmane-v2/
[2]: https://nmbug.notmuchmail.org/status/
[3]: http://mid.mail-archive.com/87zk4eqech.fsf%40inf-8657.int-evry.fr
[4]: https://mid.gmane.org/87zk4eqech.fsf%40inf-8657.int-evry.fr

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy


signature.asc
Description: OpenPGP digital signature
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] nmbug: explicitly prefer python3

2018-02-15 Thread W. Trevor King
On Thu, Feb 15, 2018 at 07:37:53AM +0200, Tomi Ollila wrote:
> In this case I value Trevor as valid notmuch maintainer as anyone
> else who has done significant work for nmbug.

Thanks, but I don't think that should impact the decision for this
patch.  I'm just sharing my take, but the eventual decisions are up to
David (and others with push access to the main repo?).  I'll certainly
continue to contribute to nmbug if their decision is to use python3
shebangs ;).

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy


signature.asc
Description: OpenPGP digital signature
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: a temporary nmweb view of notmuch mailing list archive

2018-02-15 Thread Daniel Kahn Gillmor
On Sun 2018-02-11 15:03:05 -0500, Daniel Kahn Gillmor wrote:
> On Sat 2018-02-10 13:57:34 -0500, Brian Sniffen wrote:
>> It looks like you have thread next/pref turned off. Is there a reason,
>> including the reason that I hadn’t documented it?
>
> nope, i just didn't fiddle with it much beyond setting it up and trying
> to make sure the system integration didn't seem wildly dangerous.  happy
> to tweak it further, and will take any recommendations. :)

hm, looking into this a little bit, i don't actually see how to turn it
on.  if you've got pointers or documentation, i would be happy to read
it.

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


[PATCH] move more http -> https

2018-02-15 Thread Daniel Kahn Gillmor
Correct URLs that have crept into the notmuch codebase with http://
when https:// is possible.

As part of this conversion, this changeset also indicates the current
preferred upstream URLs for both gmime and sup.  the new URLs are
https-enabled, the old ones are not.
---
 AUTHORS| 2 +-
 INSTALL| 4 ++--
 NEWS   | 2 +-
 bindings/python/docs/COPYING   | 2 +-
 bindings/python/docs/source/conf.py| 2 +-
 configure  | 6 +++---
 devel/nmbug/doc/man5/notmuch-report.json.5.rst | 6 +++---
 devel/nmbug/notmuch-report | 2 +-
 emacs/notmuch-show.el  | 2 +-
 lib/message-property.cc| 2 +-
 lib/string-map.c   | 2 +-
 notmuch-reindex.c  | 2 +-
 12 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 6d0f2de8..5fe5006f 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -3,7 +3,7 @@ But there's really not much that he's done. There's been a lot 
of
 standing on shoulders here:
 
 William Morgan deserves credit for providing the primary inspiration
-for Notmuch with his program Sup (http://sup.rubyforge.org/).
+for Notmuch with his program Sup (https://sup-heliotrope.github.io/).
 
 Some people have contributed code that has made it into Notmuch
 without their specific knowledge (but with their full permission
diff --git a/INSTALL b/INSTALL
index 69f9df7e..056e9fac 100644
--- a/INSTALL
+++ b/INSTALL
@@ -46,7 +46,7 @@ Talloc, and zlib which are each described below:
Without GMime, Notmuch would not be able to extract and index
the actual text from email message encoded as BASE64, etc.
 
-   GMime is available from http://spruce.sourceforge.net/gmime/
+   GMime is available from https://github.com/jstedfast/gmime
 
Talloc
--
@@ -70,7 +70,7 @@ Talloc, and zlib which are each described below:
Notmuch needs the transparent write feature of zlib introduced
in version 1.2.5.2 (Dec. 2011).
 
-   zlib is available from http://zlib.net
+   zlib is available from https://zlib.net
 
 Building Documentation
 --
diff --git a/NEWS b/NEWS
index e4f8160b..531e72d5 100644
--- a/NEWS
+++ b/NEWS
@@ -1578,7 +1578,7 @@ uses `@{upstream}` instead of `FETCH_HEAD` to track 
upstream changes.
   2. Remove your `NMBGIT` repository (e.g. `mv .nmbug .nmbug.bak`).
   3. Use the new `clone` command to create a fresh clone:
 
-nmbug clone http://nmbug.tethera.net/git/nmbug-tags.git
+nmbug clone https://nmbug.notmuchmail.org/git/nmbug-tags.git
 
   4. If you had local commits in step 1, add a remote for that
  repository and fetch them into the new repository.
diff --git a/bindings/python/docs/COPYING b/bindings/python/docs/COPYING
index 2a000655..e6000869 100644
--- a/bindings/python/docs/COPYING
+++ b/bindings/python/docs/COPYING
@@ -1,7 +1,7 @@
 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
 
- Copyright (C) 2007 Free Software Foundation, Inc. 
+ Copyright (C) 2007 Free Software Foundation, Inc. 
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
diff --git a/bindings/python/docs/source/conf.py 
b/bindings/python/docs/source/conf.py
index 5107a96e..5b901c4e 100644
--- a/bindings/python/docs/source/conf.py
+++ b/bindings/python/docs/source/conf.py
@@ -215,4 +215,4 @@ latex_documents = [
 
 
 # Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'http://docs.python.org/': None}
+intersphinx_mapping = {'https://docs.python.org/': None}
diff --git a/configure b/configure
index b177b141..1a6bf295 100755
--- a/configure
+++ b/configure
@@ -734,18 +734,18 @@ EOF
 fi
 if [ $have_zlib -eq 0 ]; then
echo "  zlib library (>= version 1.2.5.2, including development files 
such as headers)"
-   echo "  http://zlib.net/";
+   echo "  https://zlib.net/";
echo
 fi
 if [ $have_gmime -eq 0 ]; then
echo "  GMime 2.6 library >= $GMIME_MINVER"
echo "  (including development files such as headers)"
-   echo "  http://spruce.sourceforge.net/gmime/";
+   echo "  https://github.com/jstedfast/gmime/";
echo
 fi
 if [ $have_glib -eq 0 ]; then
echo "  Glib library >= 2.22 (including development files such as 
headers)"
-   echo "  http://ftp.gnome.org/pub/gnome/sources/glib/";
+   echo "  https://ftp.gnome.org/pub/gnome/sources/glib/";
echo
 fi
 if [ $have_talloc -eq 0 ]; then
diff --git a/devel/nmbug/doc/man5/notmuch-report.json.5.rst 
b/devel/nmbug/doc/man5/notmuch-report.json.5.rst
index 1207a4aa..98d2d2e3 100644
--- a/devel/nmbug/doc/man5/

Suggestion for Emacs: notmuch-draft-dirs

2018-02-15 Thread Karl Fogelmark

Hi!

I've just started migrating to emacs notmuch from another emacs mail client.
My situation is that I have multiple email accounts and I want to mirror the
web interface of each e-mail service, so I can use either the web interface or
notmuch interchangeably.

Setting notmuch-fcc-dirs allows me to do this (as far as I can tell), by
choosing the correct "sent" maildir depending on "From" filed.

Now I'd also like drafts to be saved in different maildirs depending on the
"From" field of the active message; however, there is no notmuch-draft-dirs
with analogous behavior, instead, there's only notmuch-draft-folder, which
only allows one constant string.

Currently I have:
(setq notmuch-fcc-dirs '(("work.com" . "\"work/Sent Items\" -unread -inbox" )
 ("somemail.com" . "\"private/Sent Items\" -unread 
-inbox" )))

(setq notmuch-draft-folder "work/Drafts")

But it would be nice if the last line could be:

(setq notmuch-draft-dirs '(("work.com" . "\"work/Drafts \" -unread -inbox" )
  ("somemail.com" . "\"private/Drafts \" -unread 
-inbox" )))

On IRC it was suggested I send this suggestion through here.

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


email encrypted by flowcrypt not automatically decrypted

2018-02-15 Thread Marko Schuetz-Schmuck
Dear All,

I received an email today that appears to have been encrypted by
flowcrypt. Notmuch did not seem to detect the decryption. It detects
encryption and decrypts correctly if I send an encrypted email to
myself...

Best regards,

Marko


signature.asc
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch