From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74637: [PATCH] Make view-read-only behave like view-file Date: Mon, 02 Dec 2024 21:33:08 +0200 Message-ID: <86o71t3mob.fsf@gnu.org> References: <86ldwy46al.fsf@gnu.org> <87ttbmj6tt.fsf@> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14372"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74637@debbugs.gnu.org To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 02 20:34:33 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 1tICBk-0003Xq-9S for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Dec 2024 20:34:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tICBT-0004RO-Br; Mon, 02 Dec 2024 14:34:15 -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 1tICBH-0004Jy-23 for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 14:34: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 1tICBG-00044v-LL for bug-gnu-emacs@gnu.org; Mon, 02 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:References:In-Reply-To:From:Date:To:Subject; bh=2IbHhPWndtBOt6/3vw16wy+jh5WwD9fuj5Zje157yAI=; b=X/rvAqz8i4iYcESd4mTtxvzaDQurHzOkTr08JXZvIXBDRsudtbg96TB2K2BAnqP28XPgX/cPuixHqc2wTt+misZGh0d6bDfezDk7CwmCJHB84jRhAkWi3HV/c984c0MWba/mnmqUFuhtG3dSb8brCK0E7vDQnNDnAxvVXqduTJe4x0M/ptv6vEj1uEq6IQUEnfVKdk8CRF5h3OqckSk9ykBZkLblQ+4xHX8bHatK6AxU52ZPzxNlhACNEerYKmHYEHwvFoh6054SI7wyttWzSc1YLMobJt4/m0rBJRK4JWzf9TrDkhR7S2CmckuvI9BEaOVL4WOGrPS3K3uFy+Gz4A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tICBG-0003Df-7u for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 14:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Dec 2024 19:34: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.173316800212306 (code B ref 74637); Mon, 02 Dec 2024 19:34:02 +0000 Original-Received: (at 74637) by debbugs.gnu.org; 2 Dec 2024 19:33:22 +0000 Original-Received: from localhost ([127.0.0.1]:56631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tICAb-0003CQ-On for submit@debbugs.gnu.org; Mon, 02 Dec 2024 14:33:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tICAY-0003CA-MP for 74637@debbugs.gnu.org; Mon, 02 Dec 2024 14:33:20 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tICAT-0003h9-0F; Mon, 02 Dec 2024 14:33:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=2IbHhPWndtBOt6/3vw16wy+jh5WwD9fuj5Zje157yAI=; b=UqJahSh/fefbbeyebEfW GLtPmyXFQh+Ztk4L3MibndZDxQuNluTv6+QE+OYpLjFssOPjual9LNPY6mzbejtGDgsKoxeDEB5pp Z4nZHBDUXerIMDtemovaYdOLAJ3dFN34tfq9HhczB92OqPeqoag18F/xQ6BsjgAPE3pN6bDj3iGKz 4ou2wB5iM3ib9ji4G+A6z7lDIy3lQYzLLQdXR3dgrrUuHsDB7A1/wzLAJqzhfjIGv0dJ32RQ8QwU0 BFYAKYokT0Evij+PFn27XYnNc6VYzatzKD68JYSg3CRfBt/atdRua/XX/peob1dElReig3+b6b44n y8VqIZnRj76kuw==; In-Reply-To: <87ttbmj6tt.fsf@> (message from =?UTF-8?Q?Bj=C3=B6rn?= Bidar on Mon, 02 Dec 2024 20:08:46 +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:296344 Archived-At: > From: Björn Bidar > Cc: 74637@debbugs.gnu.org > Date: Mon, 02 Dec 2024 20:08:46 +0200 > > Eli Zaretskii writes: > > >> Date: Sun, 01 Dec 2024 22:40:16 +0200 > >> From: Björn Bidar via "Bug reports for GNU Emacs, > >> the Swiss army knife of text editors" > >> > >> Make view-mode behave like when called in view-file when entered because > >> `view-read-only' is true on a file which is not writable. > >> The change makes the view-read-only behave better on files which are > >> not writable. > >> Now it makes Emacs behave more like less on these files. > > > > That's an incompatible behavior change. Is that justified? How can > > we be sure that everyone agrees with your interpretation of this mode? > > 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. > But even going with that point: You open a file file which isn't > writable. Once you hit q the window is quit and the buffer is buried. > What do you do now next time you visit that file? > The buffer was buried, view-mode isn't active anymore, you would have > to activate view-mode again to go where you left off. > > If you would want to edit the file the you visited this way you would > have not pressed q but e to exit view mode and the proceeded to exit > read-only-mode and edit the file. What about entering view-mode by typing "C-x C-q" in a buffer whose file is writable? Why should we kill the buffer when the user turns off view-mode in that file's buffer?