[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a way to inhibit message3 from Elisp?

From: Artur Malabarba
Subject: Re: Is there a way to inhibit message3 from Elisp?
Date: Wed, 22 Apr 2015 00:25:09 +0100

That C code is a little hard for me to understand, but it looks like
you're inhibitting both echoing (minibuffer) and logging (messages
buffer). If that's the case, please don't inhibit the latter.

2015-04-21 19:50 GMT+01:00 Oleh Krehel <address@hidden>:
> Stefan Monnier <address@hidden> writes:
>>> My particular use-case is that I'm doing completion in the minibuffer
>>> with ivy.el, calling `shell-command-to-string' in the `post-command-hook'.
>>> And when I enable `while-no-input' in my function, my minibuffer
>>> contents get rudely interrupted by `call_process_cleanup' saying:
>>>> "Waiting for process to die...done"
>>> I'm sure that this message is needed and appericated,
>> Actually, I'm not.  IIUC this message appears if a call-process is
>> interrupted before the subprocess dies.   I think this message in not
>> desired in general.  It's OK to emit such a message if call-process ends
>> up waiting a non-negligible amount of time for the subprocess to die
>> (so as to explain to the user why Emacs is not responding), but for the
>> usual case where wait_for_termination returns quickly, we should not
>> emit any message at all.
>> Patch welcome to fix this problem.
> Please check the scratch/inhibit-message3 branch.
> I don't have experience with Emacs C code, let me know if I'm doing
> something in a silly way.
> I got this code to work as I expect:
> (progn
>   (setq inhibit-message t)
>   (message "foo")
>   (setq inhibit-message nil))
> However, this doesn't work:
> (let ((inhibit-message t))
>   (message "foo"))
> And I don't know why.
> Oleh

reply via email to

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