bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Arthur Miller
Subject: bug#49980: 28.0.50; [PATCH] Should we have project-save-buffers?
Date: Fri, 13 Aug 2021 11:39:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 12.08.2021 10:55, Juri Linkov wrote:
>>>> It would be nice to have a keybinding for this useful command,
>>>> as there is 'C-x s', but 'C-x p s' is bound to 'project-shell'.
>>>> Maybe then to bind it to 'C-x p S'?
>>>
>>> If we do end up adding this command, we could move project-shell to 'C-x
>>> p E', for example, so that we don't spread shell-related commands over
>>> different letters.
>> Or to a new prefix map, e.g. 'C-x p x s' with mnemonics "eXecute Shell".
>
> That would also displace project-execute-extended-command, which seems
> gratuitous. And if we were putting different commands together to save keymap
> space, 'project-compile' seems closer in purpose to 'project-shell' than
> 'project-execute-extended-command'.
>
> Anyway, 'e' as a mnemonic for 'Eshell' or 'shEll' seems good enough for me.
>
>>> But see my question in the other email.
>>> Is there any reason not to just use 'save-some-buffers' (C-x s)?
>> In bug#46374 we are adding a new option 'project-root'
>> to 'save-some-buffers-default-predicate' that will allow
>> 'C-x s' to save only files under the same project root.
>
> That also seems to indicate that we don't need a separate command.

I am sorry I am bit late to the party, but I would like to have a
command to save all modified buffers belonging to a project directory. I
am just about to code something like this for myself and a small project
of mine, so I would be happy if you can point me into something that
exists.

I have coded a little branch switcher with helm. The purpose it so be
able to fast switch branch, say you are working on some bigger feature,
and than wish for some reason to switch to some other branch and then
comeback and continue on the previous one. The workflow is to simply
stash everything on change, and apply stash when branch is checked out
again. I have it working, minus the part to save all buffers belonging
to a project which is root directory wtih .git in my case.

I don't know if that fits into your purpose or something, nor do I think
it is hard to code, but I always prefer if I can skip duplicating code
and per-use soemthing.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]