From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: yinz Liu Newsgroups: gmane.emacs.bugs Subject: bug#60143: 29.0.60; command `undo-redo` don't restore cursor position Date: Sat, 17 Dec 2022 09:42:28 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e707b805effc3336" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34914"; mail-complaints-to="usenet@ciao.gmane.io" To: 60143@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 17 04:35:42 2022 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 1p6NzC-0008s5-Hi for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Dec 2022 04:35:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6Nyi-0001Mm-D7; Fri, 16 Dec 2022 22:35:12 -0500 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 1p6Nyf-0001Lt-PJ for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2022 22:35:10 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6Nya-0004Cj-VP for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2022 22:35:09 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6Nya-00019m-R4 for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2022 22:35:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: yinz Liu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Dec 2022 03:35:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60143 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16712480834375 (code B ref -1); Sat, 17 Dec 2022 03:35:04 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Dec 2022 03:34:43 +0000 Original-Received: from localhost ([127.0.0.1]:53351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6NyF-00018Q-Id for submit@debbugs.gnu.org; Fri, 16 Dec 2022 22:34:43 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:41154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6MDy-0003gx-0q for submit@debbugs.gnu.org; Fri, 16 Dec 2022 20:42:50 -0500 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 1p6MDx-0006fj-MC for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2022 20:42:49 -0500 Original-Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6MDv-00011m-UV for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2022 20:42:49 -0500 Original-Received: by mail-lj1-x22f.google.com with SMTP id v11so3861628ljk.12 for ; Fri, 16 Dec 2022 17:42:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=doEHJxNX8ZdFZliYtkc2pGmQLWv3cBx6/5A4i2MmFIg=; b=M47STUy/MyAAXe6ikUBhJf59QIhBiyr+uXpOWBawzGBcYf7v3DvxKWO81UNOg+T9Xs cS+M+6judIatoTYbKjs7xXFecsWBAaltI5kKDKuQa0EAJFA/IqjTdrVGHX1GW2OX43fA 0/sQ3YZfz3VIAaGuIKcZIjfWJCcEHtJYxGsz8+ewtVLc5VMoIuVUKl9a5z8aWrVdYQLa APra2Ct6N0vNUb+5XS9MWCVSwnatSotkhirBlLIXwOXAhtBb9IWMnv7eMzmjwWeZjkk3 sFlar2AXnmzQpD62lCU7Jlwvu+cHk+LpGaoHH1BxHAhvh1glsBWO+YG4C1Or9CVKlj5+ 5Cbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=doEHJxNX8ZdFZliYtkc2pGmQLWv3cBx6/5A4i2MmFIg=; b=Q2zhAEZgEGQFjEjdpa5XPGMs0g5qSHrXSm677wYtH3xpgzuNHmPLLAlWQJWkrI4CJ0 vk4KeJnp1hrFm2CbEFCmUO/vwukQQqYx0G7VwcKvaKdJDn9cm6tSggnUoft5+wGvoOTb CNz8LtgoqLGpa4ThZS0mhXjSyLn4yEDwwdIgKyFIzgcQ96ZtQaP5upvYRjOs2XtazPoM W1CRdt2fMNSN+B2AZBvUJmFch6Q9U7C/rgDy51MVzydss4j4Uk26FX7ZJ/MwMnecf6WV 65c5YpSWTQAqq0e/G2W8HyCwmIT2ey0MwKrvpWE6mekr9imhJHdevwKP/IX8ZDx+R2H8 5EJg== X-Gm-Message-State: AFqh2kr0yNlFFuO+dMnoJJUu/ujG+EGBUsA9dYIlj99oOpU+/F3ttS6u ABHM7hp/8PMsSjEuINHyrczOQLZ2wpTSOm+/Iu8dKM3TKiyfcA== X-Google-Smtp-Source: AMrXdXtVGugPfDGK+lO0sQ8XviPSjwJNdOXYeti/Vg4ux+JOgj6fIw1cFX6H1VygrFul1d/tIFjzSQchA1Dey6DXG0U= X-Received: by 2002:a05:651c:221f:b0:27e:5ba8:cdd1 with SMTP id y31-20020a05651c221f00b0027e5ba8cdd1mr375470ljq.142.1671241365127; Fri, 16 Dec 2022 17:42:45 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=liuyinz95@gmail.com; helo=mail-lj1-x22f.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 16 Dec 2022 22:34:38 -0500 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:251255 Archived-At: --000000000000e707b805effc3336 Content-Type: text/plain; charset="UTF-8" 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 : change L3624 to : `(goto-char (+ pos (length string)))` --000000000000e707b805effc3336 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

aaaa ! bbbb @ cccc #


1. when cursor at position &qu= ot;#", call `undo', cursor jump to "@"

2. when cursor at position &qu= ot;@", call `undo-redo', text "cccc" restore,

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


my workaround fow now:


in function=C2=A0primitive-undo=C2=A0:


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

--000000000000e707b805effc3336--