GNU bug report logs -
#65928
[PATCH] Introduce 'project-save-buffers'
Previous Next
Reported by: me <at> elken.dev
Date: Wed, 13 Sep 2023 21:28:02 UTC
Severity: wishlist
Tags: patch, wontfix
Done: Dmitry Gutov <dmitry <at> gutov.dev>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65928 in the body.
You can then email your comments to 65928 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65928
; Package
emacs
.
(Wed, 13 Sep 2023 21:28:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
me <at> elken.dev
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 13 Sep 2023 21:28:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi all,
A small patch to introduce a function from projectile that I feel is
missing, please feel free to yell at me if this has already been
rejected :)
Thanks all,
Ellis (@lkn)
[0001-Introduce-project-save-buffers.patch (text/x-diff, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65928
; Package
emacs
.
(Thu, 14 Sep 2023 07:01:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 65928 <at> debbugs.gnu.org (full text, mbox):
> A small patch to introduce a function from projectile that I feel is
> missing, please feel free to yell at me if this has already been rejected
> :)
Thanks for the patch. However, this is already implemented in
'save-some-buffers-root'. OTOH, having a separate command
maybe be not so bad. It could be bound to 'C-x p C-x s'.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65928
; Package
emacs
.
(Thu, 14 Sep 2023 13:46:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 65928 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Implemented somewhat yeah, but I think it's sensible and more discoverable having one here as you say. :)
On 14 September 2023 07:51:02 BST, Juri Linkov <juri <at> linkov.net> wrote:
>> A small patch to introduce a function from projectile that I feel is
>> missing, please feel free to yell at me if this has already been rejected
>> :)
>
>Thanks for the patch. However, this is already implemented in
>'save-some-buffers-root'. OTOH, having a separate command
>maybe be not so bad. It could be bound to 'C-x p C-x s'.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65928
; Package
emacs
.
(Thu, 14 Sep 2023 14:08:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 65928 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> linkov.net> writes:
> It could be bound to 'C-x p C-x s'.
What's the binding in projectile? All else being equal, I'd suggest we
use the same one.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65928
; Package
emacs
.
(Thu, 14 Sep 2023 14:10:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 65928 <at> debbugs.gnu.org (full text, mbox):
Elken via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:
> Implemented somewhat yeah, but I think it's sensible and more
> discoverable having one here as you say. :)
Would something like
(defalias 'project-save-buffers #'save-some-buffers-root)
do the job?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65928
; Package
emacs
.
(Thu, 14 Sep 2023 14:13:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 65928 <at> debbugs.gnu.org (full text, mbox):
On 14/09/2023 17:09, Stefan Kangas wrote:
> Elken via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors"<bug-gnu-emacs <at> gnu.org> writes:
>
>> Implemented somewhat yeah, but I think it's sensible and more
>> discoverable having one here as you say. 😄
> Would something like
>
> (defalias 'project-save-buffers #'save-some-buffers-root)
>
> do the job?
save-some-buffers-root is not a command, just a predicate function.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65928
; Package
emacs
.
(Thu, 14 Sep 2023 14:15:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 65928 <at> debbugs.gnu.org (full text, mbox):
On 14/09/2023 17:07, Stefan Kangas wrote:
> Juri Linkov<juri <at> linkov.net> writes:
>
>> It could be bound to 'C-x p C-x s'.
> What's the binding in projectile? All else being equal, I'd suggest we
> use the same one.
The counterpart to Projectile's binding will be 'C-x p S'.
But in its keymap lowercase 's' is a prefix binding with several
subcommands (grep, ripgrep, ag, references). Maybe that's not important.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65928
; Package
emacs
.
(Thu, 14 Sep 2023 14:18:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 65928 <at> debbugs.gnu.org (full text, mbox):
On 2023-09-14 15:07, Stefan Kangas wrote:
> Juri Linkov <juri <at> linkov.net> writes:
>
>> It could be bound to 'C-x p C-x s'.
>
> What's the binding in projectile? All else being equal, I'd suggest we
> use the same one.
"S" in the `projectile-command-map'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65928
; Package
emacs
.
(Thu, 14 Sep 2023 14:19:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 65928 <at> debbugs.gnu.org (full text, mbox):
On 2023-09-14 15:09, Stefan Kangas wrote:
> Elken via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors" <bug-gnu-emacs <at> gnu.org> writes:
>
>> Implemented somewhat yeah, but I think it's sensible and more
>> discoverable having one here as you say. :)
>
> Would something like
>
> (defalias 'project-save-buffers #'save-some-buffers-root)
>
> do the job?
It's a predicate to pass to `save-some-buffers`, so you'd still need an
interactive command to call it and handle the universal argument
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65928
; Package
emacs
.
(Thu, 14 Sep 2023 14:32:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 65928 <at> debbugs.gnu.org (full text, mbox):
On 14/09/2023 16:45, Elken via Bug reports for GNU Emacs, the Swiss army
knife of text editors wrote:
> Implemented somewhat yeah, but I think it's sensible and more
> discoverable having one here as you say. :)
I suppose the main question is whether we want a
project-save-some-buffers (one that can iterate through unsaved buffers
but can also save them all with an extra keypress) or a straight copy of
Projectile's command that just saves all buffers.
I don't use the iteration ability often, but once in a blue moon it does
come in handy. Though perhaps one can continue using save-some-buffer
for that (with the default predicate or not).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65928
; Package
emacs
.
(Fri, 15 Sep 2023 06:47:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 65928 <at> debbugs.gnu.org (full text, mbox):
>> It could be bound to 'C-x p C-x s'.
After more thoughts, it's not the best keybinding:
the global 'C-x s' could be used to save all buffers
in another project with 'C-x p p ... C-x s'
implemented in bug#63648.
> What's the binding in projectile? All else being equal, I'd suggest we
> use the same one.
Maybe Projectile's binding 'C-x p S' is not too bad.
> Would something like
> (defalias 'project-save-buffers #'save-some-buffers-root)
> do the job?
Rather something more like this will do the job:
```
(keymap-set project-prefix-map "S"
(lambda (&optional arg)
(interactive "P")
(let ((save-some-buffers-default-predicate 'save-some-buffers-root))
(save-some-buffers arg))))
```
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Fri, 15 Sep 2023 10:52:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65928
; Package
emacs
.
(Fri, 15 Sep 2023 16:40:01 GMT)
Full text and
rfc822 format available.
Message #40 received at 65928 <at> debbugs.gnu.org (full text, mbox):
On 15/09/2023 09:32, Juri Linkov wrote:
>> Would something like
>> (defalias 'project-save-buffers #'save-some-buffers-root)
>> do the job?
> Rather something more like this will do the job:
>
> ```
> (keymap-set project-prefix-map "S"
> (lambda (&optional arg)
> (interactive "P")
> (let ((save-some-buffers-default-predicate 'save-some-buffers-root))
> (save-some-buffers arg))))
> ```
Would you say that the added capability to only save certain buffers but
not others, is something you found useful in practice?
More than once a year or so.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65928
; Package
emacs
.
(Mon, 18 Sep 2023 07:00:02 GMT)
Full text and
rfc822 format available.
Message #43 received at 65928 <at> debbugs.gnu.org (full text, mbox):
>>> Would something like
>>> (defalias 'project-save-buffers #'save-some-buffers-root)
>>> do the job?
>> Rather something more like this will do the job:
>> ```
>> (keymap-set project-prefix-map "S"
>> (lambda (&optional arg)
>> (interactive "P")
>> (let ((save-some-buffers-default-predicate 'save-some-buffers-root))
>> (save-some-buffers arg))))
>> ```
>
> Would you say that the added capability to only save certain buffers but
> not others, is something you found useful in practice?
>
> More than once a year or so.
I don't know why might anyone want to save only project's buffer,
but not all. I use 'C-x s' only when 'C-c C-a' from diff-mode modifies
different buffers (hopefully a new diff command will save them at once),
but I don't mind when 'C-x s' saves non-project buffers as well.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65928
; Package
emacs
.
(Wed, 12 Feb 2025 04:23:02 GMT)
Full text and
rfc822 format available.
Message #46 received at 65928 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dmitry <at> gutov.dev> writes:
> On 15/09/2023 09:32, Juri Linkov wrote:
>>> Would something like
>>> (defalias 'project-save-buffers #'save-some-buffers-root)
>>> do the job?
>> Rather something more like this will do the job:
>> ```
>> (keymap-set project-prefix-map "S"
>> (lambda (&optional arg)
>> (interactive "P")
>> (let ((save-some-buffers-default-predicate 'save-some-buffers-root))
>> (save-some-buffers arg))))
>> ```
>
> Would you say that the added capability to only save certain buffers but not
> others, is something you found useful in practice?
>
> More than once a year or so.
Maybe we should just close this as a wontfix?
Reply sent
to
Dmitry Gutov <dmitry <at> gutov.dev>
:
You have taken responsibility.
(Wed, 12 Feb 2025 13:56:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
me <at> elken.dev
:
bug acknowledged by developer.
(Wed, 12 Feb 2025 13:56:03 GMT)
Full text and
rfc822 format available.
Message #51 received at 65928-done <at> debbugs.gnu.org (full text, mbox):
On 12/02/2025 06:22, Stefan Kangas wrote:
> Dmitry Gutov<dmitry <at> gutov.dev> writes:
>
>> On 15/09/2023 09:32, Juri Linkov wrote:
>>>> Would something like
>>>> (defalias 'project-save-buffers #'save-some-buffers-root)
>>>> do the job?
>>> Rather something more like this will do the job:
>>> ```
>>> (keymap-set project-prefix-map "S"
>>> (lambda (&optional arg)
>>> (interactive "P")
>>> (let ((save-some-buffers-default-predicate 'save-some-buffers-root))
>>> (save-some-buffers arg))))
>>> ```
>> Would you say that the added capability to only save certain buffers but not
>> others, is something you found useful in practice?
>>
>> More than once a year or so.
> Maybe we should just close this as a wontfix?
Let's!
Please reopen if somebody disagrees.
Added tag(s) wontfix.
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 12 Feb 2025 14:29:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 13 Mar 2025 11:24:13 GMT)
Full text and
rfc822 format available.
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.