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

From: Drew Adams <[email-masked]>
Date: Wed, 6 Oct 2021 22:12:16 +0000

> >> What is the use-case for calling it from Lisp?
> >
> > What is the use case for hard-coding behavior
> > based on called-interactively?
> 
> Drew, it is draining to discuss this way.  I have alredy agreed that
> an argument is better than 'called-interactively-p'.  No one is
> arguing for that.  Please drop it.  Read the thread.
> 
> The argument is that from Lisp you can just set the `truncate-lines'
> variable instead of calling `toggle-truncate-lines'.
> 
> Does that not work?  If it doesn't, please explain the use-case.

Stefan - it's draining to discuss this way.

No one has argued that a command should invoke
`toggle-truncate-lines' instead of setting var
`truncate-lines'.  Please drop it.  Read the
thread.

You're free to close the bug as not-a-bug or
whatever.  The bug report asks _how to invoke
the command from Lisp_ without printing a msg.
You're free to tell the OP to just not do that.

The point is that the command _need not_ have
hard-coded behavior that always prints a msg.
That just complicates things needlessly.

It could simply follow the guidelines and thus
(1) print when invoked interactively and (2)
provide a way to invoke it without printing
(and with the bonus, not provided by setting
the variable, that code _can_ instead choose
to _show_ the message).

The command should have been coded in the
conventional way from the beginning (you
apparently agree now).  Is it worth fixing,
to DTRT now?  That's not my call.  Please
stop haranguing me (present examples etc.).
You will anyway do what you want.

But if you'd like to respond to the actual
bug report, and not just close as won't-fix,
then (you apparently agree) the right fix is
to follow the guideline: add "&optional msg"
for message control.

Do I care whether you do that?  Not a bit.
(Maybe a tiny bit, wishing the best for Emacs.)

Just trying to help, by being clear about how
the command _should_ have been coded (IMHO -
and following the convention, which is a good
one).  You agree with that now.  Underbar.

(Oh, BTW: `toggle-truncate-lines' does more
than change the variable value and print a msg,
in particular when turning off truncation.)