Subject: Re: bug#49980: 28.0.50; [PATCH] Should we have project-save-buffers?

From: Dmitry Gutov <[email-masked]>
Date: Fri, 13 Aug 2021 05:11:31 +0300

On 11.08.2021 16:40, Giap Tran wrote:
> Dmitry Gutov <[email-masked]> writes:
> 
>> Is there any reason not to just use 'save-some-buffers' (C-x s)?
>>
>> Do you often want to leave some buffers unsaved?
> 
> Oh, so funny, I used Emacs for over 4 years and I don't know this
> function. Looks like I just need this to solve my problem

Excellent.

>> Then project-save-buffers could be on 'C-x p s'.
> 
> Is `project-save-buffers necessary anymore? If anyone opens many projects
> with unsaved buffers. Maybe they need that because they don't want to
> save buffers not in this project. I think we don't need
> keybinding for that. We can use M-x, up to you :D

I don't know if it's necessary indeed (and as Juri notes, there will be 
another approach available).

We might consider it problematic, though, that for 
'project-query-replace-regexp' to operate properly the user needs to 
save all the buffers manually (they both need to know that they need to 
do that, and how to do that). Maybe xref-query-replace-in-results should 
have an option to save all touched buffers in the end. Or maybe 
perform-replace should have one.

Hopefully we can also resolve this difficulty another way, providing an 
inline editing mechanism for Xref buffers.