From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#74637: [PATCH] Make view-read-only behave like view-file Date: Tue, 03 Dec 2024 19:55:04 +0530 Message-ID: <87ldwwoncv.fsf@gmail.com> References: <86ldwy46al.fsf@gnu.org> <86o71t3mob.fsf@gnu.org> <86zflc27dl.fsf@gnu.org> 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="40695"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: =?UTF-8?Q?Bj=C3=B6rn?= Bidar , Andrea Corallo , 74637@debbugs.gnu.org, Stefan Kangas To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 03 15:27:24 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 1tITs2-000AQy-BV for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 Dec 2024 15:27:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tITrm-00061e-1v; Tue, 03 Dec 2024 09:27:06 -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 1tITrj-00061N-2Y for bug-gnu-emacs@gnu.org; Tue, 03 Dec 2024 09:27:04 -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 1tITri-0007qO-OT for bug-gnu-emacs@gnu.org; Tue, 03 Dec 2024 09:27: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=D0u7zXMhHg162xazOJc8QbFVZkbxO0yB+m9xhjTZQsg=; b=iqtP644Zc8i/GXWhLmaEFx2t/qPjA5uB+GFDaRZDaxpE09DamhxWpoet5Zj3fwI5xWzTczRur0aeVA8VQDZoMDUUkYljsI3WdPnjSS0WoeyGYlaA3mnUUvfM3ZVexDQmau8FH7icGQZ0VwafERdWsUtoubH5d0mEHKG5fiPwCYz4K7kL2gDf5yDve/Lvw84qc0vg4/AfqieCW06Pxhs6yifTteV0mf22OogLwWaf7KDXuyl3G1OAin/kwc7BXqCD26xuGNsIR8fVzX+GoDy/4VROxxcQt8Xtz2KGQyvUPna4cKZH1MTmfAkV5Ffb6B6tJuf6hbXiDPW28n62elnEDA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tITri-000110-9B for bug-gnu-emacs@gnu.org; Tue, 03 Dec 2024 09:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Dec 2024 14:27:02 +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.17332359743830 (code B ref 74637); Tue, 03 Dec 2024 14:27:02 +0000 Original-Received: (at 74637) by debbugs.gnu.org; 3 Dec 2024 14:26:14 +0000 Original-Received: from localhost ([127.0.0.1]:58822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tITqv-0000zi-9T for submit@debbugs.gnu.org; Tue, 03 Dec 2024 09:26:13 -0500 Original-Received: from mail-pg1-f196.google.com ([209.85.215.196]:54750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tITqs-0000zY-Kd for 74637@debbugs.gnu.org; Tue, 03 Dec 2024 09:26:11 -0500 Original-Received: by mail-pg1-f196.google.com with SMTP id 41be03b00d2f7-7ee11ff7210so3867260a12.1 for <74637@debbugs.gnu.org>; Tue, 03 Dec 2024 06:26:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733235910; x=1733840710; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=D0u7zXMhHg162xazOJc8QbFVZkbxO0yB+m9xhjTZQsg=; b=CpaOsdHA4RvWM54H4uGNFnlK42oc71EK7m7KXr7ilSRFG60uGfz7bU8XJfEfwWCWHn 9GlyKBB2SlyVPkocOKHSXZzX+ZUVrDWen1ZgvS5/j7JRauLIP9XxRHoAX3k0zSMdu4+A gvgBHn4vuxk4zpdKBe8w/51dH89PDYpXkiM+meuGhxQcCZVMWRzHzdetYxBsMMCQk3lN cr6mdhVxAKmVpwhNAHhv+j3Xm8oyxfNUHCuDG+tJawSV14Y2g7uQBtZxl5qndfdAttYI 8GeJl1NvVN2UqIvB5UBM/LwYgu662uu89+Kn3Y3Wf6kcZoQZ9caE8CvPX4BL6YiMmgE5 Mv9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733235910; x=1733840710; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=D0u7zXMhHg162xazOJc8QbFVZkbxO0yB+m9xhjTZQsg=; b=p4AH+AQXz6AbUFqH1Pju41AfaHtagzSy3/la4PvM22xfd1WQPKY6fAyN2bvWEsfK1S S9WSu43pLqe33rAG0KzKafWDP5TbXvAqGmgRfoUY4z40GuStKXpNluv7BvQf3l2w8HLG E0+HAAHhL4wAyUKQ+LqIHU81lPPTYBtwfbmsHRG/m4QSj4POWHekqojs3XL1ntY3cvvS usEHarbGPZgklIscbb1yvc0QA6o4QrX2YeTmfos5xxlwUEKK2iJkP58TqWK+G5y1woyC hbRyKYfBe6zEMzqXywR0W1XDXVqoePMcjxS+O/pffCr+KDL23FJCW4V4pZF5LUk76YUX kgMg== X-Forwarded-Encrypted: i=1; AJvYcCWjspnHvieA2kw4wJsziFAw0dwVx54pseb5v0DdHKP0mMNka7UqMgvm8SQIPQGBP8CQWWeRHg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyQcB0QY4tLrCl51rx1tlupErMXtt7Az5hy4sOOyMC06cLni096 5GsuuaNf19a4i8HfzDxXfu9Ol39SO4ewmMDZ7XL9l1YVJ7KQnsIM X-Gm-Gg: ASbGncsnn8FF1OXH2W/T3hh0bazgiylDxiuHVvw+Srw10VCAjTR6tI+zLru3wckSJdt hi40g+cjLMPLNN36QublqYIR1g55cfmfXdoTVA4tQYrbdTYx5iU7p9F9fTY/r0JSjY4blxKRV0T opxmUBE+4p68QYSXGn4uEefun5oq2gtk35qSe6F/xbvebmSAuH1KB6gCw+DFgKXRGYqu7fS5kpG uudGJ9Ay4aqviJQueJN10XY7SRFRweDunqTREfJSOv/20OZsBI= X-Google-Smtp-Source: AGHT+IER2YKJAv9Xdp/4yNO86Li6D2OzjSiPH5TgyKwrAf/ZqYKQzAXnnZvGqHJSuFMoX+ryh04vPQ== X-Received: by 2002:a05:6a20:3d81:b0:1e0:f05b:e72a with SMTP id adf61e73a8af0-1e1653d0dabmr3863060637.27.1733235909658; Tue, 03 Dec 2024 06:25:09 -0800 (PST) Original-Received: from localhost ([1.7.159.70]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7254176fe28sm10489810b3a.72.2024.12.03.06.25.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2024 06:25:09 -0800 (PST) In-Reply-To: <86zflc27dl.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 03 Dec 2024 16:01:10 +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:296371 Archived-At: [=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 03= , 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 can >> >> > we be sure that everyone agrees with your interpretation of this mo= de? >> >>=20 >> >> All other view-file like modes behave like this, you view the file and >> >> 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.