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


Message #14 received at 51041 <at> debbugs.gnu.org (full text, mbox):

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: Re: bug#51041: 28.0.60; toggle-truncate-lines should not print message
Date: Tue, 5 Oct 2021 17:39:00 -0400
Drew Adams <drew.adams <at> oracle.com> writes:

>> (toggle-truncate-lines t)
>>
>> Prints the message "Truncate long lines enabled". When called from
>> elisp, this message should be ignored. If called interactively, the
>> message should be displayed.
>
> Yes.
>
> But the right fix is to add "&optional msg",
> use (interactive "P\np"), and test for non-nil
> MSG as the condition for showing the message.
>
> Lisp code for a command can use that toggle
> function, and when _that_ command is invoked
> interactively it too might make sense to show
> the message (that can depend on the command
> and when the toggling occurs as part of it).
>
> The same kind of fix is no doubt appropriate
> for some other existing commands that instead
> just test `called-interactively-p'.  Surely
> we shouldn't perpetuate such design by adding
> more such.

I don't think it's worth making the call signature of
`toggle-truncate-lines' more complicated just for the purpose of showing
a message.

Why should a different command want to show this message?  Why can't
that calling Lisp code just show an appropriate message itself?
Do we have a concrete use-case for it, or is it just a "maybe nice to
have"?




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

Previous Next


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