emacs-devel
[Top][All Lists]
Advanced

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

Re: On the adoption of transient.el


From: Alfred M. Szmidt
Subject: Re: On the adoption of transient.el
Date: Tue, 10 Aug 2021 04:16:05 -0400

   >    Currently I'm finishing implementation of a new vc command that
   >    will allow committing from a diff buffer.
   >
   > This sounds similar to my diff-commit-hunk.el hack; but it is entierly
   > VC agonstic.
   >
   > (defun restore-source-file ()
   >   (with-current-buffer (current-buffer)
   >     (erase-buffer)
   >     (insert-buffer "*diff-commit-hunk*")
   >     (write-file (current-buffer-file-name)))
   >   (remove-hook 'vc-checkin-hook 'restore-source-file))

   IIUC, it copies the old file back without merging changes in the same file.

I'm not sure what you mean.  What scenario are you thinking of?  The
"old file" is the one that contains any changes you are working with.

   OTOH, `commit-patch` uses `interdiff` (for non-git VCSs)
   to compute differences between two changesets.  Then vc
   could use something like your diff-commit-hunk.el
   for non-git VCSs to implement generic support for stash.

What are commit-patch and interdiff?  Since diff-commit-hunk.el works
well for git (and really for any VCS), why have a different system
there?



reply via email to

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