[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unwind-protect within while-no-input
From: |
Daniel Mendler |
Subject: |
Re: unwind-protect within while-no-input |
Date: |
Sun, 12 May 2024 00:08:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Dmitry Gutov <dmitry@gutov.dev> writes:
> On 11/05/2024 13:42, Zhengyi Fu wrote:
>>> I'm writing a completion-at-point-function and completion table. This
>>> table internally uses asynchronous subprocesses to get completions.
>>>
>>> This completion-at-point-function and table may be called by the popular
>>> completion frontend corfu-mode. corfu-mode uses while-no-input around
>>> calls to completion tables.
>>>
>>> I want to ensure that my asynchronous subprocesses are deleted even if
>>> my code is interrupted by corfu's while-no-input.
>>>
>>> I can't change the protocol of completion tables or
>>> completion-at-point-functions (that's defined by Emacs), and I'm not the
>>> one calling while-no-input (that's corfu-mode).
>>>
>> Is cape-wrap-noninterruptible from the cape package helpful?
>
> It should help, but it would be odd if any non-trivial completion function
> would
> need to use cape to function inside corfu-mode reliably.
cape-wrap-noninterruptible and similarly cape-wrap-silent and
cape-wrap-purify are meant as stop gap measures, used to wrap non-robust
Capfs, until they are improved. There are multiple Capfs in the wild
which regularly print messages or throw unexpected errors. For example,
pcomplete-completions-at-point even modified the buffer until Emacs 29,
which could be mitigated with cape-wrap-purify.
Daniel
- Re: unwind-protect within while-no-input, (continued)
- Re: unwind-protect within while-no-input, Eli Zaretskii, 2024/05/08
- Re: unwind-protect within while-no-input, Michael Heerdegen, 2024/05/08
- Re: unwind-protect within while-no-input, Spencer Baugh, 2024/05/09
- Re: unwind-protect within while-no-input, Eli Zaretskii, 2024/05/09
- Re: unwind-protect within while-no-input, Spencer Baugh, 2024/05/09
- Re: unwind-protect within while-no-input, Dmitry Gutov, 2024/05/09
- Re: unwind-protect within while-no-input, Eli Zaretskii, 2024/05/11
- Re: unwind-protect within while-no-input, Eshel Yaron, 2024/05/11
- Re: unwind-protect within while-no-input, Zhengyi Fu, 2024/05/11
- Re: unwind-protect within while-no-input, Dmitry Gutov, 2024/05/11
- Re: unwind-protect within while-no-input,
Daniel Mendler <=
- Re: unwind-protect within while-no-input, Dmitry Gutov, 2024/05/11
- Re: unwind-protect within while-no-input, Daniel Mendler, 2024/05/12
- Re: unwind-protect within while-no-input, Dmitry Gutov, 2024/05/12
- Re: unwind-protect within while-no-input, Dmitry Gutov, 2024/05/14
- Re: unwind-protect within while-no-input, Stefan Monnier, 2024/05/25
- Re: unwind-protect within while-no-input, Dmitry Gutov, 2024/05/26
- Re: unwind-protect within while-no-input, Stefan Monnier, 2024/05/26
- Re: unwind-protect within while-no-input, Dmitry Gutov, 2024/05/26
- Re: unwind-protect within while-no-input, Stefan Monnier, 2024/05/28
- Re: unwind-protect within while-no-input, Dmitry Gutov, 2024/05/28