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: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tyler Grinn <tylergrinn <at> gmail.com>
Cc: "51041 <at> debbugs.gnu.org" <51041 <at> debbugs.gnu.org>, Stefan Kangas <stefan <at> marxist.se>, Drew Adams <drew.adams <at> oracle.com>
Subject: bug#51041: [External] : Re: bug#51041: 28.0.60; toggle-truncate-lines should not print message
Date: Thu, 07 Oct 2021 19:42:58 +0200
Tyler Grinn <tylergrinn <at> gmail.com> writes:

> My understanding is that if some functionality or minor mode provides a
> function to toggle it, it is a best practice to use that function rather
> than re-implement it, such that if the behavior of the toggle function
> changes my code doesn't have to change.

We have a number of commands that are meant to be used for interactive
use only (and will give a warning if used from code).  We also have some
commands that are OK to use from code, but only if that code is
user-oriented, and `toggle-truncate-lines' seems very much like that.

Normal code that needs to change truncate-lines should just set the
variable -- which is what happens already.  There's about a hundred
instances of "setq.*truncate-lines" in the Emacs tree, while there's
three calls to `toggle-truncate-lines' (and all are from code that are
user oriented and should message).

So I agree with Stefan -- altering `toggle-truncate-lines' like
suggested isn't appropriate, and I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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.