unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* inhibit-message variant that doesn't even log to *Messages*
@ 2019-01-31  8:08 Gergely Risko
  2019-01-31  8:39 ` Robert Pluim
  2019-01-31  8:52 ` Eli Zaretskii
  0 siblings, 2 replies; 4+ messages in thread
From: Gergely Risko @ 2019-01-31  8:08 UTC (permalink / raw)
  To: emacs-devel

Hi,

I use more and more packages that provide some functionality by doing
something periodically.

A recent example is sync-recentf: https://github.com/ffevotte/sync-recentf

When sync-recentf decides to periodically save the recent file, a lot of
messages get written with the `message' function.

I worked around most if this with:

    (defadvice recentf-cleanup (around nce/recentf-cleanup activate)
      (let ((inhibit-message t))
        ad-do-it))

My problem is that, these messages still get logged to *Messages*, so if
I set the frequency to every 15 seconds, and try to debug something
unrelated in Elisp, then these messages get to be annoying a bit.

Would there be any downside to providing an additional variable (under
the name `inhibit-message-fundamentally' or such) that would inhibit
message printing altogether (echo area AND *Messages*)?

Would there be willingness to merge this if I were to work on this?

flet, letf, cl-letf and the like will not work for me, because some of
the messages I'm interested in temporarily disabling are coming from C
code.

Cheers,
Gergely




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: inhibit-message variant that doesn't even log to *Messages*
  2019-01-31  8:08 inhibit-message variant that doesn't even log to *Messages* Gergely Risko
@ 2019-01-31  8:39 ` Robert Pluim
  2019-01-31  8:52 ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Robert Pluim @ 2019-01-31  8:39 UTC (permalink / raw)
  To: Gergely Risko; +Cc: emacs-devel

Gergely Risko <gergely@risko.hu> writes:

> Hi,
>
> I use more and more packages that provide some functionality by doing
> something periodically.
>
> A recent example is sync-recentf: https://github.com/ffevotte/sync-recentf
>
> When sync-recentf decides to periodically save the recent file, a lot of
> messages get written with the `message' function.
>
> I worked around most if this with:
>
>     (defadvice recentf-cleanup (around nce/recentf-cleanup activate)
>       (let ((inhibit-message t))
>         ad-do-it))
>
> My problem is that, these messages still get logged to *Messages*, so if
> I set the frequency to every 15 seconds, and try to debug something
> unrelated in Elisp, then these messages get to be annoying a bit.
>
> Would there be any downside to providing an additional variable (under
> the name `inhibit-message-fundamentally' or such) that would inhibit
> message printing altogether (echo area AND *Messages*)?
>

Would a special value for inhibit-message not be easier?

> Would there be willingness to merge this if I were to work on this?

I wouldnʼt  mind, but Iʼm not the maintainer :-)

Robert



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: inhibit-message variant that doesn't even log to *Messages*
  2019-01-31  8:08 inhibit-message variant that doesn't even log to *Messages* Gergely Risko
  2019-01-31  8:39 ` Robert Pluim
@ 2019-01-31  8:52 ` Eli Zaretskii
  2019-01-31  9:34   ` Gergely Risko
  1 sibling, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2019-01-31  8:52 UTC (permalink / raw)
  To: emacs-devel, Gergely Risko

On January 31, 2019 10:08:29 AM GMT+02:00, Gergely Risko <gergely@risko.hu> wrote:
> Hi,
> 
> I use more and more packages that provide some functionality by doing
> something periodically.
> 
> A recent example is sync-recentf:
> https://github.com/ffevotte/sync-recentf
> 
> When sync-recentf decides to periodically save the recent file, a lot
> of
> messages get written with the `message' function.
> 
> I worked around most if this with:
> 
>     (defadvice recentf-cleanup (around nce/recentf-cleanup activate)
>       (let ((inhibit-message t))
>         ad-do-it))
> 
> My problem is that, these messages still get logged to *Messages*, so
> if
> I set the frequency to every 15 seconds, and try to debug something
> unrelated in Elisp, then these messages get to be annoying a bit.
> 
> Would there be any downside to providing an additional variable (under
> the name `inhibit-message-fundamentally' or such) that would inhibit
> message printing altogether (echo area AND *Messages*)?
> 
> Would there be willingness to merge this if I were to work on this?
> 
> flet, letf, cl-letf and the like will not work for me, because some of
> the messages I'm interested in temporarily disabling are coming from C
> code.
> 
> Cheers,
> Gergely

Is there any problem in binding message-log-max to a nil value?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: inhibit-message variant that doesn't even log to *Messages*
  2019-01-31  8:52 ` Eli Zaretskii
@ 2019-01-31  9:34   ` Gergely Risko
  0 siblings, 0 replies; 4+ messages in thread
From: Gergely Risko @ 2019-01-31  9:34 UTC (permalink / raw)
  To: emacs-devel

On 2019-01-31 10:52 (Thursday), Eli Zaretskii <eliz@gnu.org> writes:
> Is there any problem in binding message-log-max to a nil value?

No, the only problem was my inadequacy in finding this in the manual.
I read the stuff close to inhibit-message, but message-log-max was
somewhere else.

Thank you for your kind support, it works perfectly!

Cheers,
Gergely




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-31  9:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-31  8:08 inhibit-message variant that doesn't even log to *Messages* Gergely Risko
2019-01-31  8:39 ` Robert Pluim
2019-01-31  8:52 ` Eli Zaretskii
2019-01-31  9:34   ` Gergely Risko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).