Subject: bug#75313: 31.0.50; ERC 5.6.1-git: M-w cannot copy multiline text when kill-ring-deindent-mode is on

From: DU Zaichuan <[email-masked]>
Date: Fri, 03 Jan 2025 11:43:00 +0100

To reproduce the bug in emacs -Q,

1. (kill-ring-deindent-mode t)

2. open erc and join any channel.

3. try to copy with M-w someone's message or the channel notice.

When using the set-mark-command to highlight the texts, message gives
"kill-ring-deindent-buffer-substring-function: Text is read-only".

In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.43, cairo version 1.18.2) of 2024-12-28 built on arch
Repository revision: af3bbc83600bec6c8621e1b04437dbfdeb329106
Repository branch: HEAD
System Description: Arch Linux

Configured using:
 'configure --with-native-compilation=aot --with-pgtk'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

-- 
Best regards,
Zaichuan 在川 (he/him)
https://zaichuan.net