From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74637: [PATCH] Make view-read-only behave like view-file Date: Tue, 03 Dec 2024 21:33:29 +0200 Message-ID: <33201.5709647507$1733254471@news.gmane.org> References: <86ldwy46al.fsf@gnu.org> <86o71t3mob.fsf@gnu.org> <86zflc27dl.fsf@gnu.org> <87ldwwoncv.fsf@gmail.com> Reply-To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35140"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , Andrea Corallo , 74637@debbugs.gnu.org, Stefan Kangas To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 03 20:34:23 2024 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 1tIYf8-0008y2-VQ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 Dec 2024 20:34:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIYes-0005QA-JF; Tue, 03 Dec 2024 14:34:07 -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 1tIYeo-0005Px-Bq for bug-gnu-emacs@gnu.org; Tue, 03 Dec 2024 14:34:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIYeo-0001Pz-3H for bug-gnu-emacs@gnu.org; Tue, 03 Dec 2024 14:34:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=Ygchu1IxnvNZOdvZHtwXWhrkbqAeyekK7kgw+/wlq5Y=; b=B41Z3mn5M4A599RPZeUoaCNm/1aVi6lH4dkLcEavljgSkWHAG5gDzQffgPQni/8ZZEgMJtY1SH2cSX5/nOUoONJRGIxgmXrbAHvZ7KAxwN+QiFdxodTOfmlUAb1UGbNNV4vtdTi/ZOjBKRhj6SU0CgS5RoUfm+FDjUWf1hnF8rtRIZTFWtwGawjHcutDUKyw4ERXwF8SUUmq7QeZoWXfDbtplQOXa1GHy9Kh1Ibu0VhLR4jxoiBkhnrjlb+QvIw1W2AuBQU135eziPJeoWKEMJ8WaGPmUca4f8ipErpJnGDYX4P6AviQWbxuEjERpc/9teIOYKKHSwT+RjCvzXkw4Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tIYen-0007tV-VF for bug-gnu-emacs@gnu.org; Tue, 03 Dec 2024 14:34:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Dec 2024 19:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74637 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74637-submit@debbugs.gnu.org id=B74637.173325441630295 (code B ref 74637); Tue, 03 Dec 2024 19:34:01 +0000 Original-Received: (at 74637) by debbugs.gnu.org; 3 Dec 2024 19:33:36 +0000 Original-Received: from localhost ([127.0.0.1]:32980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIYeN-0007sZ-I9 for submit@debbugs.gnu.org; Tue, 03 Dec 2024 14:33:35 -0500 Original-Received: from thaodan.de ([185.216.177.71]:55240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIYeK-0007sK-Ob for 74637@debbugs.gnu.org; Tue, 03 Dec 2024 14:33:33 -0500 Original-Received: from odin (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49]) by thaodan.de (Postfix) with ESMTPSA id EE878D0004F; Tue, 3 Dec 2024 21:33:30 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1733254411; bh=KRuXSUQUiOZC4HB2e9MxIqhZdCyVj8dNzKPbqXO3Vso=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=EeYFOlkV9g1nE9P57L/HXuiB97NSD/qMfvFfIf7aYsGqEl0Ex1fmVUbpGSqOd/xcm juxg9t1TrAQD6IGaZam2cV50+3GGRtfzuqvDf0gCv8aJEKw23NTYwQtFHvT3YgSo9l D8njnXzwnGPBqXGt26ppKe+bYLabQB76kfbqGdLhjgjAAEOL6L8eGKh1HxdkhZqSMN nQrQeoKnBAKzn57qJf93CsSR3jCw2quqHME4JhDclMvlczWanMCRO389RfmalnrpZh UPdvVhOu/0YKAeKALn0/NugYGOmk80hGI3Wc17YOq6kN1DEO+j4F0MjAVbLw9AZuQW oQ6XtX24l6ig1lBwrwxUxDhMUST/pd+an01n8qSbCPKYhofYGaWNVN9jDTvn2Nj84D pIq3BMu5DcgPFzrhoFqCUhUI64ImZbUhqKk0c2d4yMoLn2IqSR7Xs5AjytX9kP9Say DI3DtCKVG0EyaSOhOxEQPl0ZgPNk4xumLZzfPaw+gYYm5Z8dVPNt/pH7zn6rRFuuu6 im/Zst/NSKo8YHLwxMFuPfZl6ELcmtK1PM65PfPBq+nCPK7GYiQoxH/Zz2BVl9xGwr fDBQN6dwB46pp6Df1GnZrxoOTaeX2nGugEEutejInLTQ7IfcJomFlryAJGJygWt2vR f4yfnYkvNcXjmHck4TlRrRqU= In-Reply-To: <87ldwwoncv.fsf@gmail.com> (Visuwesh's message of "Tue, 03 Dec 2024 19:55:04 +0530") Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH 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:296380 Archived-At: Visuwesh writes: > [=E0=AE=9A=E0=AF=86=E0=AE=B5=E0=AF=8D=E0=AE=B5=E0=AE=BE=E0=AE=AF=E0=AF=8D= =E0=AE=9F=E0=AE=BF=E0=AE=9A=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 0= 3, 2024] Eli Zaretskii wrote: > >>> From: Bj=C3=B6rn Bidar >>> Cc: 74637@debbugs.gnu.org >>> Date: Tue, 03 Dec 2024 12:06:11 +0200 >>>=20 >>> >> > That's an incompatible behavior change. Is that justified? How c= an >>> >> > we be sure that everyone agrees with your interpretation of this m= ode? >>> >>=20 >>> >> All other view-file like modes behave like this, you view the file a= nd >>> >> leave the file with q. >>> > >>> > That doesn't change the fact that view-mode didn't behave like that, >>> > until now. >>>=20 >>> View-mode isn't change outside of the specific situation of opening a >>> file which isn't writable. >> >> It's still a significant change. Killing a buffer is not a minor >> think, and restoring it is not always easy, or even possible (e.g., >> the file could have been deleted in the meantime). >> >> My opinion is that if we install this, we need to provide some way of >> getting the previous behavior back, for those who may want it. >> >> Stefan and Andrea, WDYT? > > I am neither Stefan nor Andrea: there have been a number of instances > where Emacs not eagerly killing buffers has saved accidentally or > prematurely deleted files on my end. I would be opposed to a change > that kills the buffer on exiting view-mode entered due to > view-read-only=3Dt to avoid potential data loss. But does apply to instance of view-read-only? Again it only affects files which are not writable, i.e. those that could not be deleted by the user in the first place. The change is for not writable files plus view-read-only, NOT files which are visited and then view-mode activated through `view-mode` or view-read-only through read-only-mode.