unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: yinz Liu <liuyinz95@gmail.com>
To: 60143@debbugs.gnu.org
Subject: bug#60143: 29.0.60; command `undo-redo` don't restore cursor position
Date: Sat, 17 Dec 2022 09:42:28 +0800	[thread overview]
Message-ID: <CA+NXa3gQxcLwT_hTjmd4AMzgnM8-UQ_+y+Dr4prnZLwL9i=PpQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

aaaa ! bbbb @ cccc #


1. when cursor at position "#", call `undo', cursor jump to "@"

2. when cursor at position "@", call `undo-redo', text "cccc" restore,

   but cursor still remain in "@", don't move to "#".


my workaround fow now:


in function primitive-undo
<https://github.com/emacs-mirror/emacs/blob/149e6e03b3f860c3d78031bf3377d8a4c99a7a64/lisp/simple.el#L3622-L3624>
 :


change L3624 to : `(goto-char (+ pos (length string)))`

[-- Attachment #2: Type: text/html, Size: 2823 bytes --]

             reply	other threads:[~2022-12-17  1:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-17  1:42 yinz Liu [this message]
2022-12-18 11:03 ` bug#60143: 29.0.60; command `undo-redo` don't restore cursor position Eli Zaretskii
2022-12-19  1:42   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-19  3:35     ` Eli Zaretskii
2022-12-19 16:09       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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='CA+NXa3gQxcLwT_hTjmd4AMzgnM8-UQ_+y+Dr4prnZLwL9i=PpQ@mail.gmail.com' \
    --to=liuyinz95@gmail.com \
    --cc=60143@debbugs.gnu.org \
    /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).