Hi Morgan, Thanks for the pointer — you're right, I should have looked at the function signature more carefully before reaching for `substring-no-properties'. I just tested it and the NO-FACE argument does exactly what's needed here:
(substitute-command-keys "Type \\<org-columns-map>`\\[org-columns-edit-value]' to edit property" t) returns the string without the help-key-binding face, so the read-only error renders cleanly without any post-processing. NO-FACE was added in Emacs 28.1, and since org supports the last three stable Emacs versions (28, 29, 30), it's safe to use. v2 inlined below. Best, -- Slawomir Grochowski
>From d64357b8121a9396d4ed0276a997a4116f2fdc1f Mon Sep 17 00:00:00 2001 From: Slawomir Grochowski <[email protected]> Date: Tue, 12 May 2026 06:44:29 +0200 Subject: [PATCH] org-colview: Don't show raw text properties in read-only error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/org-colview.el (org-columns--mark-line-read-only): Pass NO-FACE non-nil to `substitute-command-keys' so the hint string is unpropertized. When the user presses any key not bound in `org-columns-map' while in column view, Emacs signals text-read-only using the string stored in the overlay's read-only property. The default error handler displays this string in the echo area, but because `substitute-command-keys' applies the help-key-binding face to the keybinding, the message renders as its raw representation: Text is read-only: #("Type ‘e’ to edit property" 6 7 (font-lock-face help-key-binding face help-key-binding)) rather than the intended hint. This is easily mistaken for a bug in the package by users new to org-columns. Passing NO-FACE to `substitute-command-keys' (available since Emacs 28.1) suppresses the face and produces a clean message: Text is read-only: Type ‘e’ to edit property --- lisp/org-colview.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-colview.el b/lisp/org-colview.el index adbb2bcac..3c6e7b6a2 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -483,7 +483,7 @@ line-beginning, keeping the rendered overlay region uneditable." (setq org-columns--read-only-string (substitute-command-keys "Type \\<org-columns-map>`\\[org-columns-edit-value]' \ -to edit property"))))))) +to edit property" t))))))) (defun org-columns--remap-header-line () "Remap the header line to default face if not already done." -- 2.39.5
