From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 4803fba487 1/2: 'C-x v v' on a diff buffer commits it as a patch (bug#52349) Date: Tue, 30 Aug 2022 19:37:20 +0300 Message-ID: <83v8q9u1q8.fsf@gnu.org> References: <166171593185.16640.41619657947456727@vcs2.savannah.gnu.org> <20220828194533.23A6BC00889@vcs2.savannah.gnu.org> <87r10znm0y.fsf@gnus.org> <83fshfvvyn.fsf@gnu.org> <999d1cb2-6b7f-8020-5202-e919278d895e@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6296"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ams@gnu.org, larsi@gnus.org, juri@jurta.org, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 30 19:04:47 2022 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 1oT4fP-0001Rs-2V for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Aug 2022 19:04:47 +0200 Original-Received: from localhost ([::1]:60948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oT4fN-0000Hq-Hn for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Aug 2022 13:04:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT4EX-0008PM-7K for emacs-devel@gnu.org; Tue, 30 Aug 2022 12:37:01 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48998) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT4EV-0005HU-11; Tue, 30 Aug 2022 12:36:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=UFugpzmrIQR36w2oNOZCIRooLSVgzH2C8eFSsNBjC+M=; b=I+plBjktwzxz ysp/QsCUZehkgBs89/umR/Dpc6U8K8QsO76AV0bo1fSkpzoMaptVgyAxZPZZWFqZcNs8M4/jkSlwk KNVUdoaCLdScNE1JlSjI4iSPuNH5fvFaocQSqpwDJZm8gpF/GaRvL1zzGTcTojf7VxE1fpJPlGowT D9S1lNRwQ7dFNMUem/FT4QXa7PBB64wNW+Q/1VW3XHHMYnnjyJzPkHL3ofI82tlUO1eJ1IQ66yY3m 1OeljcIKN6MhbsCy6oInC7KepX/V69MWaI6XQMjFgJeprgO/5EhZCRbZsIteWvrWnJnHcq3m/5SoV TMG+2syc61c1A5G5DchcFg==; Original-Received: from [87.69.77.57] (port=1320 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT4ET-0005jX-DI; Tue, 30 Aug 2022 12:36:57 -0400 In-Reply-To: (message from Dmitry Gutov on Tue, 30 Aug 2022 17:38:27 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:294362 Archived-At: > Date: Tue, 30 Aug 2022 17:38:27 +0300 > Cc: eliz@gnu.org, larsi@gnus.org, juri@jurta.org, emacs-devel@gnu.org > From: Dmitry Gutov > > I can look into adapting this approach for other VCS if nobody beats me > to it. Thanks. > As long as we fundamentally agree on the behavior. I think the "C-x v D" step should be part of the command's execution. It makes little sense to me to ask the user to prepare the diffs in advance, since conceptually the changes are already on disk. Starting from diffs makes sense when you want to apply them first, and only after that commit. Which is not the case here. I understand that typing "C-x v v" in a diffs buffer is used here as an indication that this particular variant of "committing" is requested, but that's a weak justification, IMO. It could even backfire: the user could be in the diffs by sheer luck (or lack thereof), and type "C-x v v" without any intention to select parts of the changes. I think a special numeric argument (like "C-u 0", perhaps?) is more appropriate to signal the interactive selection of changes.