GNU bug report logs - #35166
27.0.50; Buffer state inconsistent after vc-retrieve-tag

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Mauro Aranda <maurooaranda@HIDDEN>; Keywords: confirmed; dated Fri, 5 Apr 2019 21:43:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Removed tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 35166 <at> debbugs.gnu.org:


Received: (at 35166) by debbugs.gnu.org; 27 Jul 2021 15:40:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 27 11:40:41 2021
Received: from localhost ([127.0.0.1]:53580 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m8PCC-0002Mu-Ty
	for submit <at> debbugs.gnu.org; Tue, 27 Jul 2021 11:40:41 -0400
Received: from mail-wm1-f47.google.com ([209.85.128.47]:41834)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kaushal.modi@HIDDEN>) id 1m8PC8-0002Mf-Tw
 for 35166 <at> debbugs.gnu.org; Tue, 27 Jul 2021 11:40:39 -0400
Received: by mail-wm1-f47.google.com with SMTP id
 a80-20020a1c98530000b0290245467f26a4so2667706wme.0
 for <35166 <at> debbugs.gnu.org>; Tue, 27 Jul 2021 08:40:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=yvmSC09UCHnQvDnwHelU3tdd93uEICSaSBrEe4tU8M8=;
 b=Me+cgMnmXE/j6gPn1SevU+ua2Od+5Sh/zhM2PKUgO08U+lbCgr+C3jxxrzXwSFZxM1
 bi2Z+EWO04uG2yhoG28KDr9feTkmWaUIc4umt4ayrOteFc+0d3oF0AaXF7cbu6C4NrxP
 A5sQuBinWQox8TzWDFkTpOCyoe0RyKlLwsjfIna0jBZkgiEqwqMAP6nbPUmn5mvwuUKZ
 buz2IUHZtTEzh/6NGG7wV72WrHUdnIhN/bp7OT8hQ3/5zwVJWPSqaGOp6UYK0Ag6Voim
 TbHhAJJV5dP8YYXJtIP+r09z4EBnA8FHNN0ab/R9aRu2G9Fyfj9QWbRO0sVkjXvmYE6j
 yCHw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=yvmSC09UCHnQvDnwHelU3tdd93uEICSaSBrEe4tU8M8=;
 b=QRzpBDuy1gsntdqO09RJpmww3r+xucuq3fLrRt55nLbL4nbPNbWPrEWYoqHINYYzSe
 dYVfOwXshh/j0tgShxJ9bSSkG1AJYbQX6eTj7jmpvXfdiASJa6HiI+hwVpll05iZQ4KK
 d7sffJTNNNS/G/qhU9TQoVmIW1LQwn4SbbC6inK9j3ZWhgKIEgP1iD8uat5hXhvFXWyn
 uzO6Tts/fneriyo1fErhd96JeOVFmFxhAEUTy1ejW3HX3VZbDvq6APDHNzSmIlN1fIF+
 UrJOQDAPTqm2nOYdfu3F6eg81/BP68QITp1+QmlnHMLToz0QJBcjELtNd+WXzAV5Tvhi
 A2IQ==
X-Gm-Message-State: AOAM532S1p3y0iqLFiIDK+ikO7WDbXR460JViZhQohz2mfn/aMy7Nni6
 RnFykImo0mOGlfsLyB/BXyQ7o1t/p+6qZau8NBE=
X-Google-Smtp-Source: ABdhPJzLcwYh8MeueFGdlSUSLKO/k4NRnzDOax2qKqQfkHOZvJwRZu402MSRYk5lnYa8UFUBbD9hrm4K7jxs5/wyYC8=
X-Received: by 2002:a7b:cb13:: with SMTP id u19mr22753364wmj.122.1627400431025; 
 Tue, 27 Jul 2021 08:40:31 -0700 (PDT)
MIME-Version: 1.0
References: <CAFyQvY1M4r8PC3ixWDBZD4xzSS35myud20+vqVmXUaGHMSqzXA@HIDDEN>
 <87pmv3dbij.fsf@HIDDEN>
In-Reply-To: <87pmv3dbij.fsf@HIDDEN>
From: Kaushal Modi <kaushal.modi@HIDDEN>
Date: Tue, 27 Jul 2021 11:39:55 -0400
Message-ID: <CAFyQvY0tgZV30Sns8OqQL6eQKrZbYk2vneD63WgJ70vfAaOTqg@HIDDEN>
Subject: Re: Change in `revert-buffer' behavior [28.0.50]
To: Lars Ingebrigtsen <larsi@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000099420405c81cb038"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 35166
Cc: 35166 <at> debbugs.gnu.org, Emacs developers <emacs-devel@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--00000000000099420405c81cb038
Content-Type: text/plain; charset="UTF-8"

On Tue, Jul 27, 2021 at 11:25 AM Lars Ingebrigtsen <larsi@HIDDEN> wrote:

>
> I've now reverted the change and reopened bug#35166 -- the problem there
> will have to be fixed in a different way.
>

Thanks for that quick fix! This restores the old `revert-buffer' behavior.

--00000000000099420405c81cb038
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail=
_attr">On Tue, Jul 27, 2021 at 11:25 AM Lars Ingebrigtsen &lt;<a href=3D"ma=
ilto:larsi@HIDDEN">larsi@HIDDEN</a>&gt; wrote:<br></div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid =
rgb(204,204,204);padding-left:1ex"><br>
I&#39;ve now reverted the change and reopened bug#35166 -- the problem ther=
e<br>
will have to be fixed in a different way.<br></blockquote><div><br></div><d=
iv>Thanks for that quick fix! This restores the old `revert-buffer&#39; beh=
avior.<br></div></div></div>

--00000000000099420405c81cb038--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35166; Package emacs. Full text available.

Message received at 35166 <at> debbugs.gnu.org:


Received: (at 35166) by debbugs.gnu.org; 27 Jul 2021 15:25:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 27 11:25:51 2021
Received: from localhost ([127.0.0.1]:53566 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m8Oxr-0008Ha-OF
	for submit <at> debbugs.gnu.org; Tue, 27 Jul 2021 11:25:51 -0400
Received: from quimby.gnus.org ([95.216.78.240]:39212)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1m8Oxp-0008HN-Li
 for 35166 <at> debbugs.gnu.org; Tue, 27 Jul 2021 11:25:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=0YMzjzN2cJp7mL+D0eU3CUWd8wF5L7GNnhtt4Lrx22U=; b=u8JmEqVFJwQrIGvr123cgMYh+R
 RApFMXqNR+FWeiKly1CSJjt+Id3f6I1Gx/P5E6vmFjlTEOjYXja8Nbv0xk+ABC/J/S8qe1d0RIDlY
 2FY7AJ+0jrQbsE8lfXOXdwW9nTZvuEmPndkZxbJuwekDoRy1TBEMHwl+vclFYIAkwe8A=;
Received: from 2.149.45.105.tmi.telenormobil.no ([2.149.45.105] helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1m8Oxh-0001xp-Ed; Tue, 27 Jul 2021 17:25:43 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Kaushal Modi <kaushal.modi@HIDDEN>
Subject: Re: Change in `revert-buffer' behavior [28.0.50]
References: <CAFyQvY1M4r8PC3ixWDBZD4xzSS35myud20+vqVmXUaGHMSqzXA@HIDDEN>
Date: Tue, 27 Jul 2021 17:25:40 +0200
In-Reply-To: <CAFyQvY1M4r8PC3ixWDBZD4xzSS35myud20+vqVmXUaGHMSqzXA@HIDDEN>
 (Kaushal Modi's message of "Tue, 27 Jul 2021 11:09:59 -0400")
Message-ID: <87pmv3dbij.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Kaushal Modi <kaushal.modi@HIDDEN> writes: > When I change
 the read-onlyness of a file from the disk, M-x revert-buffer > doesn't reflect
 that change any more. This is really important as I am working in > a
 centralized VCS where the files hav [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 0.0 TVD_RCVD_IP            Message was received from an IP address
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 35166
Cc: 35166 <at> debbugs.gnu.org, Emacs developers <emacs-devel@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Kaushal Modi <kaushal.modi@HIDDEN> writes:

> When I change the read-onlyness of a file from the disk, M-x revert-buffer
> doesn't reflect that change any more. This is really important as I am working in
> a centralized VCS where the files have to be "checked out" i.e. make writable
> before I can modify them.

I've now reverted the change and reopened bug#35166 -- the problem there
will have to be fixed in a different way.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35166; Package emacs. Full text available.
bug No longer marked as fixed in versions 28.1 and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.
bug marked as fixed in version 28.1, send any further explanations to 35166 <at> debbugs.gnu.org and Mauro Aranda <maurooaranda@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 35166 <at> debbugs.gnu.org:


Received: (at 35166) by debbugs.gnu.org; 22 Jul 2021 14:26:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 22 10:26:05 2021
Received: from localhost ([127.0.0.1]:41443 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m6ZeH-0004dq-Ih
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2021 10:26:05 -0400
Received: from quimby.gnus.org ([95.216.78.240]:55602)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1m6ZeF-0004dG-Ce
 for 35166 <at> debbugs.gnu.org; Thu, 22 Jul 2021 10:26:05 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=NwXIdyni5fh2h9arLGbE4KBsiosgIWIDZ2YdubCT1lk=; b=lyjKSpPSVuDBr0ZJzJuNt4ArPw
 HOzPc/lNSFAn9JYgYx67MYb6Jmc4V/wItQfy7/3/+dDXwKySrImVibXVLwgIpAf2EMw118eaJE+Qy
 daR8SIsA1EG/j6HojEUqW25s8FxBJun2Cd6s5QdNg1PZJS/fNOJnvQCQTPCxWg6pXF4k=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1m6Ze6-0003UR-TW; Thu, 22 Jul 2021 16:25:57 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Mauro Aranda <maurooaranda@HIDDEN>
Subject: Re: bug#35166: 27.0.50; Buffer state inconsistent after
 vc-retrieve-tag
References: <CABczVwdVC08FC9106iW701JxQ1HcOjz10xLityCcEjZqYDft_g@HIDDEN>
 <87bl7xolie.fsf@HIDDEN> <87fsx8fwbr.fsf@HIDDEN>
X-Now-Playing: Nazar's _Guerrilla_: "Bunker (ft Shannen Sp)"
Date: Thu, 22 Jul 2021 16:25:54 +0200
In-Reply-To: <87fsx8fwbr.fsf@HIDDEN> (Mauro Aranda's message of
 "Wed, 23 Jun 2021 12:13:28 -0300")
Message-ID: <87eebqifwt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Mauro Aranda <maurooaranda@HIDDEN> writes: > FWIW, I've
 been saving the readedness since I reported this bug by using >
 before-revert-hook
 and after-revert-hook. > > I don't know if vc-retrieve-tag should save it,
 but I think leaving the > buf [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 35166
Cc: 35166 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Mauro Aranda <maurooaranda@HIDDEN> writes:

> FWIW, I've been saving the readedness since I reported this bug by using
> before-revert-hook and after-revert-hook.
>
> I don't know if vc-retrieve-tag should save it, but I think leaving the
> buffer in this state (view-mode on and not read-only) should be avoided,
> if possible.

Nobody else had an opinion, so I've now made revert-buffer preserve
buffer-read-only on the trunk, and we'll see whether that messes up
anybody's work flow...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35166; Package emacs. Full text available.

Message received at 35166 <at> debbugs.gnu.org:


Received: (at 35166) by debbugs.gnu.org; 23 Jun 2021 15:12:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 23 11:12:15 2021
Received: from localhost ([127.0.0.1]:41668 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lw4Y3-00055X-9e
	for submit <at> debbugs.gnu.org; Wed, 23 Jun 2021 11:12:15 -0400
Received: from mail-qt1-f172.google.com ([209.85.160.172]:40515)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maurooaranda@HIDDEN>) id 1lw4Y2-00055L-13
 for 35166 <at> debbugs.gnu.org; Wed, 23 Jun 2021 11:12:14 -0400
Received: by mail-qt1-f172.google.com with SMTP id t9so2312460qtw.7
 for <35166 <at> debbugs.gnu.org>; Wed, 23 Jun 2021 08:12:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=EUoRUKoojbPd6bIsvAvvysSEa5Y0pwwsz72v0g0GKeU=;
 b=sUmN8wMOd75oXk0BRaJg11Hus0WwzBcxaJBCJXBFMfGHC/yetwpe8wHKVnfpSe3QPm
 zAfm4BeeYsosfaaW9OqZ6yMrVYCTG+XgumO7zPrFbE7qKXOvQ0J6XJcxSSVespjWyTom
 PRxVY5k0iPqsk+TJuubctgqWX3fERwkEYqieBVC+onhVmVo509ifyRGRGy//9L3onoXL
 cLZVkbyh9brxtkIUmczkFtbGvo3LgejCYmW5147xjo1lbTo9vshOb3KBGUTnHw1AGTk7
 q83vI6bPDGOF/oHXHCNzGv2i33J977ROgBKUL+4XbyVNCLeZYb3SxkviBzkl1mlnPGek
 xUHA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=EUoRUKoojbPd6bIsvAvvysSEa5Y0pwwsz72v0g0GKeU=;
 b=bJY707fJ9ErQdw/dAHZ1fEwsxp+z6vrTkS/gW43oKWFJxg/8IX2CpDGC1CxumFVs7v
 +w4mPFFOy8vJt7TskWHAfgnmh+jgJovYP1w5ofrXu/g65Fqkin+1aoNvDELXNyeJtVBT
 0x+mKYYKQRySiehZA1N+cD4SdzG087pvYDyjqe7f/8D4utEo+XI08Q/O//QlJ4hkiCx8
 T0WMsgdkNBYyCvoXWx6nrgGb1kdeDku2FSDmudND4RPUbrYlNvN2C+kZIwmOzJDmd4Ww
 C9SeiSbeJH/qICreQsoAuFwhpu9E31akSTbTuGqeq1ZJZ/5T+KIOkbdVY2oiQ2imu3G2
 KETQ==
X-Gm-Message-State: AOAM532rW+8IynyAd13q8ZmlafSw2eXFlYaMnJdphtAfFzHJDAr1HBiv
 C4S+hP5erSQ31/Sr6BI0qB+E1oue4NM=
X-Google-Smtp-Source: ABdhPJyl3PfHCP8AOVXCR0NbeP5PeK+18YT1wRCTUX0OdXpLOlOhpNkLry+K4lW1Gv88rPgODT5j/A==
X-Received: by 2002:a05:622a:11c3:: with SMTP id
 n3mr325035qtk.211.1624461127827; 
 Wed, 23 Jun 2021 08:12:07 -0700 (PDT)
Received: from tbb.theblackbeard.org ([201.213.132.172])
 by smtp.gmail.com with ESMTPSA id l14sm150053qtj.26.2021.06.23.08.12.05
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 23 Jun 2021 08:12:07 -0700 (PDT)
From: Mauro Aranda <maurooaranda@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#35166: 27.0.50; Buffer state inconsistent after
 vc-retrieve-tag
References: <CABczVwdVC08FC9106iW701JxQ1HcOjz10xLityCcEjZqYDft_g@HIDDEN>
 <87bl7xolie.fsf@HIDDEN>
Date: Wed, 23 Jun 2021 12:13:28 -0300
In-Reply-To: <87bl7xolie.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Tue,
 22 Jun 2021 19:30:01 +0200")
Message-ID: <87fsx8fwbr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 35166
Cc: 35166 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

> Mauro Aranda <maurooaranda@HIDDEN> writes:
>
>> Please, consider either improving what 'vc-retrieve-tag' does, regarding the
>> previous state of the buffer, or improving the documentation about this
>> behavior.  Or, if you think I'm plain wrong, please explain me the
>> reasons, since I would like to understand more of it.
>
> I think it would make sense for `vc-retrieve-tag' to preserve the
> readedness of the buffer.  Anybody got any comments here?

FWIW, I've been saving the readedness since I reported this bug by using
before-revert-hook and after-revert-hook.

I don't know if vc-retrieve-tag should save it, but I think leaving the
buffer in this state (view-mode on and not read-only) should be avoided,
if possible.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35166; Package emacs. Full text available.

Message received at 35166 <at> debbugs.gnu.org:


Received: (at 35166) by debbugs.gnu.org; 22 Jun 2021 17:41:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 22 13:41:02 2021
Received: from localhost ([127.0.0.1]:39839 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lvkOU-0003eN-MO
	for submit <at> debbugs.gnu.org; Tue, 22 Jun 2021 13:41:02 -0400
Received: from quimby.gnus.org ([95.216.78.240]:39114)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1lvkOT-0003dl-8Y
 for 35166 <at> debbugs.gnu.org; Tue, 22 Jun 2021 13:41:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=9fsgx8tNNrbIDILOqRHEbPSOIE1zxnKYmGjDrvC57lE=; b=O8o2xJlOW3eFq2qPRH0LPRps7o
 tdfRSPo08vneTAoLWeG4aE6wk591C3yJzxIloLPqVKzDNCq8Lupr9IY1EDA1Gope0UdtXsjSjzFwc
 ViY4+fHZ0cpgvipk9lB754GPrVxlafkhv7PNB8EGG3fexpB6kPJ/ZB2soGGCa3PP7hMs=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1lvkOK-0000zB-HB; Tue, 22 Jun 2021 19:40:54 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Mauro Aranda <maurooaranda@HIDDEN>
Subject: Re: bug#35166: 27.0.50; Buffer state inconsistent after
 vc-retrieve-tag
References: <CABczVwdVC08FC9106iW701JxQ1HcOjz10xLityCcEjZqYDft_g@HIDDEN>
 <87bl7xolie.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEUhGRMkGxNaOi2+
 nJurWkn///+df6DXAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UGFhEoFV0LXnQAAAG+SURBVDjLZZOL
 udsgDIUh6QASvQMYXQ3QGga4wdp/ph7JroNj5Yvj8KOjF6R0s8xueCG8ZeLMOdZEWKqDLG5VZnOA
 D8Hjppb4NNdxWQ7FVCqHb3v23tsflsIMXUol5Cutj9X+rpRLFd9J/6VI5KV1LBkRfY0S0a5v46Vs
 yzuBw+Nx5HkDzxa2TiA6kB/te/tefy9zNQhC/GuzTdbnDPbiEGNo/Vqu5UcvseXaluS9pdhB6VOJ
 jy03EFu95hu4yp/gM+7sATFkfA+OzETNhD4BpYcB2GsCmCYOSlUTgDF7RHEQArsCz4gBRoELzYBQ
 M2G7g3fP9jKyg/ohlSMD24NMUtWPAvHYgyyXOghnOrQUwI8z7QC/OYK8SJY4ymflFYF0QwSmdE4h
 +sSlatv6EoAi4aNXZVhrfSGfsGcZAAeeijj4EZ983IQA4l/z5j5wqnEBUDGehzkYhXcF+PjaEFEA
 NDLuhlsJ4H99fmLv+5mq6JASUg7GDKyLqm0R5PTxEW3dsHHDqo3DwwQxvBcBoNaHZ6A6NFkY/rcu
 pi08hoqDhlHAq3X1E1S5jB14BB9R6wPJNfdGBgdAd12KGc9D+R9mcWmmh4psdgAAACV0RVh0ZGF0
 ZTpjcmVhdGUAMjAyMS0wNi0yMlQxNzo0MDoyMSswMDowMGEDJOAAAAAldEVYdGRhdGU6bW9kaWZ5
 ADIwMjEtMDYtMjJUMTc6NDA6MjErMDA6MDAQXpxcAAAAAElFTkSuQmCC
X-Now-Playing: Neil Young & Crazy Horse's _Live Rust_: "After the Gold Rush"
Date: Tue, 22 Jun 2021 19:40:52 +0200
In-Reply-To: <87bl7xolie.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Tue,
 22 Jun 2021 19:30:01 +0200")
Message-ID: <875yy5ol0b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Lars Ingebrigtsen <larsi@HIDDEN> writes: > Reversion now
 preserves buffer-readedness, if I understand correctly. Er, sorry -- not
 it doesn't -- only automatic autoreversion does, as Mauro already said. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 35166
Cc: 35166 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

> Reversion now preserves buffer-readedness, if I understand correctly.

Er, sorry -- not it doesn't -- only automatic autoreversion does, as
Mauro already said.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35166; Package emacs. Full text available.
Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 35166 <at> debbugs.gnu.org:


Received: (at 35166) by debbugs.gnu.org; 22 Jun 2021 17:30:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 22 13:30:13 2021
Received: from localhost ([127.0.0.1]:39830 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lvkE1-0003O6-CC
	for submit <at> debbugs.gnu.org; Tue, 22 Jun 2021 13:30:13 -0400
Received: from quimby.gnus.org ([95.216.78.240]:38970)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1lvkDz-0003Mn-UQ
 for 35166 <at> debbugs.gnu.org; Tue, 22 Jun 2021 13:30:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=QuQmG/+1Ot8ovNomAk/+Z9SFkFjBrh95NAij7Iwfp6k=; b=oO7SQ7SrtK9xf4ttsZGTpqWs6K
 VH5i+pbjhYJvCwcVLxuk2YCjrHi3EgyL7AStCNrS4A10u1gMH107+Ds5ALQiizSFzkbv/aSH9ZwUf
 Dhdj7mcu36Mvd4GiMTC1sn7/SHYgukt7eDRdN1CCTTbHuB0cYs4MjMiXZczT1BKYxLOk=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1lvkDq-0000rI-9G; Tue, 22 Jun 2021 19:30:05 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Mauro Aranda <maurooaranda@HIDDEN>
Subject: Re: bug#35166: 27.0.50; Buffer state inconsistent after
 vc-retrieve-tag
References: <CABczVwdVC08FC9106iW701JxQ1HcOjz10xLityCcEjZqYDft_g@HIDDEN>
X-Now-Playing: Neil Young & Crazy Horse's _Rust Never Sleeps_: "Hey Hey, My
 My (Into The Black)"
Date: Tue, 22 Jun 2021 19:30:01 +0200
In-Reply-To: <CABczVwdVC08FC9106iW701JxQ1HcOjz10xLityCcEjZqYDft_g@HIDDEN>
 (Mauro Aranda's message of "Fri, 5 Apr 2019 18:41:34 -0300")
Message-ID: <87bl7xolie.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Mauro Aranda <maurooaranda@HIDDEN> writes: > Suppose the
 following workflow for exploring code, under version > control: > 1. Start
 emacs: emacs -Q. > 2. Visit a directory in Dired mode,
 e.g. C-x d "emacs/lisp/eshell". > 3. Navigate to a file, [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 35166
Cc: 35166 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Mauro Aranda <maurooaranda@HIDDEN> writes:

> Suppose the following workflow for exploring code, under version
> control:
> 1. Start emacs: emacs -Q.
> 2. Visit a directory in Dired mode, e.g. C-x d "emacs/lisp/eshell".
> 3. Navigate to a file, and type 'v'.
> 4. While exploring, one may wish to switch branch, so type:
> C-x v r BRANCH-NAME
>
> I find the following to be inconsistent:
>
> 'vc-retrieve-tag' makes an effort to preserve the modes in the file.
> So it preserves View mode.  But the file is no longer read-only.

I can confirm that this behaviour is still present in Emacs 28.

> This way, the buffer ends up being writable, but with View mode
> enabled, and I find it a little confusing.  I understand if that is to
> respect 'revert-buffer' design, as I infer from this message: [1]
> https://lists.gnu.org/archive/html/emacs-devel/2004-09/msg00002.html

I think this was changed in:

commit 90e118abf2dcc4aca4d7a7642247fa488554351e
Author:     Luc Teirlinck <teirllm@HIDDEN>
AuthorDate: Fri Sep 3 22:28:10 2004 +0000

    (auto-revert-handler): Bind `buffer-read-only' locally around the call
    to `revert-buffer'.

Reversion now preserves buffer-readedness, if I understand correctly.

> Please, consider either improving what 'vc-retrieve-tag' does, regarding the
> previous state of the buffer, or improving the documentation about this
> behavior.  Or, if you think I'm plain wrong, please explain me the
> reasons, since I would like to understand more of it.

I think it would make sense for `vc-retrieve-tag' to preserve the
readedness of the buffer.  Anybody got any comments here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35166; Package emacs. Full text available.
Added tag(s) confirmed. Request was from Akshay Gaikwad <akgaikwad001@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 35166 <at> debbugs.gnu.org:


Received: (at 35166) by debbugs.gnu.org; 4 May 2019 21:17:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 04 17:17:10 2019
Received: from localhost ([127.0.0.1]:52493 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hN21u-0005Zs-BE
	for submit <at> debbugs.gnu.org; Sat, 04 May 2019 17:17:10 -0400
Received: from mail-lj1-f177.google.com ([209.85.208.177]:33054)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maurooaranda@HIDDEN>) id 1hN21t-0005ZO-4g
 for 35166 <at> debbugs.gnu.org; Sat, 04 May 2019 17:17:09 -0400
Received: by mail-lj1-f177.google.com with SMTP id f23so8040982ljc.0
 for <35166 <at> debbugs.gnu.org>; Sat, 04 May 2019 14:17:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=rjSA0wKqiNY9gs63wtD4HRj5qEhpjm/QpsJxKIlUwrI=;
 b=ewVxyWRxbyBwWGoaGzEcIj4A65050vQYiMVf+CI5CX8PL0qPX6AlkxjdGIsfG9DAdk
 OSDwSod6ziyCYalSnaI2g1LWQoGSPnl8ciNEgMW2a4FLSt04XTksHsGr0kOF5PpT9NWN
 YYHmy6+f+NzR4VUDZD4YqaZoZCzgxHC9Z8spDLNUfJM9ccMY8IZw2Ek0mNsHJ9zuxKCt
 /APYM5VgR7p+pQxWr02/yuJ2Wvm/jg/2tw+0L1RLwWLTGAUgSiGGpuD4Y7wgzsWCZIXo
 xYWL1MBbQpL3pi873EQmiQaBEjCu+4UvAWwYVkZt3vHdYANVKRZpwa9hfodiukqKwQMh
 aSxg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=rjSA0wKqiNY9gs63wtD4HRj5qEhpjm/QpsJxKIlUwrI=;
 b=k9xGaIRkOVogrboU+f4wgj4aAtkxh/tp/KwOSOxqUi49jTZF8DDJZ6+YQCWIaoKXmy
 S2dFV/ViMmO5OD8uG0UXOF0aMv4jUPaCadVpyF36R+11OKRB7Vx6j0EknujG74/Pcspg
 1vg1LQumdYnlTzjWjVWiF/71JL4Bqc7+fMGQNLp9y8qOsJUrqCbZpyX5Y9Ecicym4rMR
 Yr+r58IuoTSxdocepZv9UEMtpaK8N2LZc6drZPQMBB26/zNog5X9YAGiAaWjKAYPrvzI
 50zWkPOBDzuut5zABH8pPVdh61IlixZ0AXhzYhiqcLIGlyZJsTh88Bj5SMSA89iVJX0S
 SMWw==
X-Gm-Message-State: APjAAAVdbIlTdKyt0/11h+qT5h6uwKcqa7rYaRiuTH7nXdeeeya8t/Zm
 j6oV5gJodhyUlbpexC2+8MuK61Co6OK/ND256z2EZZXN
X-Google-Smtp-Source: APXvYqwfhM8bsnkaq2/YhphpFoM0gapbXrsQLkTHWqB0QR1rK076KcqdW9OBKdkNCJy0HWjTr30pcIVifYrly0QG42Y=
X-Received: by 2002:a2e:1f02:: with SMTP id f2mr9054842ljf.86.1557004622784;
 Sat, 04 May 2019 14:17:02 -0700 (PDT)
MIME-Version: 1.0
References: <CABczVwdVC08FC9106iW701JxQ1HcOjz10xLityCcEjZqYDft_g@HIDDEN>
In-Reply-To: <CABczVwdVC08FC9106iW701JxQ1HcOjz10xLityCcEjZqYDft_g@HIDDEN>
From: Mauro Aranda <maurooaranda@HIDDEN>
Date: Sat, 4 May 2019 18:16:49 -0300
Message-ID: <CABczVweN37T9uM2-o=-Tin51gHjoeuFnB=JJw2HUx0cO81se=w@HIDDEN>
Subject: Re: bug#35166: 27.0.50;
 Buffer state inconsistent after vc-retrieve-tag
To: 35166 <at> debbugs.gnu.org
Content-Type: multipart/alternative; boundary="000000000000746ba50588166342"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 35166
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000746ba50588166342
Content-Type: text/plain; charset="UTF-8"

Hello.

Any thoughts on this?

--000000000000746ba50588166342
Content-Type: text/html; charset="UTF-8"

<div dir="ltr"><div>Hello.</div><div><br></div><div>Any thoughts on this?</div></div>

--000000000000746ba50588166342--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35166; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Apr 2019 21:42:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 05 17:42:17 2019
Received: from localhost ([127.0.0.1]:46346 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hCWbI-0004hf-Oi
	for submit <at> debbugs.gnu.org; Fri, 05 Apr 2019 17:42:17 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39837)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maurooaranda@HIDDEN>) id 1hCWbD-0004hL-Om
 for submit <at> debbugs.gnu.org; Fri, 05 Apr 2019 17:42:12 -0400
Received: from lists.gnu.org ([209.51.188.17]:38067)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <maurooaranda@HIDDEN>)
 id 1hCWb8-00038b-Am
 for submit <at> debbugs.gnu.org; Fri, 05 Apr 2019 17:42:06 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54152)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <maurooaranda@HIDDEN>) id 1hCWb6-0001sM-R1
 for bug-gnu-emacs@HIDDEN; Fri, 05 Apr 2019 17:42:06 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE,URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <maurooaranda@HIDDEN>) id 1hCWb5-00031C-Cf
 for bug-gnu-emacs@HIDDEN; Fri, 05 Apr 2019 17:42:04 -0400
Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:42426)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <maurooaranda@HIDDEN>)
 id 1hCWb2-0002hJ-Pz
 for bug-gnu-emacs@HIDDEN; Fri, 05 Apr 2019 17:42:03 -0400
Received: by mail-lf1-x12c.google.com with SMTP id v24so2411020lfe.9
 for <bug-gnu-emacs@HIDDEN>; Fri, 05 Apr 2019 14:41:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=azDPoL+0/AxeeF22CN6Bw9EW9wcKO4g+0kOvtolcOpk=;
 b=XALp+Ug1upXbltl60rETnDIHEzerisRElsVJb+k8DGOeyxO9iZTVuSOi6aNRNEqfbd
 9ioqQGkv2cHz2Jl4Ubx/xulmJZnLPR/twEaC+H5zshx6mi/pV3OXv0WRLvC7/XRidy7g
 zf1+waPD19db523axI3IMDpdGkS4qnXnQQsQrmBzPrBL2pdJvCIKNS5+uDOkovY1wW1q
 y3yza5qrvSBcRvmQAzNXU5BJs3fEhiWS5x1RpMqfAYidaxYRpheDNNvFBF8EfjNaAs5c
 BL5p4huDIeBxI6Y/RgvwV30UbL22yUYKcGI2OH4q0vg+ttP4Sa/6MqhaSA8p5fbUtUUy
 wTEw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=azDPoL+0/AxeeF22CN6Bw9EW9wcKO4g+0kOvtolcOpk=;
 b=BjuN453iQKrlNgR17uugA3ldpDHVAeTr90gjKJR9Yp0Vx7OSij3rxM4e38rzU2iiPB
 qn+OPjxx0hwFeFxggjUFYroSQ5v+mD42d3sMepK25x1pt8N0Sl/n2aT4BGw5aSyvjqm1
 e2Y9bb5pdmBSW5B8HyAwUpq3YGNznwMXzjqa4fRv4Pu/JCwLCzxs91zGXPTNVR6+cnmx
 8fgNJDOMVNA92UmCZuy3uiULByHSE/MqmZOc6ZPmxMwCwEE6f+bh4yYyxCXLln0taVkq
 pCPqdqUAQ3fvY3Db+lyqmHXc1a1pB5/mbXlVmXNvcI6UF/H0rZDzfKImcq19QkguJmz8
 bJ5g==
X-Gm-Message-State: APjAAAWUfnGaSTZnGmFL57qr8bQx9LBUBeQLOR1Aei8VXj0LtOdn/99K
 YddKCmSH8fOEnZaXBGcuuVbaaNI6FTPfYhW4dLROQBPd
X-Google-Smtp-Source: APXvYqzCPt1wyabhQqCwGBJsf44Ywez3gt8HdvyWSclzd6ltI4a5k05VktbHWtnh2C0dA+sVO7Mj1eg5GwThEOY6ikc=
X-Received: by 2002:ac2:5205:: with SMTP id a5mr7963737lfl.102.1554500506640; 
 Fri, 05 Apr 2019 14:41:46 -0700 (PDT)
MIME-Version: 1.0
From: Mauro Aranda <maurooaranda@HIDDEN>
Date: Fri, 5 Apr 2019 18:41:34 -0300
Message-ID: <CABczVwdVC08FC9106iW701JxQ1HcOjz10xLityCcEjZqYDft_g@HIDDEN>
Subject: 27.0.50; Buffer state inconsistent after vc-retrieve-tag
To: bug-gnu-emacs <bug-gnu-emacs@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000806c910585cf5a0e"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2a00:1450:4864:20::12c
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--000000000000806c910585cf5a0e
Content-Type: text/plain; charset="UTF-8"

Hello.

Suppose the following workflow for exploring code, under version
control:
1. Start emacs: emacs -Q.
2. Visit a directory in Dired mode, e.g. C-x d "emacs/lisp/eshell".
3. Navigate to a file, and type 'v'.
4. While exploring, one may wish to switch branch, so type:
C-x v r BRANCH-NAME

I find the following to be inconsistent:

'vc-retrieve-tag' makes an effort to preserve the modes in the file.
So it preserves View mode.  But the file is no longer read-only.  This
way, the buffer ends up being writable, but with View mode enabled, and
I find it a little confusing.  I understand if that is to respect
'revert-buffer' design, as I infer from this message:
[1] https://lists.gnu.org/archive/html/emacs-devel/2004-09/msg00002.html
But I think the user could at least be warned about this, in the manual
(perhaps in the VC Branches section).

After reading [1], I tested the workflow with auto-revert-mode set to 't',
and
it works as expected, based on the information in the following messages
to [1].

Trying out simple solutions for myself, I answered "no" to the prompt
that VC puts: "Update any affected buffers? (yes or no)".  I wouldn't
answer no in the workflow I described, but I answered "no" just for the
sake of it.  I ended up with the buffer being updated, and again with
View mode enabled, but not with buffer-read-only set to 't'.
So I wonder, what is the effect of answering "yes" or "no"?  What does
it update, and what does it not?  I couldn't find such information in
the VC section of the manual.

Please, consider either improving what 'vc-retrieve-tag' does, regarding the
previous state of the buffer, or improving the documentation about this
behavior.  Or, if you think I'm plain wrong, please explain me the
reasons, since I would like to understand more of it.

Best regards,
Mauro.

--000000000000806c910585cf5a0e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">Hello.<br><br>Suppose the following workf=
low for exploring code, under version<br>control:<br>1. Start emacs: emacs =
-Q.<br>2. Visit a directory in Dired mode, e.g. C-x d &quot;emacs/lisp/eshe=
ll&quot;.<br>3. Navigate to a file, and type &#39;v&#39;.<br>4. While explo=
ring, one may wish to switch branch, so type:<br>C-x v r BRANCH-NAME<br><br=
>I find the following to be inconsistent:<br><br>&#39;vc-retrieve-tag&#39; =
makes an effort to preserve the modes in the file.<br>So it preserves View =
mode.=C2=A0 But the file is no longer read-only.=C2=A0 This<br>way, the buf=
fer ends up being writable, but with View mode enabled, and<br>I find it a =
little confusing.=C2=A0 I understand if that is to respect<br>&#39;revert-b=
uffer&#39; design, as I infer from this message:<br>[1] <a href=3D"https://=
lists.gnu.org/archive/html/emacs-devel/2004-09/msg00002.html">https://lists=
.gnu.org/archive/html/emacs-devel/2004-09/msg00002.html</a><br>But I think =
the user could at least be warned about this, in the manual<br>(perhaps in =
the VC Branches section).<br><br>After reading [1], I tested the workflow w=
ith auto-revert-mode set to &#39;t&#39;, and<br>it works as expected, based=
 on the information in the following messages<br>to [1].<br><br>Trying out =
simple solutions for myself, I answered &quot;no&quot; to the prompt<br>tha=
t VC puts: &quot;Update any affected buffers? (yes or no)&quot;.=C2=A0 I wo=
uldn&#39;t<br>answer no in the workflow I described, but I answered &quot;n=
o&quot; just for the<br>sake of it.=C2=A0 I ended up with the buffer being =
updated, and again with<br>View mode enabled, but not with buffer-read-only=
 set to &#39;t&#39;.<br>So I wonder, what is the effect of answering &quot;=
yes&quot; or &quot;no&quot;?=C2=A0 What does<br>it update, and what does it=
 not?=C2=A0 I couldn&#39;t find such information in<br>the VC section of th=
e manual.<br><br>Please, consider either improving what &#39;vc-retrieve-ta=
g&#39; does, regarding the<br>previous state of the buffer, or improving th=
e documentation about this<br>behavior.=C2=A0 Or, if you think I&#39;m plai=
n wrong, please explain me the<br>reasons, since I would like to understand=
 more of it.<br><br>Best regards,<br>Mauro.<br></div></div>

--000000000000806c910585cf5a0e--




Acknowledgement sent to Mauro Aranda <maurooaranda@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#35166; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 25 Aug 2021 14:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.