Subject: Re: bug#65864: [PATCH] Add option to save a buffer without running save hooks

From: Eli Zaretskii <[email-masked]>
Date: Mon, 11 Sep 2023 15:45:39 +0300

> Date: Mon, 11 Sep 2023 12:24:40 +0200
> From:  Daniel Martín via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> Users can customize `before-save-hook' to add things like
> `delete-trailing-whitespace' or `copyright-update'.  However, there are
> cases where you want to save a buffer without running any save hooks
> without changing your configuration and then changing it back.
> 
> I've attached a patch to make `save-buffer', when invoked with a
> negative argument (C-u - C-x C-s), temporarily avoid running any save
> hooks.

Should we perhaps consider a more general approach: run a command
while disabling the hooks it calls?  It sounds strange to me to single
out just this one command.

I'm interested in hearing Stefan's opinions on this (as well as those
of anyone else who wants to speak up).