unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Braun Gábor" <braungb88@gmail.com>
Cc: 70122@debbugs.gnu.org
Subject: bug#70122: 29.3.50; transpose-regions can crash Emacs
Date: Sat, 13 Apr 2024 13:34:29 +0300	[thread overview]
Message-ID: <86il0lpn4a.fsf@gnu.org> (raw)
In-Reply-To: <8400498.NyiUUSuA9g@gabor> (message from Braun Gábor on Fri, 12 Apr 2024 11:39:34 +0200)

> From: Braun Gábor <braungb88@gmail.com>
> 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.





  parent reply	other threads:[~2024-04-13 10:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 10:02 bug#70122: 29.3.50; transpose-regions can crash Emacs Braun Gábor
2024-04-01 11:55 ` Eli Zaretskii
2024-04-01 13:17   ` Eli Zaretskii
2024-04-03 18:52     ` Braun Gábor
2024-04-04  4:48       ` Eli Zaretskii
2024-04-12  9:39         ` Braun Gábor
2024-04-12  9:42           ` Braun Gábor
2024-04-13 10:34           ` Eli Zaretskii [this message]
2024-04-16 14:26             ` Braun Gábor
2024-04-20  7:50               ` Eli Zaretskii
2024-04-24 12:35                 ` Braun Gábor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86il0lpn4a.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=70122@debbugs.gnu.org \
    --cc=braungb88@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).