Re: [PATCH 1/2] emacs: Use pcase in notmuch-search-insert-field

Subject: Re: [PATCH 1/2] emacs: Use pcase in notmuch-search-insert-field

Date: Tue, 16 Feb 2021 01:24:09 +0100

To: David Bremner, David Edmondson, notmuch@notmuchmail.org

Cc:

From: Jonas Bernoulli


> David Edmondson <dme@dme.org> writes:
> 2. A glance at the pcase docs suggests the cond wrapping pcase can be
>    avoided by using (pred functionp). Of course I've not actually tried
>    it.

(pcase field
  ((pred functionp)
   (insert (funcall field format-string result)))
  ("date"
   ...))

works.  Tried it, because I haven't done this much yet.

     Jonas
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: