Re: [PATCH v2 00/36] [emacs] Add outline headings and switch to lexical scope

Subject: Re: [PATCH v2 00/36] [emacs] Add outline headings and switch to lexical scope

Date: Wed, 13 Jan 2021 15:02:45 +0200

To: David Bremner, Jonas Bernoulli, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Wed, Jan 13 2021, David Bremner wrote:

> Jonas Bernoulli <jonas@bernoul.li> writes:
>
>> This fixes a minor whitespace bug that Tomi notices in (1).
>>
>> This also adds for commits, two of them in response to a concern
>> raised by Tomi, who didn't "see enough point for requiring subr-x
>> just [for string-empty-p]", which I agree with:
>>
>> 2) Changes how `cl-lib' and `pcase' are required.  I did that first
>>    because I want to do it the same way as for `subr-x'.
>>
>> 3) Require `subr-x', so that we can use it without having to worry
>>    whether we have now reached the threshold where it becomes
>>    justified to require an additional library.
>
> I pushed applied the first 22 patches to master.
>
> "[PATCH v2 23/36] emacs: various cosmetic improvements" leads to some
> test failures. FWIW, I'm using Emacs 27.1 on Debian testing.

I got the same.

After some trial and error w/ "educated guesses", reverting this change
in notmuch-maildir-fcc.el (git diff from my tree after revert), 
test passed.

in emacs/notmuch-maildir-fcc.el


@@ -107,13 +107,16 @@ (defun notmuch-fcc-header-setup ()
           ;; Old style - no longer works.
           (error "Invalid `notmuch-fcc-dirs' setting (old style)"))
          ((listp notmuch-fcc-dirs)
-          (or (seq-some (let ((from (message-field-value "From")))
-                          (pcase-lambda (`(,regexp ,folder))
-                            (and (string-match-p regexp from)
-                                 folder)))
-                        notmuch-fcc-dirs)
-              (progn (message "No Fcc header added.")
-                     nil)))
+          (let* ((from (message-field-value "From"))
+                 (match
+                  (catch 'first-match
+                    (dolist (re-folder notmuch-fcc-dirs)
+                      (when (string-match-p (car re-folder) from)
+                        (throw 'first-match re-folder))))))
+            (if match
+                (cdr match)
+              (message "No Fcc header added.")
+              nil)))


>
> T310-emacs: Testing emacs interface
>  FAIL   notmuch-fcc-dirs set to a list (with match)
> 	--- T310-emacs.28.EXPECTED	2021-01-13 12:00:57.901428602 +0000
> 	+++ T310-emacs.28.OUTPUT	2021-01-13 12:00:57.905428701 +0000
> 	@@ -1,5 +0,0 @@
> 	-From: Notmuch Test Suite <test_suite@notmuchmail.org>
> 	-To: 
> 	-Subject: 
> 	-Fcc: /home/bremner/software/upstream/notmuch/test/tmp.T310-emacs/mail/sent-list-match
> 	---text follows this line--
> *ERROR*: Wrong type argument: listp, "sent-list-match"
>  FAIL   notmuch-fcc-dirs set to a list (catch-all)
> 	--- T310-emacs.29.EXPECTED	2021-01-13 12:00:57.933429400 +0000
> 	+++ T310-emacs.29.OUTPUT	2021-01-13 12:00:57.933429400 +0000
> 	@@ -1,5 +0,0 @@
> 	-From: Notmuch Test Suite <test_suite@notmuchmail.org>
> 	-To: 
> 	-Subject: 
> 	-Fcc: /home/bremner/software/upstream/notmuch/test/tmp.T310-emacs/mail/sent-list-catch-all
> 	---text follows this line--
> *ERROR*: Wrong type argument: listp, "failure"
>  FAIL   notmuch-fcc-dirs set to a list (no match)
> 	--- T310-emacs.30.EXPECTED	2021-01-13 12:00:57.953429900 +0000
> 	+++ T310-emacs.30.OUTPUT	2021-01-13 12:00:57.957430000 +0000
> 	@@ -1,4 +0,0 @@
> 	-From: Notmuch Test Suite <test_suite@notmuchmail.org>
> 	-To: 
> 	-Subject: 
> 	---text follows this line--
> *ERROR*: Wrong type argument: listp, "failure"
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: