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#60897: 29.0.60; vc-revert fails to revert buffer Date: Mon, 23 Jan 2023 09:51:30 +0200 Organization: LINKOV.NET Message-ID: <86v8kx3czh.fsf@mail.linkov.net> References: <29401.1674004194@hassadar.pretzelnet.org> <86edrr4zcz.fsf@mail.linkov.net> <868rhu5w0u.fsf@mail.linkov.net> <83cz76jqm5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32014"; 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: 60897@debbugs.gnu.org, epg@pretzelnet.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 23 08:53:20 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 1pJrdn-0008CM-R4 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Jan 2023 08:53:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJrdX-0003cT-JP; Mon, 23 Jan 2023 02:53:03 -0500 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 1pJrdW-0003cG-Cb for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2023 02:53:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJrdV-0003mM-Ss for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2023 02:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJrdV-0003jW-Ns for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2023 02:53:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Jan 2023 07:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60897 X-GNU-PR-Package: emacs Original-Received: via spool by 60897-submit@debbugs.gnu.org id=B60897.167446033514293 (code B ref 60897); Mon, 23 Jan 2023 07:53:01 +0000 Original-Received: (at 60897) by debbugs.gnu.org; 23 Jan 2023 07:52:15 +0000 Original-Received: from localhost ([127.0.0.1]:53230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJrcl-0003iT-56 for submit@debbugs.gnu.org; Mon, 23 Jan 2023 02:52:15 -0500 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:53895) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJrch-0003iD-RN for 60897@debbugs.gnu.org; Mon, 23 Jan 2023 02:52:14 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 4D28AE0003; Mon, 23 Jan 2023 07:52:03 +0000 (UTC) In-Reply-To: <83cz76jqm5.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 22 Jan 2023 21:50:26 +0200") 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:253981 Archived-At: >> > (defun vc-resynch-buffer (file &optional keep noquery reset-vc-info) >> > "If FILE is currently visited, resynch its buffer." >> > + (unless (file-name-absolute-p file) >> > + (setq file (expand-file-name file (vc-root-dir)))) >> > (if (string= buffer-file-name file) >> > (vc-resynch-window file keep noquery reset-vc-info) >> > (if (file-directory-p file) >> >> Eli, is this ok for the emacs-29 branch? I'm unsure because >> vc-resynch-buffer is used in too many places, so this change >> is not localized to vc-revert. > > You could use the expanded file name only for the purposes of the > string= call, no? Then the effect of this change would be very local > and thus safer. There is another string= call that fails inside vc-resynch-window called from vc-resynch-buffer.