From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov 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 20:10:18 +0300 Message-ID: <31f8c7b1-36b0-8a12-4792-bff8b4d518e3@yandex.ru> 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> <83v8q9u1q8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31426"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Cc: ams@gnu.org, larsi@gnus.org, juri@jurta.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 30 19:17:23 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 1oT4rb-00081T-Aa for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Aug 2022 19:17:23 +0200 Original-Received: from localhost ([::1]:41470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oT4rY-0004GC-LV for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Aug 2022 13:17:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT4lL-000775-Vm for emacs-devel@gnu.org; Tue, 30 Aug 2022 13:10:55 -0400 Original-Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:44895) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oT4lJ-0003Wc-J2; Tue, 30 Aug 2022 13:10:55 -0400 Original-Received: by mail-wr1-x431.google.com with SMTP id c7so8432081wrp.11; Tue, 30 Aug 2022 10:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc; bh=qMpWIm/+YpGBdAe3lej1rdh24aXjGBynZDZdWVqAMBQ=; b=am3HKiCjW1NzUWXCkmKRId4rSCfdYrNyaTGTFUy06KfVSd+QoCbZlfzmo307jB1oFV +KfedRGagsCJIeFD4tafwr5B7fzWwKTJZpI56XNKrV2zFZrP7e3y10yzXw31AROy6zim L29iAU9L7eLEuonMHO10OS+a0CWasJ5O7iiSVXuOd8KGBiD0GqNQqWmf/lniysYGzYyE sEG5RZn+GppJQN5sHIXDLmF5w8dFt0nVLUtXlL0J6FawabWOkhuQXvRswXgUGivfAzTe E1brGkfxCwwUkZXuo9403k9XuWPNMAlYH5saoPvb+JuVQkdm5GM73ZT5CVvAzNp7y6xM p8EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc; bh=qMpWIm/+YpGBdAe3lej1rdh24aXjGBynZDZdWVqAMBQ=; b=Hdxr6KvxDHNaIPBClhExWEsMnt+NNaovYbof/9Jx+nC1WraNDHbVMI3C31drEcM7Ci q5pqD5hnmIP/5fyOXdbLt/zDgt9StVPQ4cUnuEHvKiTS9IJKQ08TZsf8R6oukU2bIczK eRE6CSKxXwyEbvpdZP9mwhKOylXb1WYzYwNjufyT2OlcDx3czgwZhfWIP1c5Y7Y9nJLS 96L96xSc3kKDqls3MeaaFsd5cm07bNb+cpMnUWsToLgPLDuSVbNK0RY+New6hSTaSeUX eeMBDNBZDLziNWeq6Es1AKw7T5Ue9lsWmNY0rRyg/9nxtNhyDN1ICIKqzTmrMMi7AUhX GZHA== X-Gm-Message-State: ACgBeo114LWffRRf60iEDTImymTLYK7eAvqp6fnDSFzslry7zIYlxGZB xILs1W8AQwDbtHgCV6yU1SSj72i0KII= X-Google-Smtp-Source: AA6agR7ixfzkZ/6zCu6SWIznHCuKXm8htNqp1FSbP6jFWTHAceEtJhVNxZzbLwByBNBzorZSgG69Jw== X-Received: by 2002:adf:9c8a:0:b0:226:d1d4:b28d with SMTP id d10-20020adf9c8a000000b00226d1d4b28dmr9207888wre.497.1661879421519; Tue, 30 Aug 2022 10:10:21 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id f16-20020a5d58f0000000b0021e42e7c7dbsm10081243wrd.83.2022.08.30.10.10.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Aug 2022 10:10:20 -0700 (PDT) Content-Language: en-US In-Reply-To: <83v8q9u1q8.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=raaahh@gmail.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, GAPPY_SUBJECT=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action 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:294368 Archived-At: On 30.08.2022 19:37, Eli Zaretskii wrote: >> 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. The user can choose the files first (e.g. choose a directory from VC-Dir), or just pick one file they are currently editing. Then see the diff, and make the choice of making a commit from it. What you're suggesting could possibly improve discoverability (if the user manages to read the doc and find out about the meaning of C-0 prefix), but WRT flexibility, the effect can be negative. That is, unless we keep the new meaning of 'C-x v v' in diff buffers, the ability to commit an arbitrary diff (not applied yet) will go away. And it's what the author of the top message in this tree was particularly happy about. And as for the length of key sequences, in VC-Dir, 'D C-x v v' is about the same as 'C-0 C-x v v'. > 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. If they have no intention of creating a commit from that diff and press 'C-x v v' by accident, they can simply 'C-c C-k' out of the resulting Log-Edit buffer. That will bring them back to the diff, restoring the previous window configuration.