From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 05 12:37:33 2014 Received: (at submit) by debbugs.gnu.org; 5 Sep 2014 16:37:33 +0000 Received: from localhost ([127.0.0.1]:60011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPwVw-0002CE-Ol for submit@debbugs.gnu.org; Fri, 05 Sep 2014 12:37:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50884) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPwVu-0002C0-Fe for submit@debbugs.gnu.org; Fri, 05 Sep 2014 12:37:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPwVj-0005ya-SS for submit@debbugs.gnu.org; Fri, 05 Sep 2014 12:37:25 -0400 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]:34590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPwVj-0005yU-PK for submit@debbugs.gnu.org; Fri, 05 Sep 2014 12:37:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPwVe-0002xE-8j for bug-gnu-emacs@gnu.org; Fri, 05 Sep 2014 12:37:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPwVY-0005wQ-MT for bug-gnu-emacs@gnu.org; Fri, 05 Sep 2014 12:37:14 -0400 Received: from mail-qc0-x22a.google.com ([2607:f8b0:400d:c01::22a]:46572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPwVY-0005wC-I2 for bug-gnu-emacs@gnu.org; Fri, 05 Sep 2014 12:37:08 -0400 Received: by mail-qc0-f170.google.com with SMTP id r5so12858847qcx.1 for ; Fri, 05 Sep 2014 09:37:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=M0fCyQZAjJmkGpBJj9GNkMrMru4uFPserSrW8xgzOgM=; b=MY8uc0yGAhWy/JFSBly6/nHbe5zMV6zUXKyGt5lZ0r3VQjpyDVKygsv0HDHYGRIYuk lTpcGUESQkv9NktS2mGbfiB8gozzc5efvVeXDSTZePB6MZ7D9Mqylhp8Omih3dZ8xvBY dEa9inJpMWrqGPaEXUAybdiUc/5F81Zv3Q/yts3eVgx8eMCJkAt26OWU+hnx+81C59nD +MhOwaN1Mzc83stTYaOjuAXaJGZ5tuu9kiKNICBC1XNzZZLX2TUSnuJeq5ojqLVxzVTl C0iJz080z0EUEWK89p5LYNshb/xZ3vMbk3PWziyOOLFsZha5i3QlPHYc5NdsIkYy5VfA cAnA== X-Received: by 10.224.88.3 with SMTP id y3mr20267459qal.65.1409935027349; Fri, 05 Sep 2014 09:37:07 -0700 (PDT) Received: from [130.203.154.138] ([130.203.154.138]) by mx.google.com with ESMTPSA id w8sm1211099qag.2.2014.09.05.09.37.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Sep 2014 09:37:06 -0700 (PDT) From: David Reitter Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: 24.3.93 regression: undo boundary inserted by delete-selection-mode (CUA) Message-Id: Date: Fri, 5 Sep 2014 12:37:06 -0400 To: Bug-Gnu-Emacs Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) X-Mailer: Apple Mail (2.1878.6) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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.15 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 (----) This is a regression in the 24.4 pretest compared to 24.3. M-x cua-mode (enter and) select a word =93hello", e.g., via double-click enter single char, e.g., =93x=94 C-_ (undo) In Emacs 24.3, the undo will restore =93hello=94. In Emacs 24.3.93 pretest, the undo will only delete =93x=94, but not = restore =93hello=94. An undo boundary is present in buffer-undo-list between the = delete-selection step and the insertion of =93x=94. The relevant change, I think, were changes to CUA on Dec 8 and 11, 2013: commit f38bbfce43b11667ee1a09acf4f4f932bf7c9043 Author: Stefan Monnier Date: Sun Dec 8 01:24:54 2013 -0500 Use delete-selection-mode in cya-mode. As a fix... Looking at how self-insert-command deletes the undo boundary to merge = itself, we can either prevent the undo boundary from being inserted (I = couldn=92t figure out where that happens), or pretend that the = delete-selection action was a self-insert-command. The patch below is a = proof of concept. I think the right fix would be not to insert the undo boundary in the = first place, if this is reasonably doable. commit abf13771ad1b3dbc542a35393230eb43baa55d1c Author: David Reitter Date: Fri Sep 5 12:26:11 2014 -0400 delsel: delete-active-region: avoid undo boundary =20 Set last-command so that self-insert-command removes any undo boundary. diff --git a/lisp/delsel.el b/lisp/delsel.el index 1ada027..c1b1eba 100644 --- a/lisp/delsel.el +++ b/lisp/delsel.el @@ -80,6 +80,8 @@ If KILLP in not-nil, the active region is killed = instead of deleted." (let (this-command) (kill-region (point) (mark) t)) (funcall region-extract-function 'delete-only)) + ;; do not add undo-boundary in self-insert-command: + (setq last-command this-command) t) =20 (defun delete-selection-helper (type) From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 07 22:04:38 2014 Received: (at 18412) by debbugs.gnu.org; 8 Sep 2014 02:04:38 +0000 Received: from localhost ([127.0.0.1]:33079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQoJq-0008Pr-2T for submit@debbugs.gnu.org; Sun, 07 Sep 2014 22:04:38 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:3292) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQoJo-0008Pb-14 for 18412@debbugs.gnu.org; Sun, 07 Sep 2014 22:04:36 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhAIAIDvNVNFpZEG/2dsb2JhbABZgwaDSghKvF2DDoEXF3SCJQEBAQECAQwXMyMFCwkCGgIYDgICFBgNJIgECJMDnBiifheBKY0eMweCb4FJBKkZgWqBcYFbIQ X-IPAS-Result: AhAIAIDvNVNFpZEG/2dsb2JhbABZgwaDSghKvF2DDoEXF3SCJQEBAQECAQwXMyMFCwkCGgIYDgICFBgNJIgECJMDnBiifheBKY0eMweCb4FJBKkZgWqBcYFbIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="89046904" Received: from 69-165-145-6.dsl.teksavvy.com (HELO ceviche.home) ([69.165.145.6]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Sep 2014 22:04:29 -0400 Received: by ceviche.home (Postfix, from userid 20848) id C98D4660C4; Sun, 7 Sep 2014 22:04:29 -0400 (EDT) From: Stefan Monnier To: David Reitter Subject: Re: bug#18412: 24.3.93 regression: undo boundary inserted by delete-selection-mode (CUA) Message-ID: References: Date: Sun, 07 Sep 2014 22:04:29 -0400 In-Reply-To: (David Reitter's message of "Fri, 5 Sep 2014 12:37:06 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18412 Cc: 18412@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.3 (/) > This is a regression in the 24.4 pretest compared to 24.3. > M-x cua-mode > (enter and) select a word =E2=80=9Chello", e.g., via double-click > enter single char, e.g., =E2=80=9Cx=E2=80=9D > C-_ (undo) > In Emacs 24.3, the undo will restore =E2=80=9Chello=E2=80=9D. > In Emacs 24.3.93 pretest, the undo will only delete =E2=80=9Cx=E2=80=9D, = but not > restore =E2=80=9Chello=E2=80=9D. > An undo boundary is present in buffer-undo-list between the > delete-selection step and the insertion of =E2=80=9Cx=E2=80=9D. Indeed, that's a difference between delete-selection-mode and cua's earlier reimplementation of the feature. To the extent that noone complained about it for delete-selection-mode, I think this bug is not super-urgent to fix. IOW, we should take the time to think how to fix it right. > Looking at how self-insert-command deletes the undo boundary to merge > itself, we can either prevent the undo boundary from being inserted (I > couldn=E2=80=99t figure out where that happens), or pretend that the > delete-selection action was a self-insert-command. The patch below is > a proof of concept. The undo-boundary is added by command_loop_1 in keyboard.c just before calling command_execute. Maybe the right fix is to change it so it's push before running pre-command-hook? Of course, maybe an even better fix is to change delete-selection-mode so it doesn't rely on pre-command-hook. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 09 05:51:09 2020 Received: (at 18412) by debbugs.gnu.org; 9 Sep 2020 09:51:09 +0000 Received: from localhost ([127.0.0.1]:57212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFwku-0003TQ-Ts for submit@debbugs.gnu.org; Wed, 09 Sep 2020 05:51:09 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFwkt-0003Su-3k for 18412@debbugs.gnu.org; Wed, 09 Sep 2020 05:51:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=UktqaCGj96nw/q/IRm6uBmuSW5vjGSr+GA/msUZZQCI=; b=FEL0I7ZtSCSGJeXp5phsyOhJ6h sjfmhCjOdYso4DuYbmJrYqJQ6fGuzFqMwFSpQCebHEP37CaLtGpERofoKOH2oXJe8ULwoh4rqTnis nCktlFSJbXEAF4LGM4nDBdz6i2GUiGhplo4scOpvzNg2OwJ/DibR3To6uhVMgg5Shr4U=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFwkj-0007bI-OS; Wed, 09 Sep 2020 11:51:00 +0200 From: Lars Ingebrigtsen To: David Reitter Subject: Re: bug#18412: 24.3.93 regression: undo boundary inserted by delete-selection-mode (CUA) References: X-Now-Playing: Ossia's _Devil's Dance_: "(untitled)" Date: Wed, 09 Sep 2020 11:50:56 +0200 In-Reply-To: (David Reitter's message of "Fri, 5 Sep 2014 12:37:06 -0400") Message-ID: <87v9gnffcv.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; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: David Reitter writes: > This is a regression in the 24.4 pretest compared to 24.3. > > M-x cua-mode > (enter and) select a word “hello", e.g., via double-click > enter single char, e.g., “x” > C-_ (undo) > > In Emacs [...] 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: 18412 Cc: 18412@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 (-) David Reitter writes: > This is a regression in the 24.4 pretest compared to 24.3. > > M-x cua-mode > (enter and) select a word =E2=80=9Chello", e.g., via double-click > enter single char, e.g., =E2=80=9Cx=E2=80=9D > C-_ (undo) > > In Emacs 24.3, the undo will restore =E2=80=9Chello=E2=80=9D. > > In Emacs 24.3.93 pretest, the undo will only delete =E2=80=9Cx=E2=80=9D, = but not restore =E2=80=9Chello=E2=80=9D. Stefan Monnier writes: > Indeed, that's a difference between delete-selection-mode and cua's > earlier reimplementation of the feature. > > To the extent that noone complained about it for delete-selection-mode, > I think this bug is not super-urgent to fix. IOW, we should take the > time to think how to fix it right. This was six years ago, and cua-mode still works the same way, so at this point, I think changing the behaviour now would probably be a regression? So I'm closing this bug as a "wontfix". --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 09 05:51:21 2020 Received: (at control) by debbugs.gnu.org; 9 Sep 2020 09:51:21 +0000 Received: from localhost ([127.0.0.1]:57215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFwl7-0003Tt-72 for submit@debbugs.gnu.org; Wed, 09 Sep 2020 05:51:21 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFwl5-0003Tc-BG for control@debbugs.gnu.org; Wed, 09 Sep 2020 05:51:19 -0400 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=vK44JMKjnV/BW7Y5IduW7p9Ui77LF+rKz2lKwQuNfhY=; b=DA0H871dYPJuz63b7rBEyq/dvo aZXAake+P2n+qtu1mgP3DCUPEyxPkAMz71iYTNMZ31huZsqx5GCO7GNSxdLYfj6YtYxGR1EIfjxlE hCGpNM3AbhNoWM9ckRUdRGuZ9izdEVJLy4B07i5R9/kQdCPhMyeNcaRcZmDftGaHnMp8=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFwkx-0007bT-9Q for control@debbugs.gnu.org; Wed, 09 Sep 2020 11:51:13 +0200 Date: Wed, 09 Sep 2020 11:51:10 +0200 Message-Id: <87tuw7ffch.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #18412 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 18412 wontfix close 18412 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 18412 wontfix close 18412 quit From unknown Sat Jun 21 10:43:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 07 Oct 2020 11:24:04 +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