Subject: bug#79176: closed (Re: bug#79176: [PATCH] ; * lisp/indent-aux.el: Remove read-only text property)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 07 Aug 2025 13:15:02 +0000

Your bug report

#79176: [PATCH] ; * lisp/indent-aux.el: Remove read-only text property

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
79176: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79176
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#79176: [PATCH] ; * lisp/indent-aux.el: Remove read-only text property
From: Eli Zaretskii <[email-masked]>
To: Tony Zorman <[email-masked]>
Cc: [email-masked]
Date: Thu, 07 Aug 2025 16:13:56 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Tony Zorman <[email-masked]>
> Cc: [email-masked]
> Date: Wed, 06 Aug 2025 08:12:58 +0200
> 
> > Thanks, but isn't it better to bind inhibit-read-only non-nil around
> > the code which modifies the text instead?  By default
> > yank-excluded-properties includes read-only, but what if someone
> > changes the value not to include read-only? won't they expect to see
> > the read-only property when the text is yanked?
> 
> Ah, I didn't know about yank-excluded-properties. You're right, in that
> case perhaps it's better to use inhibit-read-only; I've updated the
> patch accordingly.

Thanks, now installed on the master branch (after fixing the commit
log message, since it still talked about removing the property).

I'm therefore closing this bug.

Subject: [PATCH] ; * lisp/indent-aux.el: Remove read-only text property
From: Tony Zorman <[email-masked]>
To: [email-masked]
Date: Tue, 05 Aug 2025 13:23:04 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: patch

Hi,

when one uses `kill-ring-deindent-mode' and selects read-only text, the
mode can't actually deindent it, which causes a lot of `beep' noise and
prevents the user from killing the selected text (or from any other
action, really). This patch fixes this by removing that particular
property before the text is inserted into the temporary buffer.

Thanks,
Tony

>From 5ef0ce6716dd0cb2f08833fdc54a83cca7b4f691 Mon Sep 17 00:00:00 2001
From: Tony Zorman <[email-masked]>
Date: Tue, 5 Aug 2025 13:08:43 +0200
Subject: [PATCH] ; * lisp/indent-aux.el: Remove read-only text property

---
 lisp/indent-aux.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/indent-aux.el b/lisp/indent-aux.el
index eeb8f1ee6bb..c184c1805da 100644
--- a/lisp/indent-aux.el
+++ b/lisp/indent-aux.el
@@ -49,6 +49,7 @@ is yanked."
         (text (if delete
                   (delete-and-extract-region beg end)
                 (buffer-substring beg end))))
+    (remove-text-properties 0 (max 0 (1- (length text))) '(read-only) text)
     (with-temp-buffer
       ;; Indent/deindent the same as the major mode in the original
       ;; buffer.
-- 
2.50.1

-- 
Tony Zorman | https://tony-zorman.com