From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#35166: 27.0.50; Buffer state inconsistent after vc-retrieve-tag Date: Tue, 22 Jun 2021 19:30:01 +0200 Message-ID: <87bl7xolie.fsf@gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7633"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 35166@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 22 19:31:48 2021 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 1lvkFX-0001fr-6S for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Jun 2021 19:31:47 +0200 Original-Received: from localhost ([::1]:54460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvkFW-0002Ki-5X for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Jun 2021 13:31:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvkEo-0001QL-CR for bug-gnu-emacs@gnu.org; Tue, 22 Jun 2021 13:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56520) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lvkEo-0004PD-3c for bug-gnu-emacs@gnu.org; Tue, 22 Jun 2021 13:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lvkEn-0003PT-Pd for bug-gnu-emacs@gnu.org; Tue, 22 Jun 2021 13:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Jun 2021 17:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35166 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 35166-submit@debbugs.gnu.org id=B35166.162438301313031 (code B ref 35166); Tue, 22 Jun 2021 17:31:01 +0000 Original-Received: (at 35166) by debbugs.gnu.org; 22 Jun 2021 17:30:13 +0000 Original-Received: from localhost ([127.0.0.1]:39830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvkE1-0003O6-CC for submit@debbugs.gnu.org; Tue, 22 Jun 2021 13:30:13 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:38970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvkDz-0003Mn-UQ for 35166@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=; Original-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 ) id 1lvkDq-0000rI-9G; Tue, 22 Jun 2021 19:30:05 +0200 X-Now-Playing: Neil Young & Crazy Horse's _Rust Never Sleeps_: "Hey Hey, My My (Into The Black)" In-Reply-To: (Mauro Aranda's message of "Fri, 5 Apr 2019 18:41:34 -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:208878 Archived-At: Mauro Aranda 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 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