* List line numbers for easy navigation
@ 2024-04-18 19:38 Heime
2024-04-18 20:14 ` Stephen Berman
0 siblings, 1 reply; 11+ messages in thread
From: Heime @ 2024-04-18 19:38 UTC (permalink / raw)
To: Heime via Users list for the GNU Emacs text editor
I want to have a list of line numbers so that I can easily navigate to them
in the current buffer.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: List line numbers for easy navigation
2024-04-18 19:38 List line numbers for easy navigation Heime
@ 2024-04-18 20:14 ` Stephen Berman
2024-04-18 20:23 ` Heime
0 siblings, 1 reply; 11+ messages in thread
From: Stephen Berman @ 2024-04-18 20:14 UTC (permalink / raw)
To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor
On Thu, 18 Apr 2024 19:38:53 +0000 Heime <heimeborgia@protonmail.com> wrote:
> I want to have a list of line numbers so that I can easily navigate to them
> in the current buffer.
(number-sequence 1 (count-lines (point-min) (point-max)))
Steve Berman
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: List line numbers for easy navigation
2024-04-18 20:14 ` Stephen Berman
@ 2024-04-18 20:23 ` Heime
2024-04-18 20:32 ` Stephen Berman
0 siblings, 1 reply; 11+ messages in thread
From: Heime @ 2024-04-18 20:23 UTC (permalink / raw)
To: Stephen Berman; +Cc: Heime via Users list for the GNU Emacs text editor
On Friday, April 19th, 2024 at 8:14 AM, Stephen Berman <stephen.berman@gmx.net> wrote:
> On Thu, 18 Apr 2024 19:38:53 +0000 Heime heimeborgia@protonmail.com wrote:
>
> > I want to have a list of line numbers so that I can easily navigate to them
> > in the current buffer.
>
>
> (number-sequence 1 (count-lines (point-min) (point-max)))
>
> Steve Berman
I would like to have a command that adds the current row to the list,
then have a command to move from one to the next, etc. I frequently
have to navigate quickly between different parts of a buffer and need
some good commands to do this.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: List line numbers for easy navigation
2024-04-18 20:23 ` Heime
@ 2024-04-18 20:32 ` Stephen Berman
2024-04-18 20:38 ` Heime
0 siblings, 1 reply; 11+ messages in thread
From: Stephen Berman @ 2024-04-18 20:32 UTC (permalink / raw)
To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor
On Thu, 18 Apr 2024 20:23:17 +0000 Heime <heimeborgia@protonmail.com> wrote:
> On Friday, April 19th, 2024 at 8:14 AM, Stephen Berman
> <stephen.berman@gmx.net> wrote:
>
>> On Thu, 18 Apr 2024 19:38:53 +0000 Heime heimeborgia@protonmail.com wrote:
>>
>> > I want to have a list of line numbers so that I can easily navigate to them
>> > in the current buffer.
>>
>>
>> (number-sequence 1 (count-lines (point-min) (point-max)))
>>
>> Steve Berman
>
> I would like to have a command that adds the current row to the list,
Is the current row the line at point? If so, it's already in the list,
since the list contains all line numbers in the current buffer, isn't
that what you wanted?
> then have a command to move from one to the next, etc.
To move from one line to the next? C-n. If that's not what you want, can
you rephrase?
> I frequently
> have to navigate quickly between different parts of a buffer and need
> some good commands to do this.
What specifically do you mean by different parts?
Steve Berman
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: List line numbers for easy navigation
2024-04-18 20:32 ` Stephen Berman
@ 2024-04-18 20:38 ` Heime
2024-04-18 20:54 ` Stephen Berman
0 siblings, 1 reply; 11+ messages in thread
From: Heime @ 2024-04-18 20:38 UTC (permalink / raw)
To: Stephen Berman; +Cc: Heime via Users list for the GNU Emacs text editor
On Friday, April 19th, 2024 at 8:32 AM, Stephen Berman <stephen.berman@gmx.net> wrote:
> On Thu, 18 Apr 2024 20:23:17 +0000 Heime heimeborgia@protonmail.com wrote:
>
> > On Friday, April 19th, 2024 at 8:14 AM, Stephen Berman
> > stephen.berman@gmx.net wrote:
> >
> > > On Thu, 18 Apr 2024 19:38:53 +0000 Heime heimeborgia@protonmail.com wrote:
> > >
> > > > I want to have a list of line numbers so that I can easily navigate to them
> > > > in the current buffer.
> > >
> > > (number-sequence 1 (count-lines (point-min) (point-max)))
> > >
> > > Steve Berman
> >
> > I would like to have a command that adds the current row to the list,
>
>
> Is the current row the line at point? If so, it's already in the list,
> since the list contains all line numbers in the current buffer, isn't
> that what you wanted?
>
> > then have a command to move from one to the next, etc.
>
>
> To move from one line to the next? C-n. If that's not what you want, can
> you rephrase?
To move cursor from one row in the list to the next row in the list.
> > I frequently
> > have to navigate quickly between different parts of a buffer and need
> > some good commands to do this.
>
> What specifically do you mean by different parts?
>
> Steve Berman
Suppose I am writing some code at row 1358 and want to check on two functions,
one starting at row 355, the other at row 589. I want to go to the 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 row.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: List line numbers for easy navigation
2024-04-18 20:38 ` Heime
@ 2024-04-18 20:54 ` Stephen Berman
2024-04-18 21:02 ` Heime
0 siblings, 1 reply; 11+ messages in thread
From: Stephen Berman @ 2024-04-18 20:54 UTC (permalink / raw)
To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor
On Thu, 18 Apr 2024 20:38:44 +0000 Heime <heimeborgia@protonmail.com> wrote:
> On Friday, April 19th, 2024 at 8:32 AM, Stephen Berman
> <stephen.berman@gmx.net> wrote:
>
>> On Thu, 18 Apr 2024 20:23:17 +0000 Heime heimeborgia@protonmail.com wrote:
>>
>> > On Friday, April 19th, 2024 at 8:14 AM, Stephen Berman
>> > stephen.berman@gmx.net wrote:
>> >
>> > > On Thu, 18 Apr 2024 19:38:53 +0000 Heime heimeborgia@protonmail.com wrote:
>> > >
>> > > > I want to have a list of line numbers so that I can easily navigate to them
>> > > > in the current buffer.
>> > >
>> > > (number-sequence 1 (count-lines (point-min) (point-max)))
>> > >
>> > > Steve Berman
>> >
>> > I would like to have a command that adds the current row to the list,
>>
>>
>> Is the current row the line at point? If so, it's already in the list,
>> since the list contains all line numbers in the current buffer, isn't
>> that what you wanted?
>>
>> > then have a command to move from one to the next, etc.
>>
>>
>> To move from one line to the next? C-n. If that's not what you want, can
>> you rephrase?
>
> To move cursor from one row in the list to the next row in the list.
>
>> > I frequently
>> > have to navigate quickly between different parts of a buffer and need
>> > some good commands to do this.
>>
>> What specifically do you mean by different parts?
>>
>> Steve Berman
>
> Suppose I am writing some code at row 1358 and want to check on two functions,
> one starting at row 355, the other at row 589. I want to go to the 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 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 use
the mark ring (info "(emacs) Mark Ring") or registers (info "(emacs)
Position Registers") to navigate between positions. Why reinvent the
wheel?
Steve Berman
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: List line numbers for easy navigation
2024-04-18 20:54 ` Stephen Berman
@ 2024-04-18 21:02 ` Heime
2024-04-18 21:16 ` Stephen Berman
0 siblings, 1 reply; 11+ messages in thread
From: Heime @ 2024-04-18 21:02 UTC (permalink / raw)
To: Stephen Berman; +Cc: Heime via Users list for the GNU Emacs text editor
On Friday, April 19th, 2024 at 8:54 AM, Stephen Berman <stephen.berman@gmx.net> wrote:
> On Thu, 18 Apr 2024 20:38:44 +0000 Heime heimeborgia@protonmail.com wrote:
>
> > On Friday, April 19th, 2024 at 8:32 AM, Stephen Berman
> > stephen.berman@gmx.net wrote:
> >
> > > On Thu, 18 Apr 2024 20:23:17 +0000 Heime heimeborgia@protonmail.com wrote:
> > >
> > > > On Friday, April 19th, 2024 at 8:14 AM, Stephen Berman
> > > > stephen.berman@gmx.net wrote:
> > > >
> > > > > On Thu, 18 Apr 2024 19:38:53 +0000 Heime heimeborgia@protonmail.com wrote:
> > > > >
> > > > > > I want to have a list of line numbers so that I can easily navigate to them
> > > > > > in the current buffer.
> > > > >
> > > > > (number-sequence 1 (count-lines (point-min) (point-max)))
> > > > >
> > > > > Steve Berman
> > > >
> > > > I would like to have a command that adds the current row to the list,
> > >
> > > Is the current row the line at point? If so, it's already in the list,
> > > since the list contains all line numbers in the current buffer, isn't
> > > that what you wanted?
> > >
> > > > then have a command to move from one to the next, etc.
> > >
> > > To move from one line to the next? C-n. If that's not what you want, can
> > > you rephrase?
> >
> > To move cursor from one row in the list to the next row in the list.
> >
> > > > I frequently
> > > > have to navigate quickly between different parts of a buffer and need
> > > > some good commands to do this.
> > >
> > > What specifically do you mean by different parts?
> > >
> > > Steve Berman
> >
> > Suppose I am writing some code at row 1358 and want to check on two functions,
> > one starting at row 355, the other at row 589. I want to go to the 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 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 use
> 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 keybindings
difficult to remember. Perhaps I can make a new easier command that takes
care of the marks for me and help me use the existing emacs commands without
too much struggle.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: List line numbers for easy navigation
2024-04-18 21:02 ` Heime
@ 2024-04-18 21:16 ` Stephen Berman
2024-04-18 22:06 ` Heime
0 siblings, 1 reply; 11+ messages in thread
From: Stephen Berman @ 2024-04-18 21:16 UTC (permalink / raw)
To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor
On Thu, 18 Apr 2024 21:02:56 +0000 Heime <heimeborgia@protonmail.com> wrote:
> On Friday, April 19th, 2024 at 8:54 AM, Stephen Berman
> <stephen.berman@gmx.net> wrote:
>
>> On Thu, 18 Apr 2024 20:38:44 +0000 Heime heimeborgia@protonmail.com wrote:
[...]
>> > Suppose I am writing some code at row 1358 and want to check on two functions,
>> > one starting at row 355, the other at row 589. I want to go to the 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 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 use
>> 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 keybindings
> difficult to remember. Perhaps I can make a new easier command that takes
> care of the marks for me and help me use the existing emacs commands without
> 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: List line numbers for easy navigation
2024-04-18 21:16 ` Stephen Berman
@ 2024-04-18 22:06 ` Heime
2024-04-18 23:10 ` Heime
0 siblings, 1 reply; 11+ messages in thread
From: Heime @ 2024-04-18 22:06 UTC (permalink / raw)
To: Stephen Berman; +Cc: Heime via Users list for the GNU Emacs text editor
On Friday, April 19th, 2024 at 9:16 AM, Stephen Berman <stephen.berman@gmx.net> wrote:
> On Thu, 18 Apr 2024 21:02:56 +0000 Heime heimeborgia@protonmail.com wrote:
>
> > On Friday, April 19th, 2024 at 8:54 AM, Stephen Berman
> > stephen.berman@gmx.net wrote:
> >
> > > On Thu, 18 Apr 2024 20:38:44 +0000 Heime heimeborgia@protonmail.com wrote:
>
> [...]
>
> > > > Suppose I am writing some code at row 1358 and want to check on two functions,
> > > > one starting at row 355, the other at row 589. I want to go to the 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 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 use
> > > 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 keybindings
> > difficult to remember. Perhaps I can make a new easier command that takes
> > care of the marks for me and help me use the existing emacs commands without
> > 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
I know that C-<SPC> calls the command (set-mark-command ARG)
But have no idea of the commands associated with "C-<SPC> C-<SPC>" and with "C-u C-<SPC>". Would like a command I can
call with M-x that does the marking functionality.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: List line numbers for easy navigation
2024-04-18 22:06 ` Heime
@ 2024-04-18 23:10 ` Heime
2024-04-19 4:52 ` Yuri Khan
0 siblings, 1 reply; 11+ messages in thread
From: Heime @ 2024-04-18 23:10 UTC (permalink / raw)
To: Heime; +Cc: Stephen Berman,
Heime via Users list for the GNU Emacs text editor
On Friday, April 19th, 2024 at 10:06 AM, Heime <heimeborgia@protonmail.com> wrote:
> On Friday, April 19th, 2024 at 9:16 AM, Stephen Berman stephen.berman@gmx.net wrote:
>
> > On Thu, 18 Apr 2024 21:02:56 +0000 Heime heimeborgia@protonmail.com wrote:
> >
> > > On Friday, April 19th, 2024 at 8:54 AM, Stephen Berman
> > > stephen.berman@gmx.net wrote:
> > >
> > > > On Thu, 18 Apr 2024 20:38:44 +0000 Heime heimeborgia@protonmail.com wrote:
> >
> > [...]
> >
> > > > > Suppose I am writing some code at row 1358 and want to check on two functions,
> > > > > one starting at row 355, the other at row 589. I want to go to the 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 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 use
> > > > 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 keybindings
> > > difficult to remember. Perhaps I can make a new easier command that takes
> > > care of the marks for me and help me use the existing emacs commands without
> > > 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
>
>
> I know that C-<SPC> calls the command (set-mark-command ARG)
>
>
> But have no idea of the commands associated with "C-<SPC> C-<SPC>" and with "C-u C-<SPC>". Would like a command I can
>
> 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
move to the named line. What can I do ?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: List line numbers for easy navigation
2024-04-18 23:10 ` Heime
@ 2024-04-19 4:52 ` Yuri Khan
0 siblings, 0 replies; 11+ messages in thread
From: Yuri Khan @ 2024-04-19 4:52 UTC (permalink / raw)
To: Heime; +Cc: Stephen Berman,
Heime via Users list for the GNU Emacs text editor
On Fri, 19 Apr 2024 at 06:11, Heime <heimeborgia@protonmail.com> wrote:
> I would like the ability to name a line and then
> move to the named line. What can I do ?
The words you are looking for are (info "(emacs) Position Registers")
and (info "(emacs) Bookmarks").
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-04-19 4:52 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-18 19:38 List line numbers for easy navigation Heime
2024-04-18 20:14 ` Stephen Berman
2024-04-18 20:23 ` Heime
2024-04-18 20:32 ` Stephen Berman
2024-04-18 20:38 ` Heime
2024-04-18 20:54 ` Stephen Berman
2024-04-18 21:02 ` Heime
2024-04-18 21:16 ` Stephen Berman
2024-04-18 22:06 ` Heime
2024-04-18 23:10 ` Heime
2024-04-19 4:52 ` Yuri Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).