From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: List line numbers for easy navigation Date: Thu, 18 Apr 2024 23:16:27 +0200 Message-ID: <87frvifk2c.fsf@gmx.net> References: <87sezifmy8.fsf@gmx.net> <87o7a6fm47.fsf@gmx.net> <87jzkufl2v.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30969"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Heime via Users list for the GNU Emacs text editor To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 18 23:17:37 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 1rxZ8T-0007qr-OF for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 18 Apr 2024 23:17:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxZ7l-000641-Mp; Thu, 18 Apr 2024 17:16:53 -0400 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 1rxZ7U-00062F-08 for help-gnu-emacs@gnu.org; Thu, 18 Apr 2024 17:16:37 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rxZ7P-00011E-GE for help-gnu-emacs@gnu.org; Thu, 18 Apr 2024 17:16:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1713474988; x=1714079788; i=stephen.berman@gmx.net; bh=2nzhHwDviAawPZ8nCFhfOAKxKhgCbtd7tiaxvNj0YrQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=k0DFzVtvRt01S75f1ytZZhkkINFZAYXRY7cKhpt9vo/n5baEY5gQxZP8BB7R11jM fRJE9QlFxs3lqLjm6KwgaZn8ki+RtYGywIWCNAojN6TPP5Y8h3zAFuvs6lA2RurAI MGFQh/qU/qjH4bhNBXQ2aSscaxnwWZfo8+ZWR7lQxoR0W6CJFGryrGMSqfFy0cRgy 8Xyz1lBk8fXMSet50kz4LzMRWnXaDdDcleNe03GgLUVqL98ok8szm4sRgJO9lb1Ri 5d/XAXbUIrz41PViMVL0J2s30Dyayrus+gQmzRTsrEytyHyJPj95+iXzex6dtj44h IjVrma2OvVJ7SW5Z9A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs ([94.134.94.180]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MFKKX-1rv8Gj0LzV-00FnOZ; Thu, 18 Apr 2024 23:16:28 +0200 In-Reply-To: (Heime's message of "Thu, 18 Apr 2024 21:02:56 +0000") X-Provags-ID: V03:K1:Bdq5jMSta2mR1+nhuD+/4Qdd/Gf1bHlw7R6ShNVlDPfcvGp4XSY LSE96N2soSMQ1PjgizagF4K2ZoPJzjXj4MPcO6LD7L1H3D1SQJvKWDOB/wsYdFKwk9afLDQ 3oZ6L+EC0MFZaALVAPXFhQhZN1jUl0Iw1K83MtLK9kd7irDR0LbjFI5IPZkiZjpuWyo+0Ze U5/FTOYnc3XKEQ34MHXqg== UI-OutboundReport: notjunk:1;M01:P0:uG3bztTr9g4=;ynUX1zaGscxmurdB2s0kfqveSKB ST9HMbxPERlExsezzAhM7URfAbVGO8FvqWDeIxkFKMwiHOLRys1IRYT6U6sW8Sm9wguvTUns3 ePMaXmbYlkeABIU1y3khFKCVTl1Z4Sn8Cjig9PB7Q6ssViGkBzdJB5qGJ4hgNKlOuX4luGnfH 64aZaP9kk7O7yyk/RXRg3PwrTkJjIfMZkaUX9zqCXFBLr5jur2YbxtsHxS9J0umRerOC1p+H4 nqEO6AnO0MviqdpGNVS/Pj7sCwYRxJOWwJhMrZz3STqHm/EzDe0paMPzq8485CZHQZKikMA0O vhNdaUSZL9ItZWaI9TBCEEhe7FGGhFovay6K439pNRvEucJz0LZ8piqA++KfggZQHf9JurN5j GcZ/ymVF/+Qkh74l3/sAjuMRaQGzZZ8zZhfzc+wzMYhcqfazbJSGMHd4GGMCqQtj8UOhZaO9s SvRTRGkmXdKYPEtogjJv/S8Cp+9u1af/PiNmrfwmfBCxiWMt0yvNxHNsY6zlSymvj+hR3GYoU DWZ9vCr5S/TZemk5WSX/xb67F5l+CWLDSYNlMHp2SCgDkHA1sgkrDGmlUBRQIEsP4DBuoAKsM 3F6LDD/RLjMAJhD1s9Onyl5cADv9DC6QXMkEbndldSfqTQFyxCxlyn4Fc9tbFiEtSQB1kT0S+ O6nu7BwjV1YPWh/R109ImENZXou4WgRhvValkMAI2BspyJzz//3tcO4eQds77uIUEYe4ClySF ibMPlKVqSOuJlNaYyywM9uTMbjXFf4mlHfP0YGvAeUgUzjgA3okSyordjSV9gHQMuMWE54+v Received-SPF: pass client-ip=212.227.17.20; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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:146360 Archived-At: On Thu, 18 Apr 2024 21:02:56 +0000 Heime wrot= e: > On Friday, April 19th, 2024 at 8:54 AM, Stephen Berman > wrote: > >> On Thu, 18 Apr 2024 20:38:44 +0000 Heime heimeborgia@protonmail.com wro= te: [...] >> > Suppose I am writing some code at row 1358 and want to check on two f= unctions, >> > one starting at row 355, the other at row 589. I want to go to the ro= w and add >> > the current row to the list (Will do this three times). Then have a c= ommand to >> > navigate between them. Call command te get me to the respective row. >> >> >> You can do this with existing Emacs commands: `M-g M-g' (or` M-g g') to >> get prompted for a line number and then jump to it, and then you can us= e >> the mark ring (info "(emacs) Mark Ring") or registers (info "(emacs) >> Position Registers") to navigate between positions. Why reinvent the >> wheel? >> >> Steve Berman > > Because I am finding that going to the marks with the current keybinding= s > difficult to remember. Perhaps I can make a new easier command that tak= es > care of the marks for me and help me use the existing emacs commands wit= hout > too much struggle. Then I can only suggest reading those sections of the Emacs manual and if necessary looking at the source code of the functions (I think most of the are Lisp functions in simple.el). Then maybe you can put something together for yourself, though I suspect it won't be easy to get something that works as well as the existing commands. One other tip: if what you really want to do is navigate between existing functions or other named pieces of code, then using `M-.' and `M-,' is probably the most efficient way, see (info "(emacs) Looking Up Identifiers= "). Steve Berman