From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Alfred M. Szmidt" Newsgroups: gmane.emacs.devel Subject: Re: On the adoption of transient.el Date: Tue, 10 Aug 2021 04:16:05 -0400 Message-ID: References: <877di4on3d.fsf@posteo.net> <87im1oy6mw.fsf@posteo.net> <87y29hihea.fsf@posteo.net> <87sfzonu6k.fsf@ucl.ac.uk> <878s1gqlop.fsf@gmail.com> <8735ronpo0.fsf@ucl.ac.uk> <83lf5gjgtp.fsf@gnu.org> <87eeb8gdbq.fsf@telefonica.net> <877dgzebux.fsf@mail.linkov.net> <87tujxappl.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28690"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ofv@wanadoo.es, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 10 10:16:50 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDMwL-0007Ac-KX for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Aug 2021 10:16:49 +0200 Original-Received: from localhost ([::1]:50084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDMwK-0002I1-5s for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Aug 2021 04:16:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDMve-0001Pa-Df for emacs-devel@gnu.org; Tue, 10 Aug 2021 04:16:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42208) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDMvd-0006wZ-9r; Tue, 10 Aug 2021 04:16:05 -0400 Original-Received: from ams by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1mDMvd-0005FU-72; Tue, 10 Aug 2021 04:16:05 -0400 In-Reply-To: <87tujxappl.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 10 Aug 2021 10:18:06 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272260 Archived-At: > 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?