[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: disable messaging in echo area
From: |
Eli Zaretskii |
Subject: |
Re: disable messaging in echo area |
Date: |
Thu, 09 Dec 2010 09:32:32 -0500 |
> Date: Wed, 08 Dec 2010 15:35:43 +0000
> From: Daniel Carvalho <idnael@gmail.com>
>
> I have a function that runs in background every 10 seconds (with
> run-at-time). That function saves a file, and this causes a message to
> be displayed in the echo-area. I want to disable this message...
What does the message say? If it says "Wrote /foo/bar", then you
cannot disable it from Lisp, currently: this message comes from the
write-region primitive on the C level, not from a call to Lisp-level
function `message'. The message which precedes that, the one which
says "Saving file /foo/bar...", should be disabled by flet-binding
`message' to nil, I think.
> there was already a thread about that :
> http://lists.gnu.org/archive/html/help-gnu-emacs/2009-08/msg00374.html
>
>
> But the pointed solutions don't work
>
> (flet ((message (&rest args) nil))
> (message "test")
> (write-file file)
> )
> - the "test" message is not displayed, but the "write file" is still
> displayed!
>
>
> (let (message-log-max)
> (write-file file)
> )
> - no effect!
No amount of fiddling with Lisp-level `message' facilities will be
ever able to do what you want. I suggest to file a feature request
(with "M-x report-emacs-bug RET") asking for a variable that could be
bound to disable all messages, even those coming from the C level.