emacs-devel
[Top][All Lists]
Advanced

[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:53:14 +0100

There are some C-level functions that send messages without using
`message', but these are very few.
There's also an emacs package dedicated to muting messages, I think
it's called `shut-up' (or something like that).

2015-04-09 15:50 GMT+01:00 Artur Malabarba <address@hidden>:
>>> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]