unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Bernd Rellermeyer <bernd.rellermeyer@t-online.de>
Cc: 61652@debbugs.gnu.org
Subject: bug#61652: 28.2; Read-only mode and View mode
Date: Mon, 20 Feb 2023 16:42:25 +0200	[thread overview]
Message-ID: <83bklov1ny.fsf@gnu.org> (raw)
In-Reply-To: <m1ilfwu3sy.fsf@Bernds-Mac-mini.fritz.box> (message from Bernd Rellermeyer on Mon, 20 Feb 2023 09:41:33 +0100)

> From: Bernd Rellermeyer <bernd.rellermeyer@t-online.de>
> Date: Mon, 20 Feb 2023 09:41:33 +0100
> 
> 
> I have the following scenario:
> 
> 1. View a buffer in View mode.
> 2. Turn off Read-Only mode, e.g. by pressing `C-x C-q`.
> 3. Turn on Read-Only mode and View mode again, eg. by pressing `C-x
> C-q`-
> 4. Exit View mode by `View-exit`, e.g. by pressing `e`.
> 
> Now the buffer is in Read-Only mode. In my opinion it should be
> writable. The reason is the variable `view-old-buffer-read-only`, which
> is set on entering View mode (`view--enable`) to the (old) value of
> `buffer-read-only`. But in my scenario, the value of `buffer-read-only`
> is already the new one, as set in `read-only-mode`.

If the buffer is already read-only when you enter View mode, why
should we reset read-only when exiting View mode?  We are trying to
leave the buffer as we found it, which in this case is read-only.

Or what am I missing?





  reply	other threads:[~2023-02-20 14:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20  8:41 bug#61652: 28.2; Read-only mode and View mode Bernd Rellermeyer
2023-02-20 14:42 ` Eli Zaretskii [this message]
2023-02-21 12:46   ` Bernd Rellermeyer
2023-02-21 13:08     ` Eli Zaretskii
2023-09-05 23:48       ` Stefan Kangas
2023-09-06 11:32         ` Eli Zaretskii
2023-09-06 12:08           ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bklov1ny.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=61652@debbugs.gnu.org \
    --cc=bernd.rellermeyer@t-online.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).