[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Async package.el
From: |
Artur Malabarba |
Subject: |
Re: Async package.el |
Date: |
Thu, 9 Apr 2015 15:50:43 +0100 |
>> I need to find a
>> way of telling #'message not to talk when called from an async
>> task -- or more generally, if called from anything except the main UI
>> thread. Any ideas?
>
> Is something like this too hackish?
>
> (cl-letf (((symbol-function 'message) 'ignore))
> whatever)
>
This is generally what I do too. IIRC, the only drawback is that this
uses unwind-protect, which is not triggered by the max-lisp-eval-depth
error. So if you hit that error, message's function definition won't
be restored.
You can either just live with that, or you can wrap the code inside
the `cl-letf' in a `condition-case' statement and to catch that error.
- Async package.el, Artur Malabarba, 2015/04/06
- Re: Async package.el, Dmitry Gutov, 2015/04/06
- Re: Async package.el, Artur Malabarba, 2015/04/06
- Re: Async package.el, Dmitry Gutov, 2015/04/06
- Re: Async package.el, Stefan Monnier, 2015/04/07
- Re: Async package.el, Dmitry Gutov, 2015/04/07
- Re: Async package.el, Stefan Monnier, 2015/04/08
- Re: Async package.el, Dmitry Gutov, 2015/04/08
- Re: Async package.el, raman, 2015/04/09
- Re: Async package.el, Rasmus, 2015/04/09
- Re: Async package.el,
Artur Malabarba <=
- Re: Async package.el, Artur Malabarba, 2015/04/09
- async message, Ivan Shmakov, 2015/04/09
- Re: async message, raman, 2015/04/10
- Re: Async package.el, raman, 2015/04/09
- Re: Async package.el, Stefan Monnier, 2015/04/09
- Re: Async package.el, raman, 2015/04/10
- Re: Async package.el, Artur Malabarba, 2015/04/11
- Re: Async package.el, Stefan Monnier, 2015/04/11
- Re: Async package.el, Artur Malabarba, 2015/04/07
- Re: Async package.el, Dmitry Gutov, 2015/04/07