From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#42145: vc-git file order mismatch between vc-dir and vc-diff Date: Thu, 02 Jul 2020 00:44:04 +0300 Organization: LINKOV.NET Message-ID: <871rluewrf.fsf@mail.linkov.net> References: <87bll048br.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11586"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 42145@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 02 00:11:16 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1jqkwk-0002ti-G2 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jul 2020 00:11:14 +0200 Original-Received: from localhost ([::1]:38382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqkwj-0002pm-HO for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jul 2020 18:11:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqkwZ-0002oz-IO for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 18:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42323) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqkwZ-00038D-9C for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 18:11:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jqkwZ-0005mC-4U for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 18:11:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jul 2020 22:11:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42145 X-GNU-PR-Package: emacs Original-Received: via spool by 42145-submit@debbugs.gnu.org id=B42145.159364143322132 (code B ref 42145); Wed, 01 Jul 2020 22:11:03 +0000 Original-Received: (at 42145) by debbugs.gnu.org; 1 Jul 2020 22:10:33 +0000 Original-Received: from localhost ([127.0.0.1]:53861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqkw5-0005kp-3C for submit@debbugs.gnu.org; Wed, 01 Jul 2020 18:10:33 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:60401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqkw1-0005kX-06 for 42145@debbugs.gnu.org; Wed, 01 Jul 2020 18:10:32 -0400 X-Originating-IP: 91.129.96.187 Original-Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id D34E62000A; Wed, 1 Jul 2020 22:10:21 +0000 (UTC) In-Reply-To: (Dmitry Gutov's message of "Wed, 1 Jul 2020 01:08:04 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182622 Archived-At: >> There is an old usability problem in vc-dir. >> Typing ‘=’ in a vc-dir buffer displays a vc-diff buffer where files are >> sorted by different order than files are sorted in the vc-dir buffer. > > vc-dir has its own presentation logic, it's pretty complex. The current sorting order in vc-dir is quite good, so better not to change it. > 'git diff' has a '-O' argument, which accepts . Maybe it'll > help, but I kind of doubt that. Ideas welcome. Maybe it's possible to write a diff-mode function to sort file hunks in vc-diff output buffer? Maybe by just giving the right file-beginning regexp to sort-subr? > Here's a bigger feature I've wanted to see in VC for a while: commit from > a diff. > > There is a third-party package: https://github.com/caldwell/commit-patch > > But it implements some of its logic in Perl, and the message buffer it > creates is non-standard. I'd really like to see it ported to VC. Nice idea. > The idea is, you open a diff, maybe split some of the hunks, kill the ones > you don't need (diff-mode supports all these operations), and then commit > the remaining ones, from multiple files, if needed. Seems like a good > replacement for 'git add -p' for Emacs power users. But I wonder how it could handle binary files where git-diff output says just "Binary files differ".