From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70122: 29.3.50; transpose-regions can crash Emacs Date: Sat, 13 Apr 2024 13:34:29 +0300 Message-ID: <86il0lpn4a.fsf@gnu.org> References: <2318820.ElGaqSPkdT@gabor> <3216728.5fSG56mABF@gabor> <86frw191ht.fsf@gnu.org> <8400498.NyiUUSuA9g@gabor> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10799"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70122@debbugs.gnu.org To: Braun =?UTF-8?Q?G=C3=A1bor?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 13 12:36:38 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rvakQ-0002ff-7y for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Apr 2024 12:36:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rvajs-0004Q5-HK; Sat, 13 Apr 2024 06:36:04 -0400 Original-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 ) id 1rvajr-0004Ps-1X for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2024 06:36:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rvajq-0005TG-Pg for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2024 06:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rvak0-0002Cf-EC for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2024 06:36:12 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Apr 2024 10:36:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70122 X-GNU-PR-Package: emacs Original-Received: via spool by 70122-submit@debbugs.gnu.org id=B70122.17130045087866 (code B ref 70122); Sat, 13 Apr 2024 10:36:11 +0000 Original-Received: (at 70122) by debbugs.gnu.org; 13 Apr 2024 10:35:08 +0000 Original-Received: from localhost ([127.0.0.1]:60212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvaio-00021R-GX for submit@debbugs.gnu.org; Sat, 13 Apr 2024 06:35:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvaif-0001ye-Fe for 70122@debbugs.gnu.org; Sat, 13 Apr 2024 06:34:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rvaiP-000504-KP; Sat, 13 Apr 2024 06:34:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=G8j3iJoMt0bayQNKAk2C9kTRG7JCik2yH4axx4ezfIk=; b=melNiB5AxXI/yklcCKOk 4hhIqp87h78FJzhcovCSApzid/fNwxy+PAFHAQoAlMa41kOHVz8Hd0wcpwRcoj81pegsBPUPMBpWF lETdhMGPCMH5d7n/qlg+8oZTvOWSCAFWREdmis2KoFjbEZJGCRZyq91+RGrbNzYW2blHQCcIl6ZWa A9CWD7dZQmHpkzsn7SDKH75WVBjxEBLCkz2qfECkxmLNdIlahS1Hg7lz9QKfVNCITJhVaUxHFlpcs U53AAcflc9Mk5Fw3XbSK8wzikL6zOonaBFvuni8LjwkXKjK6kHbFFUpPEQEQMdlOJoVCPeToyN/H+ sQXz4pYis2Py6g==; In-Reply-To: <8400498.NyiUUSuA9g@gabor> (message from Braun =?UTF-8?Q?G=C3=A1bor?= on Fri, 12 Apr 2024 11:39:34 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283199 Archived-At: > From: Braun Gábor > Cc: 70122@debbugs.gnu.org > Date: Fri, 12 Apr 2024 11:39:34 +0200 > > Sorry for answering late. No sweat. > > Can we lift that restriction by augmenting the len1_byte == > > len2_byte branch so that the len1 == len2 condition is not needed? > > I could only come up with one that has minimal difference to > to the other branches. I've attached it. > > I've tried to preserve the undo entries as changes in the two > regions, but I couldn't make it (one of my tests failed), > so now it is a change in the large region as in the other > branches, and the tests pass. That doesn't sound like a serious problem, since the other branches also do it. > The issue I was unable to solve is that the functions > set_text_properties_1 and graft_intervals_into_buffer > record text property changes in undo history, but this is unwanted > here as transpose-regions handles undo history itself. > These entries don't cause trouble because they happen to be > followed by a deletion of the text where properties change, > and this applies to all branches of transpose-regions. > > I'd really like to use a version of these functions with: "change > text properties, but leave it to us to record it in undo history". But this is not a new problem, right? The code called set_text_properties_1 and graft_intervals_into_buffer before the changes as well, and had the same effect on undo history. Right? If this is something caused by these changes, could you please explain the issue in more detail, with references to the relevant parts of the code? > > Last, but not least: with the added tests your patch becomes > > larger than what we can accept without your assigning the > > copyright to the FSF. Would you like to start the legal paperwork > > of copyright assignment at this time > > Let's start the paperwork. Will send the form off-list shortly.