all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Daniel Martín" <mardani29@yahoo.es>
Cc: 65864@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#65864: [PATCH] Add option to save a buffer without running save hooks
Date: Mon, 11 Sep 2023 15:45:39 +0300	[thread overview]
Message-ID: <83h6o0ri8c.fsf@gnu.org> (raw)
In-Reply-To: <m1y1hdm2hj.fsf@yahoo.es> (bug-gnu-emacs@gnu.org)

> 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" <bug-gnu-emacs@gnu.org>
> 
> 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).





  reply	other threads:[~2023-09-11 12:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m1y1hdm2hj.fsf.ref@yahoo.es>
2023-09-11 10:24 ` bug#65864: [PATCH] Add option to save a buffer without running save hooks Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-11 12:45   ` Eli Zaretskii [this message]
2023-09-11 22:28     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-12  8:11       ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-12 12:59         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-13 16:44         ` Juri Linkov
2023-09-13 17:17           ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h6o0ri8c.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=65864@debbugs.gnu.org \
    --cc=mardani29@yahoo.es \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.