From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.devel Subject: Re: A feature to go to last edit locations Date: Mon, 13 Feb 2023 14:49:46 -0500 Message-ID: <871qmtl50l.fsf@md5i.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22946"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Daniel =?iso-8859-1?Q?Mart=EDn?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 13 20:50:13 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pReq3-0005gn-RR for ged-emacs-devel@m.gmane-mx.org; Mon, 13 Feb 2023 20:50:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRepk-0000BT-My; Mon, 13 Feb 2023 14:49:53 -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 1pRepj-0000BD-6c for emacs-devel@gnu.org; Mon, 13 Feb 2023 14:49:51 -0500 Original-Received: from md5i.com ([75.151.244.229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRepg-0002xu-SH for emacs-devel@gnu.org; Mon, 13 Feb 2023 14:49:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=md5i.com; s=dkim; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date :References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=x+jDlfpbouDWhm170jq7QamS/v7pgKpw4vrhxUGs2gg=; b=OVs8HBzDTJ1UmkqBXRQi8iZUvH P/qAz94Oh/PEM7WJBIHjr/+enxJgvA5BtioEif7AJvZzet9cBKI0xxISPf8zSt9LUaB8JypsW7es1 0/Fr0ERPYZwC47PxJN7AeHAHh; Original-Received: from abode ([192.168.177.1]:41602 helo=miko) by md5i.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1pRepe-00F9fX-10; Mon, 13 Feb 2023 14:49:46 -0500 In-Reply-To: ("Daniel =?iso-8859-1?Q?Mart=EDn=22?= =?iso-8859-1?Q?'s?= message of "Sun, 12 Feb 2023 18:41:20 +0100") Received-SPF: pass client-ip=75.151.244.229; envelope-from=mwd@md5i.com; helo=md5i.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303231 Archived-At: Daniel Mart=EDn writes: > Some IDEs and text editors provide a feature to go to the position of > the last edit location across all buffers. For example, in Eclipse or > IntelliJ IDEA, this feature is under Navigate, Last Edit Location. In > Vim, this feature is called a "change list jump" [1], but it seems to > work in a per-buffer basis. > > The closest thing in Emacs is pop-global-mark, but it's not quite the > same feature. The global mark ring requires that the user sets the mark > in advance, and most editing commands do not set the mark. Information > about last edit locations is already kept in buffer-undo-list, but this > list is per-buffer and does not contain timestamps, so generating a > "global" list for all buffers out of this data structure does not seem > very possible or efficient at the moment; it may need a new data > structure, perhaps at the C level. I often want to jump to the last change I made in a buffer, but I've never wanted this across buffers. The method I use for this, burned into my fingertips, is "C-_ C-SPC C-_", which is undo, set mark, undo. The set-mark causes the second undo to redo and could be replaced by a cursor movement instead, if one didn't want to mess up the mark location. So, although, once again, this doesn't work across buffers, using the undo list might be helpful for coding such a feature. --=20 Michael Welsh Duggan (md5i@md5i.com)