From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Re: Change in `revert-buffer' behavior [28.0.50] Date: Tue, 27 Jul 2021 11:43:35 -0400 Message-ID: References: <87lf5rg4j5.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000c0fe1d05c81cbd7d" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22026"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: =?UTF-8?Q?=C3=93scar_Fuentes?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 27 17:44:52 2021 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 1m8PGG-0005TN-EG for ged-emacs-devel@m.gmane-mx.org; Tue, 27 Jul 2021 17:44:52 +0200 Original-Received: from localhost ([::1]:40086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8PGE-0003GZ-M6 for ged-emacs-devel@m.gmane-mx.org; Tue, 27 Jul 2021 11:44:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8PFf-0002aL-32 for emacs-devel@gnu.org; Tue, 27 Jul 2021 11:44:15 -0400 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:51890) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m8PFd-0008UV-8b for emacs-devel@gnu.org; Tue, 27 Jul 2021 11:44:14 -0400 Original-Received: by mail-wm1-x32a.google.com with SMTP id u15so4493046wmj.1 for ; Tue, 27 Jul 2021 08:44:12 -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=bOFqy2EoedYIv2Jc+z64BJD/qOEGcgOyPiPSqxbJwMo=; b=sVL3Vfqb7hdbMjo3XrX5ziL6dyuUBe+ckB8HMdDgUZ/mxw5HVHcy5RjfVMyOr1mWgj 5Pz6G9Jr0t8bkqP1u1Vnnvl4S+X8txnSuF2atwOlvWLR/+RzZyIv7CG+uz9INR8BAlJ0 fH26UUMKE37ZNszzPBzX3VD5Nn7oZ/IGzXTzY1WBp92+M0chxUOJE+QfYLyhtCCMUcu6 2M/RFrfi55PnILZxCh+zYPrRZL40ih1NC11kJI64BcUjZfYpD3e3cLk3yoquHqw729qo uxJ0P1a/VOAedfU9v7hm8h+tfjSicaOpXkPzv4a7NunsXCfuV/fBxLh80UVk6t/fzvTQ HOIA== 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=bOFqy2EoedYIv2Jc+z64BJD/qOEGcgOyPiPSqxbJwMo=; b=eBK4o+4BtztuSVsMZrg1dBr1904fkY3wy5G6VE90qWH5H2lLajZCvmxonVRk4ksu/B 8TLAFUYchZJNeQA33Smsb7oaExSt3CBZOnfboha8DrFUiH3lgBB1S4umGqZUw2lfBhqh 9gmbgeMTfVToz6Jk5k2+AvTdtyBZVDIuUoUiXx7I8Gb62Ig+n78phuS0uVArgxK6hPdh 6paPkqaQPcPdQuAcDUN7VejGBUcBAORhTDCPJiZUAMmInZVduBqG2LaUbyZ7gu1jFE0b hMrdQSJsLOkOyf7EDzPm4hRGB6SL5cR2jPQ8FKGgl18ZMjffIlkKxdVojrK19Frhesd0 67pw== X-Gm-Message-State: AOAM532nUaRyfflkNVkzqRv/Lxmgmav8OtHCLho6HVH3HCOF+qfzt2hO iFHqq/FA1Y3wdsQcRUpK6NFKQduGH/iWi49XRLw= X-Google-Smtp-Source: ABdhPJwOV64ms73/JWOVwVboXA0CnD8r9QqnyTG5DYnINqgYMkwBsb6x1rn7It56GYuOFQv5JDcpfPU0K81WeHBW3L4= X-Received: by 2002:a05:600c:3b9b:: with SMTP id n27mr4873630wms.188.1627400651733; Tue, 27 Jul 2021 08:44:11 -0700 (PDT) In-Reply-To: <87lf5rg4j5.fsf@telefonica.net> Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=kaushal.modi@gmail.com; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:271702 Archived-At: --000000000000c0fe1d05c81cbd7d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jul 27, 2021 at 11:29 AM =C3=93scar Fuentes wrote: > > I think that the author was trying to preserve the user's decision about > the read-only-ness of the buffer, assuming that the file's permissions > did not change since last visit. > > AFAIK currently we have no method for distinguising if the buffer was > made read-only/writable by the user or because Emacs reflected the file > system's permissions. > I have used `revert-buffer' for more than (gulp) 13 years to always update the buffer to changes in files on disk. That would revert the buffer contents to the latest file contents, read/write permissions, etc. So this change was pretty much a breaking change for me. For context, I use the p4.el package[0] to check-in and check-out files from within Emacs. But after that change, M-x p4-edit checked out the file on the system, but still kept the buffer read-only. So I had to kill and reopen the buffer to have the read-only status update correctly. [0]: https://github.com/gareth-rees/p4.el --000000000000c0fe1d05c81cbd7d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Jul 27, 2021 at 11:29 AM =C3=93scar Fuentes <ofv@wanadoo.es> wrote:

I think that the author was trying to preserve the user's decision abou= t
the read-only-ness of the buffer, assuming that the file's permissions<= br> did not change since last visit.

AFAIK currently we have no method for distinguising if the buffer was
made read-only/writable by the user or because Emacs reflected the file
system's permissions.

I have used `= revert-buffer' for more than (gulp) 13 years to always update the buffe= r to changes in files on disk. That would revert the buffer contents to the= latest file contents, read/write permissions, etc.

So this change was pretty much a breaking change for me. For context, I u= se the p4.el package[0] to check-in and check-out files from within Emacs. = But after that change, M-x p4-edit checked out the file on the system, but = still kept the buffer read-only. So I had to kill and reopen the buffer to = have the read-only status update correctly.

--000000000000c0fe1d05c81cbd7d--