>>> "DG" == Dmitry Gutov writes: > On 11.10.2022 09:25, Uwe Brauer wrote: >> Do you mean: the not committed hunks are shelved? > Shelved before the commit is made and restored at the end, see the patch. Ok, I see may this is safer than just to run hg up tip after the commit because hg might complain that there are uncommitted changes. But shelving is also a bit slow, (well I can only talk about GNU emacs, which is a huge repository and it is converted via the hg-git plugin, may other hg users might have more insight) In any case I have to run a series of tests to say something more useful, right now, I am more or less forced to bisect GNU emacs because there is a serious GTK bug which makes the latest master unusable for me. So I might answer only by tomorrow.... >> But now that you mention it, mercurial also supports interactive >> shelving (so to speak the inverse operation to interactive commit. I am >> not sure that git has that feature). >> So couldn't that also be included? That would be really great, since >> commit-patch does not support it. >> The binding could be either C-u vc-next-action or >> something like this (just to explain the idea) >> (defun toggle-commit-or-shelve-interactively () >> (interactive) >> (with-output-to-temp-buffer "vc-list-buffer" >> (princ "List of functions\n") >> (princ "1: commit interactively\n") >> (princ "2: shelv interactively \n")) >> (let ((ch (string-to-char (read-string "Which choice: 1: 2: ")))) >> (call-interactively (cond ((eql ch ?1) #'vc-commit-interactively) >> ((eql ch ?2) #'vc-shelve-interactively) >> (t (error 'args-out-of-range '(1 2 ch)))))) >> (kill-buffer "vc-list-buffer")) > I'm not sure where to plug functionality like that. I see, but supporting interactively shelving seems like a nice feature to have, don't you think? >> I will try to test this later (I presume I don't need to recompile the >> whole emacs 😉; just kidding) > FWIW, you don't really have to recompile Emacs. You could `C-M-x` on > the new definitions instead after applying either of the patches. Thanks again for all your efforts. -- I strongly condemn Putin's war of aggression against the Ukraine. I support to deliver weapons to Ukraine's military. I support the ban of Russia from SWIFT. I support the EU membership of the Ukraine.