Commit graph

5946 commits

Author SHA1 Message Date
David Edmondson
e8cb6b2cd6 emacs: Call `notmuch-mua-send-hook' hooks when sending a message
Previously any hook functions attached to `notmuch-mua-send-hook' were
ignored.
2018-09-28 20:22:42 -03:00
David Edmondson
4e213fe9b4 test: Check that `notmuch-mua-send-hook' is called on sending a message 2018-09-28 20:22:33 -03:00
Vincent Breitmoser
5ae8ae13ba python: fix unchecked None access in get_property 2018-09-19 21:56:08 -03:00
David Bremner
2fd4e76006 debian: update notmuch-mutt packaging to use install target 2018-09-18 07:54:39 -03:00
David Bremner
ae45a0c19c debian: bump compat level to 11
The immediate motivation is to have dh_installman look in debian/tmp
2018-09-18 07:54:39 -03:00
David Bremner
84efbda925 contrib/notmuch-mutt: add install target
The main goal here is to be able to install the notmuch-mutt script
with an absolute shebang. I have tried to make the notmuch-mutt
Makefile use configure information from notmuch if available, but make
suitable guesses if not.
2018-09-18 07:54:33 -03:00
David Bremner
11d0edeac2 configure: absolute path of perl
This can be used to set shebang lines during install.
2018-09-18 07:34:33 -03:00
David Bremner
ef07e3f3bd build: install notmuch-emacs-mua with absolute shebang
Follow distro-centric rules to reduce the chance of surprising
behaviour due to PATH changes
2018-09-18 07:34:33 -03:00
David Bremner
aab395b2d4 configure: absolute path of bash
This can be used to set shebang lines during install.
2018-09-18 07:34:33 -03:00
David Bremner
c846e15ffe test: make regexp test conditional on field processors
Normally we'd mark it broken, but perversely missing regexp support
actually makes the test pass.
2018-09-14 08:54:20 -03:00
David Bremner
c6ba5522a5 test: mark thread subqueries broken without field processors
Currently these tests just fail when notmuch is built against Xapian
1.2.x
2018-09-14 08:54:09 -03:00
David Bremner
052b4d43c0 debian: add tar-ignore=.git
Unfortunately 514fb397c9 somewhat messed up the "debian-snapshot"
target, by including .git in the generated tarball.
2018-09-14 08:08:47 -03:00
David Bremner
8dcc38ce85 notmuch release 0.27-3 for unstable (sid) [dgit]
[dgit distro=debian]
 -----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCAAdFiEE3VS2dnyDRXKVCQCp8gKXHaSnniwFAluVRuMACgkQ8gKXHaSn
 niyEWwv9GP8BvUPXKcZdjJyLtZVzIaSerolf1Fq20Tp4qjOsuydjbez96ZuD0rST
 9w0+zwhyhMIAM0IMgsOChiJYYdJf596M/8hyaIz9aVNefKPy59IVQb/uc7qcdkdI
 M3kP/So5ADxPth4x8zlgNtKY8hc0XW4CwO4auCJJW+DGGFc+EJDY8KgKBz/oBJuu
 YF5zxoOMAbEQN+sQ6TilC+a+0uPgmoKzhys77n9kfZi+lLSP5cjY+Mr6/jgLibQB
 e/B+c0dSRKAL1VNpqSVUSvnIfO3hoaiiDa/XII2UXoZbJmHmxNvs1TBmaLNuR7VW
 U7oylX6jYeBIEHFrnoz2HLdk+r4DpVdBc6H4P4/dDeUE0ts3JaH5iivtbrPFCQ7U
 aKwIkbwkw9FHkzXDVtIohC87iOPuSuzQV0+chlQoJjfYD9SLG6PZdc44zY9qPlUC
 vo198JSLvF7P0FLgUav3U8HGwljqqgAhUMg3lmiopGdmib8m5yhseR9PZwivFy70
 jHNMxE7G
 =J7II
 -----END PGP SIGNATURE-----

Merge tag 'debian/0.27-3'

notmuch release 0.27-3 for unstable (sid) [dgit]
[dgit distro=debian]
2018-09-09 13:46:04 -03:00
David Bremner
514fb397c9 debian: drop argument-less tar-ignore
This hangs up dgit. It's probably not useful for users of the source
package to have debian/.gitignore, but it should not hurt.
2018-09-09 13:06:00 -03:00
David Edmondson
4cd5a0a3d5 test: Absolute and relative directory paths. 2018-09-08 20:19:42 -03:00
David Edmondson
95a9c73c72 notmuch: Database paths without a leading / are relative to $HOME
If the database path specified in the configuration file does *not*
start with a /, presume that it is relative to $HOME and modify the
path used to open the database accordingly.
2018-09-08 20:19:24 -03:00
David Bremner
68c3319f2d Declare fast forward from 0.27-2
[dgit --overwrite]
2018-09-08 18:20:10 -03:00
David Bremner
8feec188a0 debian: add unversioned emacs, drop emacs23
In current Debian sid / testing, emacs25 is a transitional package,
and emacs-gtk, emacs-lucid, and emacs-nox are the real packages.
Emacs 23 is not available in emacs after oldoldstable.
2018-09-09 12:43:06 -03:00
David Bremner
757f14a610 debian: update Vcs-Git URL
We should probably not git://, and it needs a branch to not confuse
e.g. vcswatch.
2018-09-09 12:42:59 -03:00
David Bremner
87934c432c lib: change parent strategy to use In-Reply-To if it looks sane
As reported by Sean Whitton, there are mailers (in particular the
Debian Bug Tracking System) that have sensible In-Reply-To headers,
but un-useful-for-notmuch References (in particular with the BTS, the
oldest reference is last). I looked at a sample of about 200K
messages, and only about 0.5% these had something other than a single
message-id in In-Reply-To. On this basis, if we see a single
message-id in In-Reply-To, consider that as authoritative.
2018-09-06 08:07:13 -03:00
David Bremner
b31e44c678 lib: add _notmuch_message_id_parse_strict
The idea is that if a message-id parses with this function, the MUA
generating it was probably sane, and in particular it's probably safe
to use the result as a parent from In-Reply-to.
2018-09-06 08:07:13 -03:00
David Bremner
b8e6f042c5 util/string-util: export skip_space
It's only few lines, but we already define the function, so make it
usable elsewhere
2018-09-06 08:07:13 -03:00
David Bremner
35053c2b9a test/thread-replies: mangle In-Reply-To's
In a future commit, we will start trusting In-Reply-To's when they
look sane (i.e. a single message-id). Modify these tests so they will
keep passing (i.e. keep choosing References) when that happens.
2018-09-06 08:07:13 -03:00
David Bremner
ea08032ae4 test: add known broken test for good In-Reply-To / bad References
The current scheme of choosing the replyto (i.e. the default parent
for threading purposes) does not work well for mailers that put
the oldest Reference last.
2018-09-06 08:07:13 -03:00
David Bremner
46dce33abc lib/thread: change _resolve_thread_relationships to use depths
We (finally) implement the XXX comment. It requires a bit of care not
to reparent all of the possible toplevel messages.

_notmuch_messages_has_next is not ready to be a public function yet,
since it punts on the mset case. We know in the one case it is called,
the notmuch_messages_t is just a regular list / iterator.
2018-09-06 08:07:13 -03:00
David Bremner
21803df6ae lib/thread: rewrite _parent_or_toplevel to use depths
This is part 1/2 of changing the reparenting of alleged toplevel
messages to use a "deep" reference rather than just the first one
found.
2018-09-06 08:07:13 -03:00
David Bremner
0a7181dd16 lib: calculate message depth in thread
This will be used in reparenting messages without useful in-reply-to,
but with useful references
2018-09-06 08:07:13 -03:00
David Bremner
a330858284 lib/thread: initial use of references as for fallback parenting
This is mainly to lay out the structure of the final code. The problem
isn't really solved yet, although some very simple cases are
better (hence the fixed test). We need two passes through the messages
because we need to be careful not to re-parent too many messages and
end up without any toplevel messages.
2018-09-06 08:07:13 -03:00
David Bremner
ac2146118b use EMPTY_STRING in _parent_via_in_reply_to
This is a review suggestion [1] of Tomi. I decided not to squash it
so that the code movement remains clear.

[1]: id:m2pnxxgf5q.fsf@guru.guru-group.fi
2018-09-06 08:07:13 -03:00
David Bremner
b9d4eb0412 lib/thread: refactor in_reply_to test
This is not a complete win in code-size, but it makes the code (which
is about to get more complicated) easier to follow.
2018-09-06 08:07:13 -03:00
David Bremner
dc3cc18bf0 lib: add _notmuch_message_list_empty
There is no public notmuch_message_list_t public interface, so to this
is added to the private API. We use it immediately in thread.cc;
future commits will use it further.
2018-09-06 08:07:13 -03:00
David Bremner
040fd630bf lib/thread: add macro for debug printing of threading
This is analogous to DEBUG_DATABASE_SANITY, and is intended to help
debugging and to help users submit bug reports.
2018-09-06 08:07:12 -03:00
David Bremner
d0b844b358 lib: read reference terms into message struct.
The plan is to use these in resolving threads.
2018-09-06 08:07:12 -03:00
David Bremner
9b568e73e1 lib/thread: sort sibling messages by date
For non-root messages, this should not should anything currently, as
the messages are already added in date order. In the future we will
add some non-root messages in a second pass out of order and the
sorting will be useful. It does fix the order of multiple
root-messages (although it is overkill for that).
2018-09-06 08:07:12 -03:00
David Bremner
ccb52edb4c test: add known broken tests for "ghost roots"
This documents the bug discussed at

     id:87efgmmysi.fsf@len.workgroup

The underlying issue is that the reply to a ghost (missing) message is
falsely classified as a root message in _resolve_thread_relationships.

There are two pairs of tests; in each case the the first test is
simpler / more robust, but also easier to fool.
2018-09-06 08:07:12 -03:00
David Bremner
ebd131ac07 test: start threading test corpus
There are 3 threads here, two synthetic, and one anonymized one using
data from Gregor. They test various aspects of thread
ordering/construction in the presence of replies to ghost messages.
2018-09-06 08:07:12 -03:00
David Bremner
dfda1745bf test/tag: add test for updating during batch tag operations
This clarifies that the breakage seen with Xapian 1.4.6 does not have
to do with "funny" tags.

This test is "known broken", but only with xapian 1.4.6, and there's
curently no convenient way to mark that.
2018-08-29 06:37:48 -03:00
Sebastian Poeplau
0f08bf7166 lib: detect mislabeled Windows-1252 parts
Use GMime functionality to detect mislabeled messages and apply the
correct (Windows) encoding instead.
2018-08-29 06:34:39 -03:00
Sebastian Poeplau
7074bb8f80 test: add known broken test for mislabeled Windows-1252 encoding
Messages that contain Windows-1252 are frequently mislabeled as ISO
8859-1, which may result in non-printable characters when displaying
the message. The test asserts that such characters (in this case
curved quotes) are displayed correctly.
2018-08-29 06:28:13 -03:00
David Edmondson
cfd015bda4 emacs: Kill the stderr buffer when an async process completes
On some platforms (e.g. macOS), it is necessary to add a real sentinel
process for the error buffer used by `notmuch-start-notmuch' rather
than a no-op sentinel.
2018-08-29 06:27:59 -03:00
David Bremner
9b1d10490e debian: changelog for 0.27-2 2018-06-28 21:07:31 -03:00
David Bremner
2f4beda434 notmuch (0.27-2) unstable; urgency=medium
* Add texinfo as a build-dep, build info version of documentation.

[dgit import unpatched notmuch 0.27-2]
2018-06-28 21:01:29 -03:00
David Bremner
d12a4f4a82 Import notmuch_0.27-2.debian.tar.xz
[dgit import tarball notmuch 0.27-2 notmuch_0.27-2.debian.tar.xz]
2018-06-28 21:01:29 -03:00
David Bremner
8964fad030 debian: add build depency on texinfo
This is needed to provide a makeinfo binary, to build the info version
of the documentation.
2018-06-28 20:58:04 -03:00
Daniel Kahn Gillmor
fd3c93650d doc: clean up manpages
Many of the manpages didn't treat literal text as literal text.  I've
tried to normalize some of the restructured text to make it a bit more
regular.

several of the synopsis lines are still untouched by this cleanup, but
i'm not sure what the right way to represent those is in .rst,
actually.

In particular find that if i rebuild the manpages, sometimes i end up
with some of the synopsis lines showing – (U+2013 EN DASH) where they
should have -- (2 × U+002D HYPHEN-MINUS) in the generated nroff
output, though i have not tracked down the source of this error yet.
2018-06-24 21:59:37 -03:00
Daniel Kahn Gillmor
0741e48c3d use #!/usr/bin/env python consistently 2018-06-14 20:38:20 -03:00
Jameson Graef Rollins
0a3dff7b8a minor cleanup to printmimestructure
make the source slightly easier to read.  no functional change.
2018-06-14 20:36:19 -03:00
Daniel Kahn Gillmor
8ca911d13b devel: make printmimestructure py3 compatible
Make printmimestructure work in python3 as well as python2.
2018-06-14 20:33:17 -03:00
Tomi Ollila
ea36e70d7a minor post-0.26 NEWS layout fixes
As usual, one notices these *after* release(s).
2018-06-14 20:26:50 -03:00
David Bremner
b0b1fde0cb notmuch 0.27 release
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCAAdFiEE3VS2dnyDRXKVCQCp8gKXHaSnniwFAlsg4j0ACgkQ8gKXHaSn
 niyYDQv/ZETykIyhoo2+Yi+om09PPo5EqanuCT28lHY33xCXbeeWX7p7tuPifeVP
 UXCvHnChbL/3aVnAx98kvydcT3n++3nfJBrXQ43SBRe8h3J26D9RpvXuga0xTMDA
 guCA/hTZiyOsSY8LqPwwFt/HuBLAR6Gu+mF0yTqwmeCZuSIXIDktrXdHXxBS3pVf
 AvNV5b3SUzEKl3pOlJrqJdRdL7+4215Z8plBeShQfOY2Ro+p1x3xEQr+qpBQzsWT
 Ye8yf3IEHM5OJtd5v5U7ROHseJpetow+IbQS5/vlK/+7BY3TWL64Z8I0nuV/RaRe
 uEdwpAOWuyVwLIih02eU19UMnGK0HsZriumWXRvgZBS0I1YmPvAiY8/g4O9M0eQn
 EOWDdFlYsL8vgUObo//JvLPTKg2nq3Ty9nXPVdPZXVyrM4dBA89Qz+N9JzMbtrPc
 A83xGRYZCoNOcGyfzSluL5iDV45jfEp9fGAikZvtdQhGowayrVpIlFwIxP0D4NC0
 h6901wud
 =j1wI
 -----END PGP SIGNATURE-----

Merge tag '0.27'

notmuch 0.27 release
2018-06-13 06:37:27 -03:00