GNU bug report logs -
#49980
28.0.50; [PATCH] Should we have project-save-buffers?
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49980 in the body.
You can then email your comments to 49980 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#49980
; Package
emacs
.
(Tue, 10 Aug 2021 14:49:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Giap Tran <txgvnn <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 10 Aug 2021 14:49: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)]
Hello,
After using `project-query-replace-regexp to query and replace. I see we don't have the function to save all buffers in project.
So after learning from projectile package. I have this patch, hope it is
useful. Thanks
[project-save-buffers.diff (text/x-diff, inline)]
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 4620ea8f47..b257222e21 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1395,5 +1395,22 @@ to directory DIR."
(project-current-inhibit-prompt t))
(call-interactively command))))
+(defun project-save-buffers ()
+ "Save all project buffers."
+ (interactive)
+ (let* ((project (project-current t))
+ (buffers (project--buffer-list project))
+ (modified-buffers (cl-remove-if-not (lambda (buf)
+ (and (buffer-file-name buf)
+ (buffer-modified-p buf)))
+ buffers)))
+ (if (null modified-buffers)
+ (message "No buffers need saving")
+ (dolist (buf modified-buffers)
+ (with-current-buffer buf
+ (save-buffer)))
+ (message "Saved %d buffers" (length modified-buffers)))))
+
+
(provide 'project)
;;; project.el ends here
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Wed, 11 Aug 2021 07:06:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 49980 <at> debbugs.gnu.org (full text, mbox):
> After using `project-query-replace-regexp to query and replace.
> I see we don't have the function to save all buffers in project.
> So after learning from projectile package. I have this patch, hope it is
> useful. Thanks
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'?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Wed, 11 Aug 2021 07:40:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 49980 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> linkov.net> writes:
> Maybe then to bind it to 'C-x p S'?
I'm totally agree with you.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Wed, 11 Aug 2021 12:23:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 49980 <at> debbugs.gnu.org (full text, mbox):
Hi!
On 10.08.2021 12:23, Giap Tran wrote:
> After using `project-query-replace-regexp to query and replace. I see we don't have the function to save all buffers in project.
Is there any reason not to just use 'save-some-buffers' (C-x s)?
Do you often want to leave some buffers unsaved?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Wed, 11 Aug 2021 12:25:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 49980 <at> debbugs.gnu.org (full text, mbox):
On 11.08.2021 09:52, 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.
Then project-save-buffers could be on 'C-x p s'.
But see my question in the other email.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Wed, 11 Aug 2021 13:41:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 49980 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> 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
> 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
--
Giap Tran <txgvnn <at> gmail.com>
GnuPG/0xE655BF766A56995D
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Thu, 12 Aug 2021 08:16:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 49980 <at> debbugs.gnu.org (full text, mbox):
>> 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".
> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Fri, 13 Aug 2021 02:07:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 49980 <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Fri, 13 Aug 2021 02:12:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 49980 <at> debbugs.gnu.org (full text, mbox):
On 11.08.2021 16:40, Giap Tran wrote:
> Dmitry Gutov <dgutov <at> yandex.ru> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Fri, 13 Aug 2021 07:15:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 49980 <at> debbugs.gnu.org (full text, mbox):
tags 49980 fixed
close 49980 28.0.50
quit
>> 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.
Then maybe 'C-x p e e' for 'Eshell' with a mnemonic "Execute Eshell",
and 'C-x p e s' for 'Shell' with a mnemonic "Execute Shell".
>>> 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.
Indeed, so after pushing the patch to use the project root in bug#46374,
now closing this request too.
Added tag(s) fixed.
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Fri, 13 Aug 2021 07:15:03 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.0.50, send any further explanations to
49980 <at> debbugs.gnu.org and Giap Tran <txgvnn <at> gmail.com>
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Fri, 13 Aug 2021 07:15:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Fri, 13 Aug 2021 09:40:02 GMT)
Full text and
rfc822 format available.
Message #39 received at 49980 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Fri, 13 Aug 2021 16:12:02 GMT)
Full text and
rfc822 format available.
Message #42 received at 49980 <at> debbugs.gnu.org (full text, mbox):
> 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)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Fri, 13 Aug 2021 17:23:01 GMT)
Full text and
rfc822 format available.
Message #45 received at 49980 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> linkov.net> writes:
>> 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:
Yes, that is exactly my intention; I would like to save all modified
buffers belonging to git root and subdirectories programmatically.
> (save-some-buffers t 'save-some-buffers-root)
Thank you, I have just pulled and rebuild. Will try it and let you know
how it works when I am done testing.
Thank you very much.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Fri, 13 Aug 2021 23:55:02 GMT)
Full text and
rfc822 format available.
Message #48 received at 49980 <at> debbugs.gnu.org (full text, mbox):
On 13.08.2021 12:39, Arthur Miller wrote:
> 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.
Please check out Juri's solution, and if it doesn't work out, we can
always add a dedicated command.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Sat, 14 Aug 2021 02:26:02 GMT)
Full text and
rfc822 format available.
Message #51 received at 49980 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> linkov.net> writes:
>> 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)
Hi again, this works just wonderful! :)
Actually it works so good, that I am thinking I am doing something wrong
here.
I created some files in top level and a subdirectory, with some content
and it worked just fine. Literally with just adding the above line:
(save-some-buffers t 'save-some-buffers-root)
Fragment of my use-case:
#+begin_src emacs-lisp
(defun helm-git-branch--checkout (branch)
(helm-aif (helm-ls-git-root-dir)
(with-helm-default-directory it
(with-output-to-string
(with-current-buffer standard-output
(save-some-buffers t 'save-some-buffers-root)
(when (helm-git-branch--dirty-p)
(helm-git-branch--stash))
(insert (call-process "git" nil t nil "checkout" branch))
(helm-git-branch--unstash))))))
#+end_src
So how does it work? save-some-buffers-root auto detects a git repo
root via project-find-functions in project.el or something there? I
havent followed entire call chain. I ask, because I guess this is going
to be part of Emacs 28 but wonder if you have any plans to port it
into older versions?
Anyway, thank you. That was what I needed, I think you saved me quite
some work.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Sat, 14 Aug 2021 02:47:01 GMT)
Full text and
rfc822 format available.
Message #54 received at 49980 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> On 13.08.2021 12:39, Arthur Miller wrote:
>> 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.
>
> Please check out Juri's solution, and if it doesn't work out, we can always add
> a dedicated command.
Yes I did, I just sent him an answer, it works great! So good that I am
thinking I did something wrong :).
Could you guys care to take a look at my little branch switcher? If you
have time. I could use some review and advice. It is ~200 sloc and most
of it is helm boiler code, I am really interesting about opinion on
stash/unstash strategy. I stash everything include untracked
files. However I am thinking of implementing other strategy, via commit
and undo commit.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Sun, 15 Aug 2021 08:52:02 GMT)
Full text and
rfc822 format available.
Message #57 received at 49980 <at> debbugs.gnu.org (full text, mbox):
> (save-some-buffers t 'save-some-buffers-root)
>
> So how does it work? save-some-buffers-root auto detects a git repo
> root via project-find-functions in project.el or something there? I
> havent followed entire call chain. I ask, because I guess this is going
> to be part of Emacs 28 but wonder if you have any plans to port it
> into older versions?
You can make it backward-compatible with older versions by copying
the contents of the function save-some-buffers-root literally
to your code. This call should work in older versions:
#+begin_src emacs-lisp
(save-some-buffers
t
(let ((root (or (and (project-current) (project-root (project-current)))
default-directory)))
(lambda () (file-in-directory-p default-directory root))))
#+end_src
> Could you guys care to take a look at my little branch switcher? If you
> have time. I could use some review and advice. It is ~200 sloc and most
> of it is helm boiler code, I am really interesting about opinion on
> stash/unstash strategy. I stash everything include untracked
> files. However I am thinking of implementing other strategy, via commit
> and undo commit.
Thanks, this is a useful package. It uses the right strategy
to stash and unstash changes. This is much better than committing
and undoing commits like we recently discussed in
https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00346.html
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Sun, 15 Aug 2021 10:46:02 GMT)
Full text and
rfc822 format available.
Message #60 received at 49980 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Juri Linkov <juri <at> linkov.net> writes:
>> (save-some-buffers t 'save-some-buffers-root)
>>
>> So how does it work? save-some-buffers-root auto detects a git repo
>> root via project-find-functions in project.el or something there? I
>> havent followed entire call chain. I ask, because I guess this is going
>> to be part of Emacs 28 but wonder if you have any plans to port it
>> into older versions?
>
> You can make it backward-compatible with older versions by copying
> the contents of the function save-some-buffers-root literally
> to your code. This call should work in older versions:
Ah, that was was the magic. I was looking into those functions, but
wasn't really sure what I should snitch :).
> to your code. This call should work in older versions:
>
> #+begin_src emacs-lisp
> (save-some-buffers
> t
> (let ((root (or (and (project-current) (project-root (project-current)))
> default-directory)))
> (lambda () (file-in-directory-p default-directory root))))
> #+end_src
Thank you!
>> Could you guys care to take a look at my little branch switcher? If you
>> have time. I could use some review and advice. It is ~200 sloc and most
>> of it is helm boiler code, I am really interesting about opinion on
>> stash/unstash strategy. I stash everything include untracked
>> files. However I am thinking of implementing other strategy, via commit
>> and undo commit.
>
> Thanks, this is a useful package. It uses the right strategy
> to stash and unstash changes. This is much better than committing
> and undoing commits like we recently discussed in
> https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00346.html
I have to admit, I haven't followed so much the discussion, this was
just sommething I wished to had for longer time, but never come about to
implement.
I am not sure if my approach is correct. I think it can mess up things
when multiple branches get changed. If there are only two branches
invloved, a->b, b->c, there are no problems (I think). Also with
multiple branches without changes there should be no problems.
But in case of a->b, b->c, ... , c->n, I am not sure, but I believe they
would have to be checked out in correct reversed order. Otherwise I
think there is possiblity that applied stashes tramp over each others
and cause conflicts. I don't know, I haven't had time to test it that
far. I had this for a couple of weeks, and works fine for my modest
need, but I would appreciate some more input on the code.
I have attached it the source in this mail, if anyone is interested to
look at it, but there is also a github project with some more info in a
readme file at:
https://github.com/amno1/helm-git-branch
I am thankful for all input, and thanks for all your help Juri!
[helm-git-branch.el (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Mon, 16 Aug 2021 00:38:02 GMT)
Full text and
rfc822 format available.
Message #63 received at 49980 <at> debbugs.gnu.org (full text, mbox):
On 14.08.2021 05:46, Arthur Miller wrote:
> It is ~200 sloc and most
> of it is helm boiler code, I am really interesting about opinion on
> stash/unstash strategy. I stash everything include untracked
> files.
Speaking of strategy, that sounds like something I routinely do by hand,
so... it seems fine?
Though I usually keep unregistered files alone, because those can be
both related to the current work I'm doing, or totally unrelated and be,
for example, some new project settings I haven't checked in (and perhaps
never intend to).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Mon, 16 Aug 2021 01:20:01 GMT)
Full text and
rfc822 format available.
Message #66 received at 49980 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> On 14.08.2021 05:46, Arthur Miller wrote:
>> It is ~200 sloc and most
>> of it is helm boiler code, I am really interesting about opinion on
>> stash/unstash strategy. I stash everything include untracked
>> files.
>
> Speaking of strategy, that sounds like something I routinely do by hand,
> so... it seems fine?
>
> Though I usually keep unregistered files alone, because those can be both
> related to the current work I'm doing, or totally unrelated and be, for example,
> some new project settings I haven't checked in (and perhaps never intend to).
And as Oscar F. wrote in another thread, can lead to many gigabytes of
data stashed away.
Yes, I agree, I stash with -u by default, but I do have var to turn it
off.
What do you think about checking out, between multiple different
branches? Switching two branches back and forth is no brainer, it should
always work fine, but switching multiple branches can lead to mess since
stashes are applied automatically. Any good strategy to automate this
case?
Honestly, I don't see much difference than doing it manually, but I am a
bit affraid of auto applying stashes.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Mon, 16 Aug 2021 03:07:02 GMT)
Full text and
rfc822 format available.
Message #69 received at 49980 <at> debbugs.gnu.org (full text, mbox):
On 16.08.2021 04:19, Arthur Miller wrote:
> What do you think about checking out, between multiple different
> branches? Switching two branches back and forth is no brainer, it should
> always work fine, but switching multiple branches can lead to mess since
> stashes are applied automatically. Any good strategy to automate this
> case?
I don't know. You're automating a case I have been handling manually
(and hadn't been bothered by that, thus far).
You will most likely encounter some edge cases where the automation
breaks, but it's hard to predict those in advance.
> Honestly, I don't see much difference than doing it manually, but I am a
> bit affraid of auto applying stashes.
As long as they're named ones (and thus you won't miss and accidentally
pop an unrelated one), this should work fine.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49980
; Package
emacs
.
(Mon, 16 Aug 2021 13:23:01 GMT)
Full text and
rfc822 format available.
Message #72 received at 49980 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> On 16.08.2021 04:19, Arthur Miller wrote:
>> What do you think about checking out, between multiple different
>> branches? Switching two branches back and forth is no brainer, it should
>> always work fine, but switching multiple branches can lead to mess since
>> stashes are applied automatically. Any good strategy to automate this
>> case?
>
> I don't know. You're automating a case I have been handling manually (and hadn't
> been bothered by that, thus far).
>
> You will most likely encounter some edge cases where the automation breaks, but
> it's hard to predict those in advance.
>
>> Honestly, I don't see much difference than doing it manually, but I am a
>> bit affraid of auto applying stashes.
>
> As long as they're named ones (and thus you won't miss and accidentally pop an
> unrelated one), this should work fine.
Yes, they are named ones. I am trying to think out what could get
messed, but since everything is stashed away on every checkout, so I
don't think it should be more dangerous than doing it manually. Don't
time will tell me, I am using this myself, so I guess I'll notice.
thanks for the feedback
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 14 Sep 2021 11:24:06 GMT)
Full text and
rfc822 format available.
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.