unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Bodertz <bodertz@gmail.com>
Cc: 45947@debbugs.gnu.org
Subject: bug#45947: 28.0.50; comment-dwim and undo in active region
Date: Tue, 07 Jun 2022 16:14:47 +0200	[thread overview]
Message-ID: <874k0wh86g.fsf@gnus.org> (raw)
In-Reply-To: <87wnwabxjw.fsf@gmail.com> (bodertz@gmail.com's message of "Sun,  17 Jan 2021 22:53:39 -0700")

Bodertz <bodertz@gmail.com> writes:

> Undoing with an active region does not always work as expected if
> `comment-dwim' is used.  From emacs -Q:
>
> 1. Create a new buffer (C-x b new-buffer RET)
>
> 2. Insert A, B, and C on seperate lines as below
>    ('*' represents point)
>
> A
> B
> C*
>
> 3. Create an active region over the last two lines (C-SPC C-p C-a)
> 4. Use comment-dwim (M-; ; RET)
> 5. Create an active region over the last two lines (C-SPC M->)
> 6. Undo (C-/):
>
> A
> ; *
> ; C

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I can reproduce this in Emacs 29, too.  I wonder whether it's related to
bug#21523 -- it, too, mis-computes the active region at the edges and
includes the wrong thing.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2022-06-07 14:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18  5:53 bug#45947: 28.0.50; comment-dwim and undo in active region Bodertz
2022-06-07 14:14 ` Lars Ingebrigtsen [this message]

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=874k0wh86g.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=45947@debbugs.gnu.org \
    --cc=bodertz@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).