Subject: bug#78579: closed (Re: bug#78579: 30.0.92; Global variant of delete-trailing-whitespace-mode)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 25 May 2025 10:08:02 +0000

Your bug report

#78579: 30.0.92; Global variant of delete-trailing-whitespace-mode

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
78579: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78579
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#78579: 30.0.92; Global variant of delete-trailing-whitespace-mode
From: Jake <[email-masked]>
To: Eli Zaretskii <[email-masked]>, [email-masked]
Cc: Stefan Monnier <[email-masked]>
Date: Sun, 25 May 2025 19:37:29 +0930
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks for explaining.  Closing

On Sun, 25 May 2025 at 1:20 am, Eli Zaretskii <[email-masked]> wrote:

> > Cc: [email-masked]
> > Date: Sat, 24 May 2025 11:14:24 -0400
> > From:  Stefan Monnier via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <[email-masked]>
> >
> > > `delete-trailing-whitespace-mode` was introduced in commit 8a19c249f81.
> > > Should there also be a `global-delete-trailing-whitespace-mode`?
> > > This would allow
> > >   (global-delete-trailing-whitespace-mode 1)
> > > and turning it off in an individual buffer with
> > >   (delete-trailing-whitespace-mode -1)
> >
> > To define such a mode, we'll need to know when to enable it and when
> > not: I'd be surprised if adding `delete-trailing-whitespace` globally
> > to `before-save-hook` doesn't cause problems in various circumstances.
> >
> > I don't have enough experience with that, so I'll let others decide if
> > and how to do it.
>
> I share the fears expressed by Stefan.  I think that such a global
> mode would be more dangerous than it's useful.  After all, it's easy
> to add the activation of the local minor mode to mode-hook of any
> modes one wants.
>

Subject: 30.0.92; Global variant of delete-trailing-whitespace-mode
From: Jake <[email-masked]>
To: [email-masked]
Cc: Stefan Monnier <[email-masked]>
Date: Sat, 24 May 2025 13:48:44 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

`delete-trailing-whitespace-mode` was introduced in commit 8a19c249f81.
Should there also be a `global-delete-trailing-whitespace-mode`?
This would allow
  (global-delete-trailing-whitespace-mode 1)
and turning it off in an individual buffer with
  (delete-trailing-whitespace-mode -1)

Thanks
Jake