From unknown Mon Aug 11 18:16:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25433: undo should restore cursor position too Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Jan 2017 00:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25433 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 25433@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs Received: via spool by submit@debbugs.gnu.org id=B.14842668692265 (code B ref -1); Fri, 13 Jan 2017 00:22:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jan 2017 00:21:09 +0000 Received: from localhost ([127.0.0.1]:51887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRpcC-0000aT-O3 for submit@debbugs.gnu.org; Thu, 12 Jan 2017 19:21:08 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37611) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRpcA-0000Zf-KI for submit@debbugs.gnu.org; Thu, 12 Jan 2017 19:21:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRpc4-00015O-Ie for submit@debbugs.gnu.org; Thu, 12 Jan 2017 19:21:01 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41522) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cRpc4-00015F-FX for submit@debbugs.gnu.org; Thu, 12 Jan 2017 19:21:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRpc3-0005gj-20 for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2017 19:21:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRpbx-0000yl-2b for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2017 19:20:59 -0500 Received: from homie.mail.dreamhost.com ([208.97.132.208]:49736 helo=homiemail-a38.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cRpbw-0000yV-Ps for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2017 19:20:53 -0500 Received: from homiemail-a38.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a38.g.dreamhost.com (Postfix) with ESMTP id 8339A10AFBE for ; Thu, 12 Jan 2017 16:20:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=keLmqTNDz141kYnajkHXw2b5wo8=; b=fR+u2IXBjDZtCEQC p3RrvPptSNokCZfXb0vannSZFaQAdlRZLPQCz3fz9RbkU5Az7jIikvhj6piX8y3L a4DducMe4dd+LFXuohrxN8o9VwSsLmXfd+b2lERe3QW9RihosonQZ+BpKrFN4vPv LL2pIGYIDqkCAy5oBcvjZrM3xm0= Received: from jidanni.org (114-26-41-44.dynamic.hinet.net [114.26.41.44]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a38.g.dreamhost.com (Postfix) with ESMTPSA id 3812E10AF7E for ; Thu, 12 Jan 2017 16:20:50 -0800 (PST) From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Date: Fri, 13 Jan 2017 08:20:47 +0800 Message-ID: <87a8av95eo.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.5 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.5 (----) 1. Accidentally paste (C-y) many many lines into the middle of the file on the middle of your screen. 2. Your first reaction of course is to hit undo (C-/). 3. What you are looking at still leaves you worried. It sure doesn't look like what you were looking at before the accident happened. 4. Your second reaction might be to hit undo again. Ahh, but that will only make things worse! Actually the first undo fixed everything back up. It just left the cursor at a different position on the screen leaving you disoriented! It shouldn't do that. Undo should restore cursor position too. I bet that's how the undo found in browser menus works. OK it might restore the cursor position, but does it restore the file position in the whole window? From unknown Mon Aug 11 18:16:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25433: undo should restore cursor position too Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Jan 2017 08:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25433 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Cc: 25433@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 25433-submit@debbugs.gnu.org id=B25433.148429661610891 (code B ref 25433); Fri, 13 Jan 2017 08:37:01 +0000 Received: (at 25433) by debbugs.gnu.org; 13 Jan 2017 08:36:56 +0000 Received: from localhost ([127.0.0.1]:52062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRxM0-0002pb-8j for submit@debbugs.gnu.org; Fri, 13 Jan 2017 03:36:56 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRxLy-0002pP-Pr for 25433@debbugs.gnu.org; Fri, 13 Jan 2017 03:36:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRxLp-0002PJ-R8 for 25433@debbugs.gnu.org; Fri, 13 Jan 2017 03:36:49 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51475) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRxLp-0002PF-Nt; Fri, 13 Jan 2017 03:36:45 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3030 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cRxLo-0005Aq-Ms; Fri, 13 Jan 2017 03:36:45 -0500 Date: Fri, 13 Jan 2017 10:36:52 +0200 Message-Id: <83bmvbcq57.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87a8av95eo.fsf@jidanni.org> References: <87a8av95eo.fsf@jidanni.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.2 (--------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.2 (--------) > From: 積丹尼 Dan Jacobson > > Date: Fri, 13 Jan 2017 08:20:47 +0800 > > 1. Accidentally paste (C-y) many many lines into the middle of the file > on the middle of your screen. > > 2. Your first reaction of course is to hit undo (C-/). > > 3. What you are looking at still leaves you worried. It sure doesn't > look like what you were looking at before the accident happened. > > 4. Your second reaction might be to hit undo again. Ahh, but that will > only make things worse! > > Actually the first undo fixed everything back up. It just left the > cursor at a different position on the screen leaving you disoriented! It > shouldn't do that. Undo should restore cursor position too. I cannot reproduce this here: undo does restore the position of point for me, as it should. Do you see this in "emacs -Q"? If so, please provide a more detailed recipe, including the lines one needs to yank. From unknown Mon Aug 11 18:16:32 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Subject: bug#25433: closed (Re: bug#25433: undo should restore cursor position too) Message-ID: References: <87iniqsj38.fsf@jidanni.org> <87a8av95eo.fsf@jidanni.org> X-Gnu-PR-Message: they-closed 25433 X-Gnu-PR-Package: emacs Reply-To: 25433@debbugs.gnu.org Date: Tue, 18 Jul 2017 00:09:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1500336542-12510-1" This is a multi-part message in MIME format... ------------=_1500336542-12510-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #25433: undo should restore cursor position too which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 25433@debbugs.gnu.org. --=20 25433: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D25433 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1500336542-12510-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 25433-done) by debbugs.gnu.org; 18 Jul 2017 00:08:02 +0000 Received: from localhost ([127.0.0.1]:45101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXG3V-0003EU-Kb for submit@debbugs.gnu.org; Mon, 17 Jul 2017 20:08:01 -0400 Received: from homie.mail.dreamhost.com ([208.97.132.208]:60075 helo=homiemail-a7.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXG3U-0003EG-EG for 25433-done@debbugs.gnu.org; Mon, 17 Jul 2017 20:08:00 -0400 Received: from homiemail-a7.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a7.g.dreamhost.com (Postfix) with ESMTP id 7153E25C06A; Mon, 17 Jul 2017 17:07:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc :subject:references:date:message-id:mime-version:content-type; s=jidanni.org; bh=peIKoewCnemnlc2cVqPy2AgzDnQ=; b=R5jOduuVQHVGq c0WRAaMrTIc9QbKwgKizRO2zOoGAO5eQUbSezbUAls+56B/GZlTUc4kAYV0i7mAT AV0PhmQwZxH1cvt/aqqEqVEi8xQtr4JEONsKCX9YnPGxC4FH/o+W4ZnmkJUh2d/P bhGA6AnDjeYRWxuZoVLwfbNKCJjT1U= Received: from jidanni.org (114-26-46-88.dynamic-ip.hinet.net [114.26.46.88]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a7.g.dreamhost.com (Postfix) with ESMTPSA id 34FDD25C062; Mon, 17 Jul 2017 17:07:59 -0700 (PDT) From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: Eli Zaretskii Subject: Re: bug#25433: undo should restore cursor position too References: <87a8av95eo.fsf@jidanni.org> Date: Tue, 18 Jul 2017 08:07:55 +0800 Message-ID: <87iniqsj38.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25433-done Cc: 25433-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Indeed this is hard to reproduce. So I'll close it. Instead I'll open a similar bug: http://debbugs.gnu.org/27745 . ------------=_1500336542-12510-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 13 Jan 2017 00:21:09 +0000 Received: from localhost ([127.0.0.1]:51887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRpcC-0000aT-O3 for submit@debbugs.gnu.org; Thu, 12 Jan 2017 19:21:08 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37611) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRpcA-0000Zf-KI for submit@debbugs.gnu.org; Thu, 12 Jan 2017 19:21:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRpc4-00015O-Ie for submit@debbugs.gnu.org; Thu, 12 Jan 2017 19:21:01 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41522) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cRpc4-00015F-FX for submit@debbugs.gnu.org; Thu, 12 Jan 2017 19:21:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRpc3-0005gj-20 for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2017 19:21:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRpbx-0000yl-2b for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2017 19:20:59 -0500 Received: from homie.mail.dreamhost.com ([208.97.132.208]:49736 helo=homiemail-a38.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cRpbw-0000yV-Ps for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2017 19:20:53 -0500 Received: from homiemail-a38.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a38.g.dreamhost.com (Postfix) with ESMTP id 8339A10AFBE for ; Thu, 12 Jan 2017 16:20:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=keLmqTNDz141kYnajkHXw2b5wo8=; b=fR+u2IXBjDZtCEQC p3RrvPptSNokCZfXb0vannSZFaQAdlRZLPQCz3fz9RbkU5Az7jIikvhj6piX8y3L a4DducMe4dd+LFXuohrxN8o9VwSsLmXfd+b2lERe3QW9RihosonQZ+BpKrFN4vPv LL2pIGYIDqkCAy5oBcvjZrM3xm0= Received: from jidanni.org (114-26-41-44.dynamic.hinet.net [114.26.41.44]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a38.g.dreamhost.com (Postfix) with ESMTPSA id 3812E10AF7E for ; Thu, 12 Jan 2017 16:20:50 -0800 (PST) From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: bug-gnu-emacs Subject: undo should restore cursor position too Date: Fri, 13 Jan 2017 08:20:47 +0800 Message-ID: <87a8av95eo.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.5 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.5 (----) 1. Accidentally paste (C-y) many many lines into the middle of the file on the middle of your screen. 2. Your first reaction of course is to hit undo (C-/). 3. What you are looking at still leaves you worried. It sure doesn't look like what you were looking at before the accident happened. 4. Your second reaction might be to hit undo again. Ahh, but that will only make things worse! Actually the first undo fixed everything back up. It just left the cursor at a different position on the screen leaving you disoriented! It shouldn't do that. Undo should restore cursor position too. I bet that's how the undo found in browser menus works. OK it might restore the cursor position, but does it restore the file position in the whole window? ------------=_1500336542-12510-1--