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#66113: Apply the entire diff buffer Date: Wed, 27 Sep 2023 20:36:49 +0300 Organization: LINKOV.NET Message-ID: <86ttrfmsb2.fsf@mail.linkov.net> References: <86o7hx4a11.fsf@mail.linkov.net> <86v8c2u34b.fsf@mail.linkov.net> <9cb6c329-8a81-414a-00e0-b3d8aa73d037@gutov.dev> <86msxep69i.fsf@mail.linkov.net> <86lecwvjw4.fsf@mail.linkov.net> <095e4596-7c67-21e2-a69f-c0b7945773a3@gutov.dev> <86a5tcxbw7.fsf@mail.linkov.net> <57031fed-65d6-731b-756b-093a20065f1c@gutov.dev> <86r0mmywhb.fsf@mail.linkov.net> <9555856c-6b67-1806-3f76-b418825f0046@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18409"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 66113@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 27 19:42:39 2023 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 1qlYYY-0004fw-My for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Sep 2023 19:42:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qlYXs-0006By-99; Wed, 27 Sep 2023 13:41:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qlYXk-0006BF-Kq for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2023 13:41:48 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qlYXk-0004uV-Bb for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2023 13:41:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qlYXy-0006Tp-0K for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2023 13:42:02 -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, 27 Sep 2023 17:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66113 X-GNU-PR-Package: emacs Original-Received: via spool by 66113-submit@debbugs.gnu.org id=B66113.169583648824846 (code B ref 66113); Wed, 27 Sep 2023 17:42:01 +0000 Original-Received: (at 66113) by debbugs.gnu.org; 27 Sep 2023 17:41:28 +0000 Original-Received: from localhost ([127.0.0.1]:52462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlYXQ-0006Sf-0f for submit@debbugs.gnu.org; Wed, 27 Sep 2023 13:41:28 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:54793) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlYXA-0006Rm-Dh; Wed, 27 Sep 2023 13:41:13 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 85343C0003; Wed, 27 Sep 2023 17:40:49 +0000 (UTC) In-Reply-To: <9555856c-6b67-1806-3f76-b418825f0046@gutov.dev> (Dmitry Gutov's message of "Tue, 26 Sep 2023 02:07:33 +0300") X-GND-Sasl: juri@linkov.net 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271425 Archived-At: close 66113 30.0.50 thanks >> ;; In git format-patch "^-- $" signifies >> ;; the end of the patch. >> (and (eq diff-buffer-type 'git) >> (looking-at "^-- $")) >> So I just copied this code here: > > That works. Thanks! Actually this doesn't work for bzr that has a bug that adds an extra line at the end. So I pushed a better fix. > Ideally, I think point would move to the first failing hunk. But that's not > urgent, could be a TODO for later. There are many variants what would be better to do here. Maybe also to show all failing hunks. And leaving point at the beginning also makes sense, because then the user could start applying hunks one by one with 'C-c C-a' from the beginning until encountering the failing hunk and handle it manually. > Aside from that, I'm still not crazy about the binding. But that's not > a technical issue. Agreed, the key binding is the best among bad variants.