From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.devel Subject: Re: A feature to go to last edit locations Date: Mon, 13 Feb 2023 22:28:04 +0300 Message-ID: References: <972bedcc-37c9-5180-ac41-90e25d854a63@yandex.ru> 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="18645"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) Cc: Daniel =?utf-8?Q?Mart=C3=ADn?= , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 13 20:33:25 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 1pReZp-0004cu-EY for ged-emacs-devel@m.gmane-mx.org; Mon, 13 Feb 2023 20:33:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pReZP-0007M5-4q; Mon, 13 Feb 2023 14:32:59 -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 1pReZH-0007Jd-5U for emacs-devel@gnu.org; Mon, 13 Feb 2023 14:32:52 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pReZF-00005Z-Em for emacs-devel@gnu.org; Mon, 13 Feb 2023 14:32:50 -0500 Original-Received: from localhost ([::ffff:197.239.6.48]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000103957.0000000063EA9063.000014F3; Mon, 13 Feb 2023 12:32:50 -0700 Mail-Followup-To: Dmitry Gutov , Daniel =?utf-8?Q?Mart=C3=ADn?= , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.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, RCVD_IN_SBL=0.141, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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:303227 Archived-At: * Dmitry Gutov [2023-02-12 21:53]: > On 12/02/2023 20:50, Daniel Martín wrote: > > Another question is how to track the edit locations efficiently. A > > naive implementation would be to add a function to > > after-change-functions if the xref setting is enabled. > > Sure, as one option. Except you'd have to differentiate user-made changes to > the buffer and ones created by more complex commands, or timers, or > auto-revert-mode... One could do following: - remember paragraph at point - split it as words - record those words - jump to point - search in buffer upwards and downwards for some regex like word.*word.*word.* Maybe that think process could help in locating the exact point. Or point could remember also the few words or line, and search for it straight, up or down. If it does not exist, point should destroy itself by asking user for it. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/