GNU bug report logs - #51041
28.0.60; toggle-truncate-lines should not print message

Previous Next

Package: emacs;

Reported by: Tyler Grinn <tylergrinn <at> gmail.com>

Date: Tue, 5 Oct 2021 18:03:01 UTC

Severity: normal

Tags: moreinfo, wontfix

Found in version 28.0.60

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: "51041 <at> debbugs.gnu.org" <51041 <at> debbugs.gnu.org>, Tyler Grinn <tylergrinn <at> gmail.com>
Subject: bug#51041: [External] : Re: bug#51041: 28.0.60; toggle-truncate-lines should not print message
Date: Tue, 5 Oct 2021 20:28:29 -0400
Drew Adams <drew.adams <at> oracle.com> 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.




This bug report was last modified 3 years and 224 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.