diff options
author | Marius Bakke <mbakke@fastmail.com> | 2016-10-05 15:12:14 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2016-10-19 17:00:37 +0100 |
commit | 6cf27c89a579fa7db3c6d4b2ad45fbfda1553f6c (patch) | |
tree | 1279c108337b570639c44cf6598ad1bedcd72486 /gnu/packages/patches | |
parent | 540d6cc71111809a765d429188868ec3450f77d7 (diff) |
gnu: notmuch: Enable tests.
* gnu/packages/patches/notmuch-emacs-25-compatibility-fix.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/mail.scm (notmuch)[source]: Use patch.
[arguments]: Add verbose make flags. Add phase 'patch-notmuch-lib.el' to
fix hard-coded /bin/sh. Add 'prepare-test-environment' phase to patch
test shebangs and set environment.
[native-inputs]: Change from 'emacs-minimal' to 'emacs-no-x'. Add dtach,
gnupg, man, perl and which.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/notmuch-emacs-25-compatibility-fix.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/patches/notmuch-emacs-25-compatibility-fix.patch b/gnu/packages/patches/notmuch-emacs-25-compatibility-fix.patch new file mode 100644 index 0000000000..9ddfd4fe10 --- /dev/null +++ b/gnu/packages/patches/notmuch-emacs-25-compatibility-fix.patch @@ -0,0 +1,46 @@ +This fixes a test failure with emacs-25. Picked from +https://git.notmuchmail.org/git?p=notmuch;a=commit;h=f575a346df09c82691bb9e7c462836d982fe31f7 + +From f575a346df09c82691bb9e7c462836d982fe31f7 Mon Sep 17 00:00:00 2001 +From: David Bremner <david@tethera.net> +Date: Sun, 9 Oct 2016 19:30:44 -0300 +Subject: [PATCH] emacs/show: force notmuch-show-buttonise-links to act on + lines + +This seems to fix a problem with emacs 25 creating partial buttons by +calling n-s-b-l with a region that does not include the whole button. +I'm not 100% sure it's legit to act outside the region passed by +jit-lock, but goto-address-fontify-region (where I borrowed the code +from) already does this, so this patch to not make things worse. +--- + emacs/notmuch-show.el | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +index 641398d..e7d16f8 100644 +--- a/emacs/notmuch-show.el ++++ b/emacs/notmuch-show.el +@@ -1174,13 +1174,15 @@ This also turns id:\"<message id>\"-parts and mid: links into + buttons for a corresponding notmuch search." + (goto-address-fontify-region start end) + (save-excursion +- (let (links) +- (goto-char start) +- (while (re-search-forward notmuch-id-regexp end t) ++ (let (links ++ (beg-line (progn (goto-char start) (line-beginning-position))) ++ (end-line (progn (goto-char end) (line-end-position)))) ++ (goto-char beg-line) ++ (while (re-search-forward notmuch-id-regexp end-line t) + (push (list (match-beginning 0) (match-end 0) + (match-string-no-properties 0)) links)) +- (goto-char start) +- (while (re-search-forward notmuch-mid-regexp end t) ++ (goto-char beg-line) ++ (while (re-search-forward notmuch-mid-regexp end-line t) + (let* ((mid-cid (match-string-no-properties 1)) + (mid (save-match-data + (string-match "^[^/]*" mid-cid) +-- +2.10.1 + |