From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Re: List line numbers for easy navigation Date: Thu, 18 Apr 2024 23:10:32 +0000 Message-ID: References: <87sezifmy8.fsf@gmx.net> <87o7a6fm47.fsf@gmx.net> <87jzkufl2v.fsf@gmx.net> <87frvifk2c.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="764"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stephen Berman , 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 Fri Apr 19 01:11:40 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 1rxaup-000Aco-Gj for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 19 Apr 2024 01:11:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxauD-0007yE-HW; Thu, 18 Apr 2024 19:11:01 -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 1rxatx-0007x4-71 for help-gnu-emacs@gnu.org; Thu, 18 Apr 2024 19:10:48 -0400 Original-Received: from mail-40130.protonmail.ch ([185.70.40.130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rxatu-00035B-80 for help-gnu-emacs@gnu.org; Thu, 18 Apr 2024 19:10:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1713481836; x=1713741036; bh=a12C9jm2KZv0W8t4LBzZeDdypJl0B/9IGa2ZwoJE3Lg=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=muH19po/Fd/HrpQXN9kLoEVfIdeqoAxXXFfc8aCJyFOCYdKBlYDk8By5EsDD+LfAm b337k07XfKGorbehhVKGbvg6dgEG4AOb3Wost/a0jP78OvCK50jSLnLAGIU5XwFr/a GjYqJsiQ1wqkbj60H4EyK+/gcLduUmjosUGBRifiT+D3+xpfEr7X3UpHmOMCI7d67f HtS8s4bM8rFkNx8K1JatGVLMM1ePu38Ej6qaim8G1K86/aEdnhCs6AGcHbU+4YBxCl uShGwula4ZLFqb5r3S0rNtWammkw7RkC/LaYgAPoDW10fclKirJQqgoVlG2XqTB1hV gBZ2Y421mC6yg== In-Reply-To: Feedback-ID: 57735886:user:proton X-Pm-Message-ID: 8aebf164ae4f754c5dfeb3f1b90999a5f356d3f6 Received-SPF: pass client-ip=185.70.40.130; envelope-from=heimeborgia@protonmail.com; helo=mail-40130.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TO_EQ_FM_DIRECT_MX=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:146362 Archived-At: On Friday, April 19th, 2024 at 10:06 AM, Heime = wrote: > On Friday, April 19th, 2024 at 9:16 AM, Stephen Berman stephen.berman@gmx= .net wrote: >=20 > > On Thu, 18 Apr 2024 21:02:56 +0000 Heime heimeborgia@protonmail.com wro= te: > >=20 > > > On Friday, April 19th, 2024 at 8:54 AM, Stephen Berman > > > stephen.berman@gmx.net wrote: > > >=20 > > > > On Thu, 18 Apr 2024 20:38:44 +0000 Heime heimeborgia@protonmail.com= wrote: > >=20 > > [...] > >=20 > > > > > Suppose I am writing some code at row 1358 and want to check on t= wo functions, > > > > > one starting at row 355, the other at row 589. I want to go to th= e row and add > > > > > the current row to the list (Will do this three times). Then have= a command to > > > > > navigate between them. Call command te get me to the respective r= ow. > > > >=20 > > > > 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 ca= n use > > > > the mark ring (info "(emacs) Mark Ring") or registers (info "(emacs= ) > > > > Position Registers") to navigate between positions. Why reinvent th= e > > > > wheel? > > > >=20 > > > > Steve Berman > > >=20 > > > Because I am finding that going to the marks with the current keybind= ings > > > difficult to remember. Perhaps I can make a new easier command that t= akes > > > care of the marks for me and help me use the existing emacs commands = without > > > too much struggle. > >=20 > > 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 Identifi= ers"). > >=20 > > Steve Berman >=20 >=20 > I know that C- calls the command (set-mark-command ARG) >=20 >=20 > But have no idea of the commands associated with "C- C-" and wi= th "C-u C-". Would like a command I can >=20 > call with M-x that does the marking functionality. Have done some code, but does not work very well (defun tema-mark () (interactive) (save-excursion (move-beginning-of-line nil) (set-mark-command nil) (move-end-of-line nil))) (defun tema-move () (interactive) (set-mark-command 1)) I would like the ability to name a line and then=20 move to the named line. What can I do ?