X-Loop: help-debbugs@HIDDEN Subject: bug#75313: 31.0.50; ERC 5.6.1-git: M-w cannot copy multiline text when kill-ring-deindent-mode is on Resent-From: DU Zaichuan <du@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 03 Jan 2025 13:20:02 +0000 Resent-Message-ID: <handler.75313.B.173591038726054 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 75313 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 75313 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.173591038726054 (code B ref -1); Fri, 03 Jan 2025 13:20:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jan 2025 13:19:47 +0000 Received: from localhost ([127.0.0.1]:49997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tThac-0006m4-3T for submit <at> debbugs.gnu.org; Fri, 03 Jan 2025 08:19:47 -0500 Received: from lists.gnu.org ([2001:470:142::17]:50936) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <du@HIDDEN>) id 1tTf9J-000882-LH for submit <at> debbugs.gnu.org; Fri, 03 Jan 2025 05:43:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <du@HIDDEN>) id 1tTf9B-0002hH-Cw for bug-gnu-emacs@HIDDEN; Fri, 03 Jan 2025 05:43:19 -0500 Received: from out-175.mta0.migadu.com ([2001:41d0:1004:224b::af]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <du@HIDDEN>) id 1tTf96-0002bn-Om for bug-gnu-emacs@HIDDEN; Fri, 03 Jan 2025 05:43:16 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zaichuan.net; s=key1; t=1735900983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TH8aruJDUDgsEiie+GW7LKXcxsH4u2EQBLSMSfua2nA=; b=sTfpEUcieGUN2rDRxrOF4/Ev9pTSBtX4WRBIv6eo+eObPnwz6461W8DLVpkkKdFHCaoBzM 62u0OD5NjaJZ2PsTUpJQsOys7wnmjIpcinYCs2Mol4rhvXdta2rshp09A+2x+j2Sx4Bd52 jmUiLp7988lnoDQE3Awijs4H0ciqUyrnlE7eglUYnGeOZbcUJfMtJeYooRP1eY/onvIN2O ZLcPYFSNXvNrRBkpoTS7B+busZL0NfjTos1RFXXoQJ/22vcxYVDzsuIYP/mqY+d8WR+lJ5 tFcKo8jEWvh/5Vl7PF5FUGs/aVcQCupljXSbWrOy3VyTzBVVb6WC3tc4BKVQOg== From: DU Zaichuan <du@HIDDEN> Date: Fri, 03 Jan 2025 11:43:00 +0100 Message-ID: <871pxkuqiz.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::af; envelope-from=du@HIDDEN; helo=out-175.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Mailman-Approved-At: Fri, 03 Jan 2025 08:19:45 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) 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=3Daot --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 --=20 Best regards, Zaichuan =E5=9C=A8=E5=B7=9D (he/him) https://zaichuan.net
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: DU Zaichuan <du@HIDDEN> Subject: bug#75313: Acknowledgement (31.0.50; ERC 5.6.1-git: M-w cannot copy multiline text when kill-ring-deindent-mode is on) Message-ID: <handler.75313.B.173591038726054.ack <at> debbugs.gnu.org> References: <871pxkuqiz.fsf@HIDDEN> X-Gnu-PR-Message: ack 75313 X-Gnu-PR-Package: emacs Reply-To: 75313 <at> debbugs.gnu.org Date: Fri, 03 Jan 2025 13:20:03 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 75313 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 75313: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D75313 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#75313: 31.0.50; ERC 5.6.1-git: M-w cannot copy multiline text when kill-ring-deindent-mode is on Resent-From: "J.P." <jp@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 03 Jan 2025 20:11:01 +0000 Resent-Message-ID: <handler.75313.B75313.173593502625197 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 75313 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: DU Zaichuan <du@HIDDEN> Cc: Po Lu <luangruo@HIDDEN>, emacs-erc@HIDDEN, 75313 <at> debbugs.gnu.org Received: via spool by 75313-submit <at> debbugs.gnu.org id=B75313.173593502625197 (code B ref 75313); Fri, 03 Jan 2025 20:11:01 +0000 Received: (at 75313) by debbugs.gnu.org; 3 Jan 2025 20:10:26 +0000 Received: from localhost ([127.0.0.1]:52282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tTo01-0006YL-H1 for submit <at> debbugs.gnu.org; Fri, 03 Jan 2025 15:10:25 -0500 Received: from mail-108-mta0.mxroute.com ([136.175.108.0]:43185) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <jp@HIDDEN>) id 1tTnzz-0006Y8-1j for 75313 <at> debbugs.gnu.org; Fri, 03 Jan 2025 15:10:23 -0500 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta0.mxroute.com (ZoneMTA) with ESMTPSA id 1942dca489e000310e.001 for <75313 <at> debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 03 Jan 2025 20:10:19 +0000 X-Zone-Loop: d3cd2562ee5ae7dd93fb90b696a6f5b9179b1fc7afe9 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=C/FxqB3wXs7g83Dxc1F21AAqg7RqxMeEmwVR+yjoQoQ=; b=Rl70ZPw/A1ChgwQwDxs7jU10ie X+biPvh0xCkcITbVFCf/31pxIiYbC8semtXnOBjmQ+gsUS31ZdJlJcMwGn8Zt7eNhgD463cElgkOJ ml21axQBP2VfbcxokHMFC2X1SxdDR1KUWwDPJERlOPmDclr26z5lz0cXxg4xEYOpk1EAOKVbhnGdd zI8n6sIdWK/fWMGxbdhb6mzg8B0E/Dl01FmJBJXL1P5b9KR9Nq9NuY244AG8n7cqBQdTdV2NK/dCK 5dKHch2/1NyMjR84JYwJl0QdVO9MmTWHfpQlFT/TFpVlG8uSXoaumegWlLn0x+jxVjXcqsbuW0UkC a5CcK+qA==; From: "J.P." <jp@HIDDEN> In-Reply-To: <871pxkuqiz.fsf@HIDDEN> (DU Zaichuan via's message of "Fri, 03 Jan 2025 11:43:00 +0100") References: <871pxkuqiz.fsf@HIDDEN> Date: Fri, 03 Jan 2025 12:10:16 -0800 Message-ID: <878qrrzmjb.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: masked@HIDDEN X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) DU Zaichuan via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> writes: > 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. Thanks. A slightly distilled version, sans ERC: 1. M-x kill-ring-deindent-mode RET 2. M-: (insert (propertize "(progn\n 1\n 2\n 3)" 'read-only t)) RET 3. C-SPC 4. C-P ; error: Text is read-only 5. M-w ; error: Text is read-only > > When using the set-mark-command to highlight the texts, message gives > "kill-ring-deindent-buffer-substring-function: Text is read-only". Indeed. It seems all `filter-buffer-substring-function' advice members, like `kill-ring-deindent-buffer-substring-function', run after every command when the region is active because `region-extract-function' needs to supply `gui-set-selection' with the region's text. I see two ways of dealing with this: 1. Local advice around `filter-buffer-substring-function'. (defun erc--filter-buffer-substring (orig &rest args) (if (eq this-command #'kill-ring-save) (with-silent-modifications (apply orig args)) (apply orig args))) So, somewhere in ERC's major-mode setup, we'd do: (add-function :around (local 'filter-buffer-substring-function) #'erc--filter-buffer-substring) However, this won't do anything for "Text is read only" spam related to other commands, like `previous-line' or `move-end-of-line' (when the region is active). But it should at least restore the ability to copy with M-w. 2. Address this somewhere in lisp/indent-aux.el. Binding `inhibit-read-only' to t around the call to `indent-rigidly' in `kill-ring-deindent-buffer-substring-function' seems to help in cursory experiments. Not sure if that's the right move, though. Perhaps Po Lu (Cc'd) has some insights.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.