emacs-devel
[Top][All Lists]
Advanced

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

Re: [patch: first impression]


From: Dmitry Gutov
Subject: Re: [patch: first impression]
Date: Tue, 11 Oct 2022 15:17:55 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

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.

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 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.



reply via email to

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