Subject: bug#51041: [External] : Re: bug#51041: 28.0.60; toggle-truncate-lines should not print message

From: Stefan Kangas <[email-masked]>
Date: Tue, 5 Oct 2021 20:28:29 -0400

Drew Adams <[email-masked]> writes:

> This corresponds to what we recommend.  We do NOT
> recommend testing with `called-interactively', for
> example.  There's no reason to hard-code whether a
> command called from Lisp can emit a message.  Using
> an optional arg MSG or NOMSG is TRT.
>
> There's lots of old code that does hard-code things
> here.  `count-words' and `count-words-region' are
> good examples of such bad examples.

So this is about avoiding `called-interactively-p'?  If so, I think an
argument is indeed the way to do that.

Another solution would be to have one function meant for interactive
use, and another one for use from Lisp.  That might be too much in this
case, though, as this function seems somewhat uncommon.

A third one would be to do nothing, and say: it's up to the caller to
just call (message "") to clear the echo area, if they don't want the
message there.

But actually, isn't the way to truncate lines just to say this?

    (setq truncate-lines t)

In summary, I don't think I understand the use-case here.