Comments created by comment-dwim-2 are not detected as changes
taquangtrung opened this issue · 4 comments
Hi,
This is a similar issue to #8, but happens to comment-dwim-2.
Can you help to check?
I'm using:
- Emacs 28.1 (GNU official release)
undo-tree
version 0.8.2: https://elpa.gnu.org/packages/undo-tree.htmlcomment-dwim-2
version 1.4.3, released on 20210101.1820goto-chg
version 1.7.5, released on 20220107.1733
Thank you!
This is still lacking reproduction instructions.
@wasamasa: I did a further investigation and it turned out that goto-last-change
cannot record the changes done by comment-region
, shipped default with Emacs 28.1
Reproduction steps:
- Open a file of Emacs lisp mode, like this file: https://github.com/emacs-evil/goto-chg/blob/master/goto-chg.el
- Select and mark a region of text (using
C-SPC
). - Call
M-x comment-region
to comment out that region. - Move the cursor to another location in the file, and call
M-x goto-last-change
.
The cursor does not jump to the previous location where the region is commented.
Note that I used the default undo mechanism in the above step (undo-tree
was not used).
Thank you, I can reproduce this now. First question that comes to mind is whether this is an issue exclusive to Emacs 28.1. Does Emacs 27.1 behave correctly? If yes, that would point to glc-fixup-edit
requiring adjustments specific to Emacs 28.1.
Thanks for the confirmation!
FYI, I just tested on Emacs 27.1 (similar reproducing steps) and the bug still occurs when comment-region
is used.