Subject: Re: bug#31627: 27.0.50; isearch prompt not shown when `inhibit-message` is set to `t`

From: Christian Schwarzgruber <[email-masked]>
Date: Tue, 29 May 2018 07:37:37 +0200

Thank you for clarification!

With that "docstring" things are now clear to me.

-Christian

Tino Calancha <[email-masked]> writes:

> Christian Schwarzgruber <[email-masked]> writes:
>
>> Hello Everybody!
>>
>> (setq inhibit-message t) hides isearch prompt. Is this defined behavior
>> or a bug?
> Its use is not intended to be set globally by users, because you don't
> want to suppress all the calls to `message'; `message' is a common way
> for Emacs to talk with its users, ask them for input or whatever.
> Maybe something could be added in its docstring to make the point clear.
>
> This var is mainly used by package developers in a controlled way:
> typically by locally let-binding it around an expression.  For example,
> imagine the package `foo' having an user option
> `foo-verbose' to display/suppress not very important messages:
>
> (defcustom foo-verbose t
>   "If nil, suppress some messages"
>   :type 'boolean
>   :group 'foo)
>
> (defun foo-set-vars ()
>   (message "Setting package variables!")
>   (setq foo-mint 100)
>   (setq foo-star -1))
>
> (defun foo-start ()
>   (foo-procastinate-response)
>   (message "Initialisation complete!"))
>
> (defun foo-initialize ()
>   (let ((inhibit-message (not verbose)))
>     (foo-set-vars)
>     (foo-start)))
>
> That would be OK.
> Another typical use is to suppress garbage messages
> when writing tests.