GNU bug report logs -
#65414
save-some-buffers-functions are unexpectedly called when save-some-buffers pred is non-nil
Previous Next
Full log
Message #8 received at 65414 <at> debbugs.gnu.org (full text, mbox):
> Cc: jonas <at> bernoul.li
> Date: Sun, 20 Aug 2023 21:06:54 -0700
> From: Joseph Turner via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Functions which are added to save-some-buffers-functions are always
> called when save-some-buffers runs, even when a PRED argument is
> specified. This leads to unexpected behavior when PRED is intended to
> limit saving buffers to a specific set of file buffers, as in Magit's
> magit-save-repository-buffers function.
>
> abbrev--possibly-save is added to save-some-buffers-functions by default
> now, so whenever magit-save-repository-buffers runs, Emacs prompts to
> save unsaved abbrevs (as well any other functions in the list).
Why is asking whether to save the abbrevs a problem in the case of
magit-save-repository-buffers?
And are you saying that before the change which added
save-some-buffers-functions, Emacs was not saving the abbrevs when
save-some-buffers was called? If so, in what Emacs version was this
so?
> I propose that we pass along the PRED argument of save-some-buffers to
> each of save-some-buffers-functions, allowing them to determine what is
> appropriate to do. Alternatively, we could pass along the return value
> of files--buffers-needing-to-be-saved, which is a list of buffers.
We need a better understanding of the situation before we can discuss
solutions, so please fill-in the blanks outlined above. (The solution
you propose is not very backward-compatible, so probably not
acceptable anyway, as Emacs 29 was already released with the current
code. But let's defer this discussion until the issue is more clear.)
This bug report was last modified 1 year and 313 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.