From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 05 10:09:02 2016 Received: (at submit) by debbugs.gnu.org; 5 Mar 2016 15:09:02 +0000 Received: from localhost ([127.0.0.1]:35699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1acDpG-0004gY-0Q for submit@debbugs.gnu.org; Sat, 05 Mar 2016 10:09:02 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49391) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1acDpE-0004g5-32 for submit@debbugs.gnu.org; Sat, 05 Mar 2016 10:09:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acDp7-0004cW-3q for submit@debbugs.gnu.org; Sat, 05 Mar 2016 10:08:54 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:34751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acDp6-0004cS-W6 for submit@debbugs.gnu.org; Sat, 05 Mar 2016 10:08:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acDp5-0002tK-Ag for bug-gnu-emacs@gnu.org; Sat, 05 Mar 2016 10:08:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acDp2-0004c0-1o for bug-gnu-emacs@gnu.org; Sat, 05 Mar 2016 10:08:51 -0500 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:35378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acDp1-0004bm-NH for bug-gnu-emacs@gnu.org; Sat, 05 Mar 2016 10:08:47 -0500 Received: by mail-wm0-x234.google.com with SMTP id l68so28597165wml.0 for ; Sat, 05 Mar 2016 07:08:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version; bh=iXLMymKWr3fll8gNkdu2av7DAqbI8jM0PFjCSwiiiwk=; b=Sl5pPoKyxTBVFtP8GEQa8YiUFW9ZMxtLIqF+21bm4GKFTqBlJVSciLAeBKf2bPix3q KDtRjNWOtWdRmFNC0KfUVwvcYC3Mwwcg1L3cBwhkr8oGxuotzaeaTTSW+K6xkYUCB/sV lDqIcwP2QZBHvdwa3W6Jjly8P8MJwQ3WXfgwL+QhcCWkCyBKkMwewhR6RNYzqlFTZylu lquyB222sf5O+uzlkDVUUH1eOgri/FeYp99vxGp92tzBIdUHm5h4+U010pmRVwUFVNd+ 9NMRU+XyDtIwqaVFFfQBvZ4at9nwG0wU2UwQt3IHneq476qrxTeJwo/wu1nUjnx29iyN ehGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=iXLMymKWr3fll8gNkdu2av7DAqbI8jM0PFjCSwiiiwk=; b=mEISNHRbExik7JijP+3/BbSS5TNej3KGRgmTHwaA3a0F4Wfs7BR210jxSFW3HjcQPM QZYBqVZNVGe3qvos7N18lXdUB4QfUG2lhiiTKTarxp1JLAuZda77IOa+JXYXKLwqgimI MhKDk9477NpY5xLK2bt76YE786yAiRyZE1AgKwbpfShAXgzc/ULcoXPTdUy+I6iqbcHQ MKND55wot/dU6e2Rd31D0Y3QbgsGhprbmyl86lmbuSCEMW+cJ8eM9uHn0CI+tdrhEd7x Bs9j8xQyiSQrQhEQJHrp44/1FyBHaT4arxTazXI2qpGL3c9KkC5uxa5E1hmxLT/4IiM3 azyw== X-Gm-Message-State: AD7BkJJhg3iPdOXPswgZh9/j+tszGcab/V9Ht7agtA0VOZICmlq82NaWF0EPsDocEN4zmg== X-Received: by 10.194.81.103 with SMTP id z7mr14029426wjx.25.1457190526898; Sat, 05 Mar 2016 07:08:46 -0800 (PST) Received: from miki-desktop (524B772B.cm-4-4b.dynamic.ziggo.nl. [82.75.119.43]) by smtp.gmail.com with ESMTPSA id lz5sm8546196wjb.5.2016.03.05.07.08.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Mar 2016 07:08:46 -0800 (PST) From: a.c.kalker@gmail.com To: bug-gnu-emacs@gnu.org Subject: 24.5; comint-kill-region doesn't work when both cua-mode and comint-prompt-read-only enabled Date: Sat, 05 Mar 2016 16:08:45 +0100 Message-ID: <87si05j72a.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Steps to reproduce: 1. Create file 'repro.el' with contents: ;; Test deleting region with read-only prompts while cua-mode is active (setq comint-prompt-read-only t) (cua-mode 1) ;; Copied verbatim from 'comint-prompt-read-only' docstring (add-hook 'comint-mode-hook (lambda () (define-key comint-mode-map [remap kill-region] 'comint-kill-region) (define-key comint-mode-map [remap kill-whole-line] 'comint-kill-whole-line))) 2. Run Emacs and start a shell $ emacs -Q -l repro.el M-x shell RET 3. In the shell, execute a command, then select a region comprising the command's output and one or more prompts, like the following (region shown delimited by '[' and ']'): [miki@miki-desktop ~]$ date Sat Mar 5 15:49:31 CET 2016 [miki@miki-desktop ~]$ [uname -a Linux miki-desktop 4.4.3-1-ARCH #1 SMP PREEMPT Fri Feb 26 15:09:29 CET 2016 x86_64 GNU/Linux [miki@miki-desktop ~]$ ] 4. Hit C-x or (only when cua-mode is active) or or C-w 5. Retry steps 3 and 4 after disabling cua-mode with M-x cua-mode RET Expected results: All these keystrokes (where applicable) should delete the region, including any interspersed prompts. Actual results: With cua-mode enabled: 4. C-x produces the error: "Text is read-only: #" and nothing is deleted. produces the error: "Text is read-only" and nothing is deleted. produces the error: "Text is read-only: #" and nothing is deleted. C-w produces the error: "Text is read-only: #" and nothing is deleted. With cua-mode disabled: 4. deletes the region, without error. C-w deletes the region, without error. In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6) of 2015-09-10 on foutrelis Windowing system distributor `The X.Org Foundation', version 11.0.11801000 Configured using: `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Important settings: value of $LC_MESSAGES: en_US.utf8 value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: yas-global-mode: t delete-selection-mode: t winner-mode: t show-paren-mode: t icomplete-mode: t global-whitespace-mode: t cua-mode: t multi-web-global-mode: t global-flycheck-mode: t global-company-mode: t override-global-mode: t msb-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t view-mode: t Recent messages: [yas] Loading snippet files from /home/miki/.emacs.d/elpa/yasnippet-20160226.1359/snippets/emacs-lisp-mode [yas] Loading for `prog-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /home/miki/.emacs.d/elpa/yasnippet-20160226.1359/snippets/prog-mode) (quote prog-mode)))! [yas] Loading snippet files from /home/miki/.emacs.d/elpa/yasnippet-20160226.1359/snippets/prog-mode Loading /home/miki/.emacs.d/elpa/yasnippet-20160226.1359/snippets/prog-mode/.yas-setup...done For information about GNU Emacs and the GNU system, type C-h C-a. View mode: type C-h for help, h for commands, q to quit. Making completion list... Contacting host: debbugs.gnu.org:80 [3 times] Opening nndoc server on /tmp/gnus-temp-group-11073W9u-ephemeral...done Beginning of buffer gnus-summary-next-unread-article: No buffer named *Group* [2 times] Load-path shadows: /home/miki/.emacs.d/elpa/helm-20160304.713/helm-multi-match hides /home/miki/.emacs.d/elpa/helm-core-20160303.1321/helm-multi-match /usr/share/emacs/site-lisp/SuperCollider/tree-widget hides /usr/share/emacs/24.5/lisp/tree-widget Features: (shadow emacsbug sendmail parse-time sort smiley ansi-color gnus-cite mail-extr qp gnus-async gnus-bcklg gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-ml gnus-msg disp-table nndoc gnus-cache url-handlers gnus-dup gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum nnoo gnus-group gnus-undo nnmail mail-source gnus-start gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems nnheader wid-edit async mm-archive message idna format-spec rfc822 mml mml-sec mailabbrev gmm-utils mailheader mail-utils network-stream starttls url-cache debbugs-gnu add-log debbugs soap-client warnings xml mule-util view eldoc hideshow adjust-parens elisp-slime-nav hl-sexp .emacs server yasnippet cl imenu company-oddmuse company-keywords company-etags etags company-gtags company-dabbrev-code company-dabbrev company-files company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-css company-nxml company-bbdb company-irony irony-completion irony-snippet irony company-tern s ucs-normalize dash-functional finder-inf tern url-http tls url-auth url-gw url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap wheatgrass-theme delsel winner ring paren icomplete whitespace cua-base cus-start cus-load shackle multi-web-mode flycheck find-func help-mode rx subr-x seq dash company cl-macs gv pcase quelpa-use-package advice quelpa package-build mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums json lisp-mnt use-package diminish bind-key easy-mmode slime-autoloads info easymenu package epg-config ffap thingatpt url-parse auth-source eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core gnus-util mm-util help-fns mail-prsvr password-cache url-vars edmacro kmacro cl-loaddefs cl-lib windmove msb time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 419412 21695) (symbols 48 39756 1) (miscs 40 290 448) (strings 32 82726 13188) (string-bytes 1 2585001) (vectors 16 54491) (vector-slots 8 946354 13153) (floats 8 621 453) (intervals 56 368 79) (buffers 960 23) (heap 1024 41393 1828)) From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 03 04:42:02 2020 Received: (at 22917) by debbugs.gnu.org; 3 Dec 2020 09:42:02 +0000 Received: from localhost ([127.0.0.1]:38377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkl7i-0003VO-Cm for submit@debbugs.gnu.org; Thu, 03 Dec 2020 04:42:02 -0500 Received: from quimby.gnus.org ([95.216.78.240]:43410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkl7g-0003Up-Qw for 22917@debbugs.gnu.org; Thu, 03 Dec 2020 04:42:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References: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=3x59PeWbQlkp+Iuk/uCv9N462jGSeb0Et+ksScRM04I=; b=DEsZau678p9qTEqZQFVWtr7G/U QZ8sijK3XR5raRnOs+wrJJRiP6AVW5IxKKM0LfhmrEtzonQrIcZRgQLBGmBsLXv1V5l+j6mscP1Qb JK4iOGjJORgvwhp2XX0qUYrFmvsAimRe/fQdcBrw6kWVpn5h8Ns9lZXzbhw+PWzasScM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkl7X-0001mn-LY; Thu, 03 Dec 2020 10:41:54 +0100 From: Lars Ingebrigtsen To: a.c.kalker@gmail.com Subject: Re: bug#22917: 24.5; comint-kill-region doesn't work when both cua-mode and comint-prompt-read-only enabled References: <87si05j72a.fsf@gmail.com> X-Now-Playing: Nettle's _El Resplandor: The Shining in Dubai_: "Simoom (Wasp Wind)" Date: Thu, 03 Dec 2020 10:41:50 +0100 In-Reply-To: <87si05j72a.fsf@gmail.com> (a. c. kalker's message of "Sat, 05 Mar 2016 16:08:45 +0100") Message-ID: <87r1o7w7j5.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: a.c.kalker@gmail.com writes: > Steps to reproduce: > > 1. Create file 'repro.el' with contents: > > ; ; Test deleting region with read-only prompts while cua-mode is active > (setq comint-prompt-read-only t) > (cua-mode 1) > ;; Co [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22917 Cc: 22917@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) a.c.kalker@gmail.com writes: > Steps to reproduce: > > 1. Create file 'repro.el' with contents: > > ;; Test deleting region with read-only prompts while cua-mode is active > (setq comint-prompt-read-only t) > (cua-mode 1) > ;; Copied verbatim from 'comint-prompt-read-only' docstring > (add-hook 'comint-mode-hook > (lambda () > (define-key comint-mode-map [remap kill-region] 'comint-kill-region) > (define-key comint-mode-map [remap kill-whole-line] > 'comint-kill-whole-line))) [...] > 4. Hit C-x or (only when cua-mode is active) or or C-w > > 5. Retry steps 3 and 4 after disabling cua-mode with M-x cua-mode RET > > Expected results: > All these keystrokes (where applicable) should delete the region, > including any interspersed prompts. > > Actual results: > With cua-mode enabled: > 4. C-x produces the error: "Text is read-only: #" and > nothing is deleted. > produces the error: "Text is read-only" and nothing is > deleted. > produces the error: "Text is read-only: #" and > nothing is deleted. > C-w produces the error: "Text is read-only: #" and > nothing is deleted. > With cua-mode disabled: > 4. deletes the region, without error. > C-w deletes the region, without error. (This bug report unfortunately got no response at the time.) I can reproduce the behaviour, but I'm not sure it's a bug. By default, all these killing commands refuse to kill read-only text. However, comint provides a variation (`comint-kill-region') that ignores whether there's read-only text or not, because that's sometimes convenient, and has instructions on how to rebind kill-region. However, cua-mode binds `C-w' to `cua-cut-region', so to get that working, you'd also have to say (define-key comint-mode-map [remap cua-cut-region] 'comint-kill-region) or something of the kind. Of course, cua-cut-region doesn't work quite the same as `kill-region', so it's not quite the same, but if you want this to work for the kill function you're using, then rebind the command to something that does (defun my-cut () (interactive) (let ((inhibit-read-only t)) (cua-cut-region))) or something like that. I don't think this is something that would be natural for either comint or cua by themselves to work around -- if you have read-only text in the buffer, then that's supposed to bug out if you kill it, and if you want something else to happen, then it's more natural for the user that wants that to do something like the above, I think? So I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 03 04:42:08 2020 Received: (at control) by debbugs.gnu.org; 3 Dec 2020 09:42:08 +0000 Received: from localhost ([127.0.0.1]:38380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkl7n-0003Vg-ML for submit@debbugs.gnu.org; Thu, 03 Dec 2020 04:42:08 -0500 Received: from quimby.gnus.org ([95.216.78.240]:43424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkl7l-0003Uz-T8 for control@debbugs.gnu.org; Thu, 03 Dec 2020 04:42:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=oVNKu7o+1ZZBjHAtR5wGo2IUDyvUTESn4a0ITAMiPZI=; b=TNcGD7HXaeVEEoQ2bW3YhMeSO0 3uz+K/XYOUxQOXSuU9LHqczA1oih+31q3/WVBz94hxjwuuGPHU96+uJAXvUfQl8OerZG/XG2vbtUv m+xmFRo147yPI4WnFyxsbj0fO6C72t3p5R0SimxrRD/OiXpRC8+uOjg6P7iSAJqrgPrQ=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkl7e-0001mz-3t for control@debbugs.gnu.org; Thu, 03 Dec 2020 10:42:00 +0100 Date: Thu, 03 Dec 2020 10:41:57 +0100 Message-Id: <87pn3rw7iy.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #22917 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 22917 wontfix close 22917 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 22917 wontfix close 22917 quit From unknown Tue Jun 17 01:49:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 31 Dec 2020 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator