GNU bug report logs - #26947
Preserve read-only when debugger with let-bound inhibit-read-only t.

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Tue, 16 May 2017 00:01:01 UTC

Severity: minor

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Keith David Bershatsky <esq <at> lawlist.com>
To: Emacs Bug Reports <bug-gnu-emacs <at> gnu.org>
Subject: Preserve read-only when debugger with let-bound inhibit-read-only t.
Date: Mon, 15 May 2017 17:00:14 -0700
Entering the debugger when inhibit-read-only is let-bound to `t` causes all buffers to be read/write even though they may have `buffer-read-only` set to `t`.

Step #1:  Launch with emacs -q.

Step #2:  Navigate to the `*scratch*` buffer and set to read-only with C-x C-q.

Step #3:  Evaluate:  (let ((inhibit-read-only t)) (error "stop"))

Step #4:  Select the window display the `*scratch*` buffer and type something.  All open buffers are read/write.

Expected Behavior:  Protect buffers that have previously been set to `buffer-read-only` with `t`.

Workaround:  Add the following to the outset of the function `debug`:

(when inhibit-read-only
  (setq inhibit-read-only nil))

The workaround can be perfected to test for whether inhibit-read-only is let-bound to `t` and if it is then ...  I say that just in case someone wants `inhibit-read-only` to always be `t` and in that case the debugger shouldn't turn it off.

Here is the new thread on emacs.stackexchange.com:

https://emacs.stackexchange.com/questions/32829/inhibit-read-only-affects-all-buffers-when-backtrace-buffer-is-open

Thanks,

Keith




This bug report was last modified 3 years and 340 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.