Re: notmuch.el, needs without-restriction to properly save draft

Subject: Re: notmuch.el, needs without-restriction to properly save draft

Date: Mon, 17 Jun 2024 11:28:21 -0300

To: Marc Fargas

Cc: notmuch@notmuchmail.org, Michael J Gruber

From: David Bremner


Marc Fargas <telenieko@telenieko.com> writes:

> Hi,
>
> El lun. 17 de jun. 2024, Marc escribió:
>>
>> El lun. 17 de jun. 2024, Michael escribió:
>>>> (...)
>>>
>>> Does this depend on emacs version by any chance, i.e. is
>>> `without-restriction` defined on all emacsen? In Fedora's copr
>>> infrastructure, all builds succeed but some tests fail with
>>> `Symbol'€™s function definition is void: without-restriction`. The
>>> picture is the following:
>
> So, I will have to update the patch in order to make the use of
> `without-restriction` conditional on its availability.
>
> I asked on Emacs chat @ Matrix on how to do this nicely and yantar92
> (org contributor) proposed the following macro:
>
>    (defmacro notmuch--without-restriction (&rest body)
>      "Run BODY within `without-restriction', when it is available."
>      (declare (debug (body)))
>      (if (fboundp 'without-restriction)
>          `(without-restriction ,@body)
>        `(progn ,@body)))

Assuming fboundp works for macros (without-restriction is a macro), then
sure
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: