From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Marc Coquand Newsgroups: gmane.emacs.help Subject: Re: Auto add register when leaving buffer? Date: Sat, 09 Nov 2024 09:04:51 +0200 Message-ID: <87cyj4vqek.fsf@mccd.space> References: <874j4m2fl8.fsf@mccd.space> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30014"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 09 08:05:45 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1t9fXV-0007fO-2N for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 09 Nov 2024 08:05:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9fWs-00035E-Vt; Sat, 09 Nov 2024 02:05:07 -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 1t9fWr-00034E-5C for help-gnu-emacs@gnu.org; Sat, 09 Nov 2024 02:05:05 -0500 Original-Received: from fhigh-b8-smtp.messagingengine.com ([202.12.124.159]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9fWo-0004i7-J6 for help-gnu-emacs@gnu.org; Sat, 09 Nov 2024 02:05:04 -0500 Original-Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfhigh.stl.internal (Postfix) with ESMTP id 3E8DA25400CE for ; Sat, 9 Nov 2024 02:04:57 -0500 (EST) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Sat, 09 Nov 2024 02:04:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mccd.space; h=cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1731135897; x=1731222297; bh=YfnoguSDuQ L+2hQGlbIYxbpJrt9lTreW5F72uFzCXoQ=; b=nZjDS014h19CDnHbECzIp07dvu 3tUVKk/ed7B2rj8WfeUUhl401MIDWxcMb3tvv3FiJqPNs8C3dC/SywIRrTkMt9bO 0jiMZ0/piFahdwvunDyBH19LY9T5WfstV/9a6jpKDzJ3yJGhETkScdqJd3jtr7kq fiTaAUH+JMehC0osJixl0RJIdU5shSZs9gPqm+7/vYAq3dKRw8Y6pz0s+nMtTjsf br9kismbjmFtsO6FpQpPVFPXbWwDUwoTmgFfyluobMudE7tuhTLSs9iXFn3sA01z gtBmGt7ELEkKtJmZuHRKpAiBu2PpELq9GNgoLQScFgog4WPQ3ckCaBn8trnw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1731135897; x=1731222297; bh=YfnoguSDuQL+2hQGlbIYxbpJrt9lTreW5F7 2uFzCXoQ=; b=bN4kU+Us4ROZZ3izfX4yVJT0EUdmu8Ln40aFO6B7F6M2gXu3UAM N5RPCP1jKCHJ0eqr7dmHVXAWBo0pMKxiBQ0ZNieo0+CBiEIevVnf49DyidtNl7nE svrEiY1aoWHetfX+3/awgquoxp1XUjDiT6oLjLUH5c2m7yYaFRhK5Oj0siQpk7ep uowY3W8rltqeciCSR1jQUl2nClaalcRmMlfJ5USS3tmOHjNNXC+RXVpG2Ph03Ctm VhyhDwMIFkzRyYdf2Jf4v+1oCVJWITN9zTpThZVFHaKxy4karp1HU1JV1m6yphJl fmGDcI6fAtKbdbouzewvHtCBGyFJ5FPQKYA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrtdejgddutdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujg hffffkgggtsehttdertddttddtnecuhfhrohhmpeforghrtgcuvehoqhhurghnugcuoehm rghrtgesmhgttggurdhsphgrtggvqeenucggtffrrghtthgvrhhnpeejvdeikeeffeejle duheevvdfhjeegteegieefvdekleeuveefteekffffteejhfenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrghrtggtsehfrghsthhmrghilh drfhhrpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthho pehhvghlphdqghhnuhdqvghmrggtshesghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: ia2d149fd:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 9 Nov 2024 02:04:56 -0500 (EST) In-Reply-To: (Jean Louis's message of "Fri, 8 Nov 2024 15:49:35 +0300") Received-SPF: pass client-ip=202.12.124.159; envelope-from=marcc@fastmail.fr; helo=fhigh-b8-smtp.messagingengine.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148298 Archived-At: Hey! Not quite, I'm trying to set up so I am able to return to specific files of a certain file-type. So what I had in mind: - ~C-x r j h~ :: Jump to last opened html file - ~C-x r j c~ :: Jump to last opened css file - ~C-x r j t~ :: Jump to last opened .test.go file - ~C-x r j j~ :: Jump to last opened js file - ~C-x r j p~ :: Jump to last opened .go file I can jump between buffers by using ~C-x b~ but that can sometimes be a bit slow. I think the above setup should be feasible somehow, after all I can manually set marks with ~C-x r X~ where X is the position I want to register. If there is some hook akin to "On-leave buffer" or "On-reopen buffer" for a certain file-type, it feels like this should be doable. -- Marc Jean Louis writes: > * Marc Coquand [2024-11-05 12:32]: >> >> Heya, >> >> In vim I used to have a nifty setup where I would auto register marks >> when leaving a buffer. For example, I'd auto assign 'c to be last open >> css file, 'h to be last open html file etc. > > Maybe you are trying to remember the cursor place in each file? > > You may set the variable: `save-place-mode' to true by M-x customize-option