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

Previous Next

Package: emacs;

Reported by: Giap Tran <txgvnn <at> gmail.com>

Date: Tue, 10 Aug 2021 14:49:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Arthur Miller <arthur.miller <at> live.com>
Cc: Giap Tran <txgvnn <at> gmail.com>, 49980 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: bug#49980: 28.0.50; [PATCH] Should we have project-save-buffers?
Date: Fri, 13 Aug 2021 19:05:58 +0300
> 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.

Now it's possible just to type 'C-x s' after customizing
'save-some-buffers-default-predicate' to 'save-some-buffers-root',
or after setting this value in project's .dir-locals.el.

If you want to use this new feature programmatically,
then just call:

  (save-some-buffers t 'save-some-buffers-root)




This bug report was last modified 3 years and 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.