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:33:13 +0300 Message-ID: <2771fb83-6c44-402d-1b29-b9a2620a3668@yandex.ru> References: <166171593185.16640.41619657947456727@vcs2.savannah.gnu.org> <20220828194533.23A6BC00889@vcs2.savannah.gnu.org> <87r10znm0y.fsf@gnus.org> <83fshfvvyn.fsf@gnu.org> <83bks3vtf5.fsf@gnu.org> <83tu5uug68.fsf@gnu.org> <834jxtvqb3.fsf@gnu.org> <383e8f09-3c2c-2ac9-3aa8-074379f584a5@yandex.ru> <83y1v5u2hh.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="22744"; 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: 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:44:10 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 1oT5HU-0005aP-Fw for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Aug 2022 19:44:08 +0200 Original-Received: from localhost ([::1]:46628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oT5HS-0005cC-RS for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Aug 2022 13:44:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT57I-0000TM-NL for emacs-devel@gnu.org; Tue, 30 Aug 2022 13:33:36 -0400 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:35397) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oT57G-0008P8-5k; Tue, 30 Aug 2022 13:33:36 -0400 Original-Received: by mail-wm1-x32a.google.com with SMTP id m17-20020a7bce11000000b003a5bedec07bso10371393wmc.0; Tue, 30 Aug 2022 10:33:16 -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=XtIjyadJsRv+w8TfHctVutVv5sE2Gz/hdh50liTxxW0=; b=M5nab85K7KsEp3VjcF0PNsJWfrRnCuYYm3eHW2lwwUBOLkwiE6f0FnFaqvjHuadkCI R6m06LtNAKtTFBuvChBU6l8sk7bqgn6lrDi6J2nH08onohoN+sYshi9CLZgAle7lHwHg uygOcT709q9kYH+jbx/kVPehVVnTtJ/KsFGbmf/f9CdiCuV5ApwWWmViO3IyVy+yi5vH 6LAyNb5DRzc6M3H3Mw4RHViABYMn2aflf9FP2HbuzO8Le7UabQzA00GfPKA1BxWQzs5t OQL8w5DXRrghjIez/NNqIwjuZX45jcC/gM2QdQqmIVuo0yA7hPCxmtZs0IvB+LCW1mVZ M3Aw== 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=XtIjyadJsRv+w8TfHctVutVv5sE2Gz/hdh50liTxxW0=; b=VZb+MpnSbcGxTF8VrALhbWaI7uPvOyYT66zfpLzN8y7jiaQjBoxm8FdR4Uh5NOglEW xYAqH8/GQXkKTTCJuuwdepoIF8R7kewXsmpGJE4zCYr3RxSPap1lpK5BKen+4O/ipzNB 5iNW/CNuXOdtTsEi9b7Sik0VS8qwYwa+N/vlvGps5Y+DVXDRx2ZYaOuZS+RCLGtLjOkc BSDamDWI0+UwPxnlqI5rRLohHivPhmYp+FRWc1YIBw7XQWouomle0hLEbEIUCdhADJrg V6J75Z4V7WXlMPyhSRa6SBY+mQ1SOA/QmNYbOyHKXIbecgGbD3+g9NGi3tsTJ8RZ8o4e sulg== X-Gm-Message-State: ACgBeo3N+AE7OYjvW3/rlyBefs8v95xarAm203gM6zcw6OshDiWRjRs5 lNfpminruXu/KCrhCyMpszwhak4LxHE= X-Google-Smtp-Source: AA6agR6x+LcfNyTz9Rm6OSNHGH/uU8+NF1DoennC7CS8MmWbMWuEiNMvGdW8K7SjatylXttawGPnOQ== X-Received: by 2002:a05:600c:22ca:b0:3a5:c30d:ca9f with SMTP id 10-20020a05600c22ca00b003a5c30dca9fmr10354795wmg.25.1661880794998; Tue, 30 Aug 2022 10:33:14 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id l7-20020a05600c088700b003a5260b8392sm12996084wmp.23.2022.08.30.10.33.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Aug 2022 10:33:14 -0700 (PDT) Content-Language: en-US In-Reply-To: <83y1v5u2hh.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32a.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:294371 Archived-At: On 30.08.2022 19:20, Eli Zaretskii wrote: >> Date: Tue, 30 Aug 2022 16:52:10 +0300 >> Cc: larsi@gnus.org, juri@jurta.org, emacs-devel@gnu.org >> From: Dmitry Gutov >> >>>> It's significant in that the starting conditions is that the files are >>>> already modified compared to the repository head, and the end goal is to >>>> be able to pick only some of those changes for commit. >>> >>> Ouch! Then this feature will be useless for me, and I'm sorry I >>> wasted everyone's time based on the description in NEWS, which doesn't >>> make a point of emphasizing this basic assumption. >> >> Perhaps we could make it more useful for you as well, e.g. by applying >> all the changes from the patch first when called with 'C-u'. > > Alas, C-u already has a meaning with "C-x v v". For better or worse, it doesn't seem to do anything in diff-mode buffers. But we could also use 'C-0'. Or something similar. >> But I suppose if your patches apply cleanly most of the time, it can be >> less of a problem. > > They do, when I choose them not to be rejected ;-) Admirable. >> diff-mode provides commands to delete hunks, split them, and even allows >> one to edit individual characters (something that 'git add -p' doesn't >> provide). So I'd argue this way might even be more powerful. > > From my POV, a better UI would be to enter diff-mode _after_ the user > invoked VC to commit the changes, but asked specifically to commit > them selectively. Not the other way around. IOW, the process of > generating the diffs buffer should be part of the command execution, > not a prerequisite for it. I suppose this UI could be implemented on top of the current behavior as well.