* disable messaging in echo area
@ 2010-12-08 15:35 Daniel Carvalho
2010-12-09 14:32 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Carvalho @ 2010-12-08 15:35 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 608 bytes --]
hi
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...
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!
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 554 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: disable messaging in echo area
2010-12-08 15:35 disable messaging in echo area Daniel Carvalho
@ 2010-12-09 14:32 ` Eli Zaretskii
2010-12-10 4:26 ` Drew Adams
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Eli Zaretskii @ 2010-12-09 14:32 UTC (permalink / raw)
To: help-gnu-emacs
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: disable messaging in echo area
2010-12-09 14:32 ` Eli Zaretskii
@ 2010-12-10 4:26 ` Drew Adams
2010-12-10 11:30 ` daniel
[not found] ` <mailman.86.1291980649.5417.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2010-12-10 4:26 UTC (permalink / raw)
To: 'Eli Zaretskii', help-gnu-emacs
> 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.
Yes, please do.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: disable messaging in echo area
2010-12-09 14:32 ` Eli Zaretskii
2010-12-10 4:26 ` Drew Adams
@ 2010-12-10 11:30 ` daniel
[not found] ` <mailman.86.1291980649.5417.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 5+ messages in thread
From: daniel @ 2010-12-10 11:30 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 378 bytes --]
> 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.
>
>
hi
the write-region with visit argument solved the problem!
Anyway I filled the bug report.
[-- Attachment #2: Type: text/html, Size: 759 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: disable messaging in echo area
[not found] ` <mailman.86.1291980649.5417.help-gnu-emacs@gnu.org>
@ 2010-12-11 1:38 ` jpkotta
0 siblings, 0 replies; 5+ messages in thread
From: jpkotta @ 2010-12-11 1:38 UTC (permalink / raw)
To: help-gnu-emacs
On Dec 10, 5:30 am, daniel <idn...@gmail.com> wrote:
> > 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.
>
> hi
> the write-region with visit argument solved the problem!
>
> Anyway I filled the bug report.
A more general solution might be to use with-temp-message. This logs
to the *Messages* buffer but doesn't put anything in the echo area:
(defun write-foo ()
(interactive)
(with-temp-message ""
(write-region (point-min) (point-max) "foo")))
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-11 1:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-08 15:35 disable messaging in echo area Daniel Carvalho
2010-12-09 14:32 ` Eli Zaretskii
2010-12-10 4:26 ` Drew Adams
2010-12-10 11:30 ` daniel
[not found] ` <mailman.86.1291980649.5417.help-gnu-emacs@gnu.org>
2010-12-11 1:38 ` jpkotta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).