From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: A feature to go to last edit locations Date: Sun, 12 Feb 2023 21:26:45 +0200 Message-ID: <83y1p2fzwq.fsf@gnu.org> References: <834jrqhiu7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8179"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Daniel =?utf-8?Q?Mart=C3=ADn?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 12 20:27:44 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 1pRI0l-0001wg-OL for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Feb 2023 20:27:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRI0N-0003Qe-Vg; Sun, 12 Feb 2023 14:27:19 -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 1pRI0N-0003QQ-2P for emacs-devel@gnu.org; Sun, 12 Feb 2023 14:27:19 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRI0H-0004a3-7p; Sun, 12 Feb 2023 14:27:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=PtdrTEdLl6prNLyOcFOmhOQv9NRihnKquLhT/v0nqYg=; b=axd6Mj7lEq4alBHf4DoT kNu3aVvk4zObcai617x/Hlnxc7jVcdib9uSorRKs7fS/zdtaTLpbc7hFNgokvx01x3l5UFMjyAP8n Leeu9eibK5IL9uoI8ei5knvj339Yaf1BFlMjEegiXy34WCx3TN/uzvtY/Aiv8B6w5nqZhFK8E52TO Jgh1OW1wfadHSF0f8/BQ3PKzmpylLcfjP4kjF0oJIUVymza4PLjwLoeAyN7GUBPMg+WSafkL5+XaH 8KqoGrIMxQys4XzDMOgzNiAt7Pj+KQmbd2Z2hyNowqkEuJFpfr2pCg4nzlfdsGo4+mf4e2anOn+bm 238wmTGv5l2RIA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRI0F-0002E3-Dj; Sun, 12 Feb 2023 14:27:12 -0500 In-Reply-To: (message from Daniel =?utf-8?Q?Mart?= =?utf-8?Q?=C3=ADn?= on Sun, 12 Feb 2023 19:59:03 +0100) 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:303195 Archived-At: > From: Daniel Martín > Cc: emacs-devel@gnu.org > Date: Sun, 12 Feb 2023 19:59:03 +0100 > > Eli Zaretskii writes: > > >> From: Daniel Martín > >> Date: Sun, 12 Feb 2023 18:41:20 +0100 > >> > >> > >> 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. > > > > Emacs also has registers. > > Yes, but registers still require that users explicitly save the position > in a register beforehand. Users may be editing a file, then switch to > another file (or to another part of the same file) and then get a bit > lost and ask themselves "where is what I was editing before?". If they > haven't saved their position in a register or in the mark ring, Emacs > can't help them. Given how much one moves during editing, I have hard time imagining how a command that returns me to "the last place I edited" could be useful without me telling Emacs which of those places is important and which isn't. If you invent a mechanism to save "the last location" automatically, you are going to add a facility that will have a high probability of false positives. In any case, whatever method of deducing automatically which place to record, I think it's better to build the feature on top of registers, since they are already equipped for saving and restoring locations.