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.devel Subject: Re: master 4803fba487 1/2: 'C-x v v' on a diff buffer commits it as a patch (bug#52349) Date: Wed, 31 Aug 2022 19:06:59 +0300 Organization: LINKOV.NET Message-ID: <86ler4laek.fsf@mail.linkov.net> 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> <877d2pnqup.fsf@yahoo.com> <86zgfknc9a.fsf@mail.linkov.net> <7b11b61f-c70d-7079-9bb2-7069a6e0170b@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20588"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Po Lu , "Alfred M. Szmidt" , eliz@gnu.org, larsi@gnus.org, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 31 18:32:17 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 1oTQdV-0005EP-2y for ged-emacs-devel@m.gmane-mx.org; Wed, 31 Aug 2022 18:32:17 +0200 Original-Received: from localhost ([::1]:51062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTQdU-0004uE-54 for ged-emacs-devel@m.gmane-mx.org; Wed, 31 Aug 2022 12:32:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTQII-0007Vp-W9 for emacs-devel@gnu.org; Wed, 31 Aug 2022 12:10:23 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:33321) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTQIG-00074V-PA; Wed, 31 Aug 2022 12:10:22 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id B08FBE0007; Wed, 31 Aug 2022 16:10:12 +0000 (UTC) In-Reply-To: <7b11b61f-c70d-7079-9bb2-7069a6e0170b@yandex.ru> (Dmitry Gutov's message of "Wed, 31 Aug 2022 14:11:57 +0300") Received-SPF: pass client-ip=217.70.183.196; envelope-from=juri@linkov.net; helo=relay4-d.mail.gandi.net X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, GAPPY_SUBJECT=0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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:294439 Archived-At: >> I've tried it out, but it gets stuck asking the same question: >> Hunk has already been applied; undo it? (y or n) >> because of the infinite loop in: >> (while (not (eobp)) >> (diff-apply-hunk)) >> After removing the loop, everything works fine. > > Do you perhaps have customized diff-advance-after-apply-hunk to nil? > I guess a let-binding is in order. diff-advance-after-apply-hunk is still t. > But a loop is necessary because the diff can have more than one hunk, isn't > it? A loop is necessary indeed. The problem is that I tried it with Bzr, but it has such a bug that `bzr diff` adds an extra line at the end, so it's not (eobp) after the last diff hunk. After removing the final newline in the *vc-diff* buffer the loop can be finished.