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: [External] : Re: A feature to go to last edit locations Date: Mon, 13 Feb 2023 23:28:20 +0300 Message-ID: References: <834jrqhiu7.fsf@gnu.org> <83y1p2fzwq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8635"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) Cc: Eli Zaretskii , Daniel =?utf-8?Q?Mart=C3=ADn?= , "emacs-devel@gnu.org" To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 13 21:57:36 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 1pRftH-0001z8-DK for ged-emacs-devel@m.gmane-mx.org; Mon, 13 Feb 2023 21:57:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRfsT-0007Ex-2V; Mon, 13 Feb 2023 15:56:45 -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 1pRfsR-0007Ed-3h for emacs-devel@gnu.org; Mon, 13 Feb 2023 15:56:43 -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 1pRfsP-0006uF-CT; Mon, 13 Feb 2023 15:56:42 -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 0000000000103956.0000000063EAA408.00002465; Mon, 13 Feb 2023 13:56:39 -0700 Mail-Followup-To: Drew Adams , Eli Zaretskii , 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:303237 Archived-At: > > 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. That ispired me, thanks Eli. > 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. Exactly. Then I have some buffers which are not tied to file name, temporary buffers, but they may dwell for days, and I wish to go to them too. If they disapear, then I have to implement self-destruction of such point of non-existing buffer without file name. > > 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. I had to implement it in the database quickly (DONE), as I have less to think of. Previous ID, next ID and using one global or local variable to keep the current point ID. Food is good. > FWIW, Bookmark+ has `bmkp-automatic-bookmark-mode', which > just records locations with a timer delay. That is also idea. Though it can't teach Emacs what user thinks. And what about the point from where user went to other points, that one should be recorded automatically, I guess, as how else can user go back. > If you want the automatic bookmarks to be temporary (not saved to your > bookmark file), then customize option Definitely it is food for thought. Temporary bookmarks should be those from where user jumped from, as example. > If you want the automatically created bookmarks to be highlighted, > then customize option `bmkp-auto-light-when-set' to highlight > bookmarks of the appropriate kind. For example, to highlight > autonamed bookmarks set it to `autonamed-bookmark'. Not that it is related, but I just imagine how specific part of text could be highlighted, and then also bookmarked, and than point would search for that text, and come there, and highlight it again. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/