From: Keith David Bershatsky <esq@lawlist.com>
To: 26947@debbugs.gnu.org
Subject: bug#26947: Preserve read-only when debugger with let-bound inhibit-read-only t.
Date: Mon, 15 May 2017 17:00:14 -0700 [thread overview]
Message-ID: <m237c5hdrl.wl%esq@lawlist.com> (raw)
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
next reply other threads:[~2017-05-16 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-16 0:00 Keith David Bershatsky [this message]
2017-05-17 13:34 ` bug#26947: Preserve read-only when debugger with let-bound inhibit-read-only t Stefan Monnier
2017-05-17 18:05 ` Keith David Bershatsky
2021-08-13 13:49 ` Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m237c5hdrl.wl%esq@lawlist.com \
--to=esq@lawlist.com \
--cc=26947@debbugs.gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.