all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Jumping from one position to other position
@ 2020-12-05 18:23 Jean Louis
  2020-12-05 22:11 ` Michael Heerdegen
  2020-12-06  2:12 ` Dmitry Gutov
  0 siblings, 2 replies; 23+ messages in thread
From: Jean Louis @ 2020-12-05 18:23 UTC (permalink / raw)
  To: Help GNU Emacs

All the time I have to jump from one function to other function. What
I used so far is C-SPC C-SPC to leave mark at the point and deactivate
it. Then I can jump to other places and come back with C-u SPC.

What I would like is to keep somehow automatically source position as
new mark, when I do C-u SPC at position X that I jump to position Y,
and then from Y with C-u SPC again back to X.

But Emacs does not work this way.

If anybody have better way of jumping from one place A to place B and
returning again to place A, and again to place B, let me know.




^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Jumping from one position to other position
       [not found] <<courier.000000005FCBD00B.00007ECE@static.rcdrun.com>
@ 2020-12-05 21:29 ` Drew Adams
  2020-12-06  5:24   ` Jean Louis
  0 siblings, 1 reply; 23+ messages in thread
From: Drew Adams @ 2020-12-05 21:29 UTC (permalink / raw)
  To: Jean Louis, Help GNU Emacs

> All the time I have to jump from one function to other function. What
> I used so far is C-SPC C-SPC to leave mark at the point and deactivate
> it. Then I can jump to other places and come back with C-u SPC.
> 
> What I would like is to keep somehow automatically source position as
> new mark, when I do C-u SPC at position X that I jump to position Y,
> and then from Y with C-u SPC again back to X.
> 
> But Emacs does not work this way.
> 
> If anybody have better way of jumping from one place A to place B and
> returning again to place A, and again to place B, let me know.

(`C-SPC') `C-x C-x'  Repeat to move back.
`C-g' do deactivate region.

There are also libraries that give you ways to
browse among the marks, including by choosing
the text surrounding them using completion.
___

Icicles does that, for example, with `C-- C-SPC'.
Completion candidates are the text lines that
include the markers.  (`C-- C-SPC' uses only local
markers, `C-- C-x C-SPC' uses only global markers,
and `C-0 C-SPC' uses all markers).

Because these are multi-commands you can trip among
any number of markers, in any order, during a single
invocation.
___

If you use Isearch+ then you can also have it
set the mark at the start point before searching,
so you can return to it with `C-x C-x' or
`C-u C-SPC'.  You can toggle such mark-setting
anytime during Isearch using `M-s M-SPC'.

(Isearch is often a good way to move around, not
just to search.)
___


https://www.emacswiki.org/emacs/Icicles

https://www.emacswiki.org/emacs/IsearchPlus



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-05 18:23 Jumping from one position to other position Jean Louis
@ 2020-12-05 22:11 ` Michael Heerdegen
  2020-12-05 22:21   ` arthur miller
                     ` (3 more replies)
  2020-12-06  2:12 ` Dmitry Gutov
  1 sibling, 4 replies; 23+ messages in thread
From: Michael Heerdegen @ 2020-12-05 22:11 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis <bugs@gnu.support> writes:

> If anybody have better way of jumping from one place A to place B and
> returning again to place A, and again to place B, let me know.

(1) Most obvious: Use two windows.

(2) Use registers.  I've created "hotkeys" to save and restore 3
positions in 3 registers (I use registers A, B and C for that).  One-key
sequences, of course, should that be.  I chose H-kp-1, C-kp-1,
H-kp-2, ...

(3) A very smart "go to last change" package would ease that pain.  I
once tried to implement something, but finding a good heuristic that
behaves well under different circumstances is surprisingly hard.

(2a) Instead of using registers, you can also use something that jumps
to the old position and stores the new one at the same time with one
command, a "switch between two places" command so to say.  Implementing
something like that is obviously easy.  I already did and am now using
(1) and (2) instead (probably because these are much more general tools,
so I have to remember less).


Regards,

Michael.




^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Jumping from one position to other position
  2020-12-05 22:11 ` Michael Heerdegen
@ 2020-12-05 22:21   ` arthur miller
  2020-12-05 22:54     ` Drew Adams
  2020-12-07  6:50     ` Jean Louis
  2020-12-05 23:38   ` Eric Abrahamsen
                     ` (2 subsequent siblings)
  3 siblings, 2 replies; 23+ messages in thread
From: arthur miller @ 2020-12-05 22:21 UTC (permalink / raw)
  To: Michael Heerdegen, help-gnu-emacs@gnu.org

Would this be useful: to you guys?

https://www.emacswiki.org/emacs/VisibleBookmarks

https://github.com/joodland/bm



-------- Originalmeddelande --------
Från: Michael Heerdegen <michael_heerdegen@web.de>
Datum: 2020-12-05 23:12 (GMT+01:00)
Till: help-gnu-emacs@gnu.org
Ämne: Re: Jumping from one position to other position

Jean Louis <bugs@gnu.support> writes:

> If anybody have better way of jumping from one place A to place B and
> returning again to place A, and again to place B, let me know.

(1) Most obvious: Use two windows.

(2) Use registers.  I've created "hotkeys" to save and restore 3
positions in 3 registers (I use registers A, B and C for that).  One-key
sequences, of course, should that be.  I chose H-kp-1, C-kp-1,
H-kp-2, ...

(3) A very smart "go to last change" package would ease that pain.  I
once tried to implement something, but finding a good heuristic that
behaves well under different circumstances is surprisingly hard.

(2a) Instead of using registers, you can also use something that jumps
to the old position and stores the new one at the same time with one
command, a "switch between two places" command so to say.  Implementing
something like that is obviously easy.  I already did and am now using
(1) and (2) instead (probably because these are much more general tools,
so I have to remember less).


Regards,

Michael.




^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Jumping from one position to other position
  2020-12-05 22:21   ` arthur miller
@ 2020-12-05 22:54     ` Drew Adams
  2020-12-06  0:55       ` arthur miller
  2020-12-07  6:50     ` Jean Louis
  1 sibling, 1 reply; 23+ messages in thread
From: Drew Adams @ 2020-12-05 22:54 UTC (permalink / raw)
  To: arthur miller, Michael Heerdegen, help-gnu-emacs

> Would this be useful: to you guys?
> 
> https://urldefense.com/v3/__https://www.emacswiki.org/emacs/VisibleBook
> marks__;!!GqivPVa7Brio!ODGLJD76Thc3LdYv_ydFjyNk6oCSDgKQgztru60n9HlKf5Mz
> z6au_C1lSKZwcFX4$
> 
> https://urldefense.com/v3/__https://github.com/joodland/bm__;!!GqivPVa7
> Brio!ODGLJD76Thc3LdYv_ydFjyNk6oCSDgKQgztru60n9HlKf5Mzz6au_C1lSAUW4iQP$

FWIW, Bookmark+ has the same ability - even easier.

Yes, you can navigate around using bookmarks.  And
if they're autonamed then you don't need to name
them.  And if they're highlighted you can see where
they are.  And if they're temporary bookmarks you
don't need to worry about them getting saved when
you save bookmarks.

And, like markers, bookmarks move along with the
surrounding text as you edit.



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-05 22:11 ` Michael Heerdegen
  2020-12-05 22:21   ` arthur miller
@ 2020-12-05 23:38   ` Eric Abrahamsen
  2020-12-06  0:12     ` Michael Heerdegen
  2020-12-06  5:41   ` Jean Louis
  2020-12-06  9:13   ` Marcin Borkowski
  3 siblings, 1 reply; 23+ messages in thread
From: Eric Abrahamsen @ 2020-12-05 23:38 UTC (permalink / raw)
  To: help-gnu-emacs

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Jean Louis <bugs@gnu.support> writes:
>
>> If anybody have better way of jumping from one place A to place B and
>> returning again to place A, and again to place B, let me know.
>
> (1) Most obvious: Use two windows.
>
> (2) Use registers.  I've created "hotkeys" to save and restore 3
> positions in 3 registers (I use registers A, B and C for that).  One-key
> sequences, of course, should that be.  I chose H-kp-1, C-kp-1,
> H-kp-2, ...
>
> (3) A very smart "go to last change" package would ease that pain.  I
> once tried to implement something, but finding a good heuristic that
> behaves well under different circumstances is surprisingly hard.

I've often wanted this, and sometimes end up using undo-plus-redo
to get there. It only just occurred to me that `buffer-undo-list' has
all this information -- was that what you used? What difficulties did
you run into?




^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-05 23:38   ` Eric Abrahamsen
@ 2020-12-06  0:12     ` Michael Heerdegen
  2020-12-06  3:42       ` Eric Abrahamsen
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Heerdegen @ 2020-12-06  0:12 UTC (permalink / raw)
  To: help-gnu-emacs

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I've often wanted this, and sometimes end up using undo-plus-redo
> to get there. It only just occurred to me that `buffer-undo-list' has
> all this information -- was that what you used? What difficulties did
> you run into?

Yes, that works, it's perfect data, that's not the problem.

If have typed, say, 4 lines somewhere, you have to call the command a
lot of times until it jumps to some other place.  Not practical (I always
ended up having hit the key one time too often.  Makes you angry).

Then you can say, ok, just go to any line once.  Until you have inserted
something with lots of lines, and it visits most of them. 

Then you try to improve your heuristic further, and there's always a
situation where it is impossible to jump back to some place you want to
because the heuristic sorted it out, e.g. because it's directly next to
some other change or so.  I then used a prefix arg so that the user
could soften the heuristic explicitly, but then I noted that it's
simpler to use registers and other tools that are at least no heuristic
based black boxes.

I've also tried the non-chronological approach - visit changes in
position order - but I also didn't like it.

When I'm looking for older changes, I use Magit Wip mode with Ediff, to
display the changes of the last n minutes.  After exiting Ediff I can
hit a key to go to the line according to the latest selected diff.  For
shorter time periods I use registers now.

Michael.




^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Jumping from one position to other position
  2020-12-05 22:54     ` Drew Adams
@ 2020-12-06  0:55       ` arthur miller
  2020-12-06  2:06         ` Drew Adams
  0 siblings, 1 reply; 23+ messages in thread
From: arthur miller @ 2020-12-06  0:55 UTC (permalink / raw)
  To: Drew Adams, Michael Heerdegen, help-gnu-emacs@gnu.org

Drew, why am I not surprised Bookmark+ does that too? :-)

I am sorry I didn't recommend your library, I had a feeling you will come in and point out Bookmark+ can do it better;  but I actually didn't know if it was applicable in this particular case.

By the way what FWIW stands for? For What I ...?


-------- Originalmeddelande --------
Från: Drew Adams <drew.adams@oracle.com>
Datum: 2020-12-05 23:54 (GMT+01:00)
Till: arthur miller <arthur.miller@live.com>, Michael Heerdegen <michael_heerdegen@web.de>, help-gnu-emacs@gnu.org
Ämne: RE: Jumping from one position to other position

> Would this be useful: to you guys?
>
> https://urldefense.com/v3/__https://www.emacswiki.org/emacs/VisibleBook
> marks__;!!GqivPVa7Brio!ODGLJD76Thc3LdYv_ydFjyNk6oCSDgKQgztru60n9HlKf5Mz
> z6au_C1lSKZwcFX4$
>
> https://urldefense.com/v3/__https://github.com/joodland/bm__;!!GqivPVa7
> Brio!ODGLJD76Thc3LdYv_ydFjyNk6oCSDgKQgztru60n9HlKf5Mzz6au_C1lSAUW4iQP$

FWIW, Bookmark+ has the same ability - even easier.

Yes, you can navigate around using bookmarks.  And
if they're autonamed then you don't need to name
them.  And if they're highlighted you can see where
they are.  And if they're temporary bookmarks you
don't need to worry about them getting saved when
you save bookmarks.

And, like markers, bookmarks move along with the
surrounding text as you edit.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Jumping from one position to other position
  2020-12-06  0:55       ` arthur miller
@ 2020-12-06  2:06         ` Drew Adams
  0 siblings, 0 replies; 23+ messages in thread
From: Drew Adams @ 2020-12-06  2:06 UTC (permalink / raw)
  To: arthur miller, Michael Heerdegen, help-gnu-emacs

To be clear, I don't expect anyone to recommend anything particular. Everything has advantages and disadvantages. And everyone has their use cases and preferences.

 

"FWIW" = "for what it's worth". It' similar to FYI. It has the connotation that it's really up to you (listener, not speaker) to judge how worthwhile you find the info to be.

 

.        https://dictionary.cambridge.org/us/dictionary/english/for-what-it-s-worth

.        https://www.merriam-webster.com/dictionary/for%20what%20it's%20worth

.        https://idioms.thefreedictionary.com/for+what+it%27s+worth

.        https://www.ahdictionary.com/word/search.html?q=for+what+it%27s+worth

 

(Oh, and FWIW ;-), https://en.wikipedia.org/wiki/For_What_It%27s_Worth.)

 

Drew, why am I not surprised Bookmark+ does that too? :-) 

 

I am sorry I didn't recommend your library, I had a feeling you will come in and point out Bookmark+ can do it better;  but I actually didn't know if it was applicable in this particular case.

 

By the way what FWIW stands for? For What I ...?


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-05 18:23 Jumping from one position to other position Jean Louis
  2020-12-05 22:11 ` Michael Heerdegen
@ 2020-12-06  2:12 ` Dmitry Gutov
  1 sibling, 0 replies; 23+ messages in thread
From: Dmitry Gutov @ 2020-12-06  2:12 UTC (permalink / raw)
  To: Jean Louis, Help GNU Emacs

On 05.12.2020 20:23, Jean Louis wrote:
> All the time I have to jump from one function to other function. What
> I used so far is C-SPC C-SPC to leave mark at the point and deactivate
> it. Then I can jump to other places and come back with C-u SPC.
> 
> What I would like is to keep somehow automatically source position as
> new mark, when I do C-u SPC at position X that I jump to position Y,
> and then from Y with C-u SPC again back to X.
> 
> But Emacs does not work this way.
> 
> If anybody have better way of jumping from one place A to place B and
> returning again to place A, and again to place B, let me know.

Sounds like you want something like the back-forward navigation akin to 
what we have in web browsers.

There are several packages that implement this. The one I've been using 
lately is https://github.com/boyw165/history/.



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-06  0:12     ` Michael Heerdegen
@ 2020-12-06  3:42       ` Eric Abrahamsen
  2020-12-06 11:51         ` Stefan Möding
  2020-12-06 23:06         ` Michael Heerdegen
  0 siblings, 2 replies; 23+ messages in thread
From: Eric Abrahamsen @ 2020-12-06  3:42 UTC (permalink / raw)
  To: help-gnu-emacs

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> I've often wanted this, and sometimes end up using undo-plus-redo
>> to get there. It only just occurred to me that `buffer-undo-list' has
>> all this information -- was that what you used? What difficulties did
>> you run into?
>
> Yes, that works, it's perfect data, that's not the problem.
>
> If have typed, say, 4 lines somewhere, you have to call the command a
> lot of times until it jumps to some other place.  Not practical (I always
> ended up having hit the key one time too often.  Makes you angry).
>
> Then you can say, ok, just go to any line once.  Until you have inserted
> something with lots of lines, and it visits most of them. 
>
> Then you try to improve your heuristic further, and there's always a
> situation where it is impossible to jump back to some place you want to
> because the heuristic sorted it out, e.g. because it's directly next to
> some other change or so.  I then used a prefix arg so that the user
> could soften the heuristic explicitly, but then I noted that it's
> simpler to use registers and other tools that are at least no heuristic
> based black boxes.

Wow, that does sound hairy. I've never wanted anything but to go to the
previous change (a command I'm off to implement now using
`buffer-undo-list'), so I expect less frustration.

I also really like your idea of "hotkeys" for a few register positions
-- I love registers and use them as much as I can, but the keybindings
do feel cumbersome.

> I've also tried the non-chronological approach - visit changes in
> position order - but I also didn't like it.
>
> When I'm looking for older changes, I use Magit Wip mode with Ediff, to
> display the changes of the last n minutes.  After exiting Ediff I can
> hit a key to go to the line according to the latest selected diff.  For
> shorter time periods I use registers now.

I assume you've tried undo-tree, too...




^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-05 21:29 ` Drew Adams
@ 2020-12-06  5:24   ` Jean Louis
  2020-12-06 23:25     ` Michael Heerdegen
  0 siblings, 1 reply; 23+ messages in thread
From: Jean Louis @ 2020-12-06  5:24 UTC (permalink / raw)
  To: Drew Adams; +Cc: Help GNU Emacs

* Drew Adams <drew.adams@oracle.com> [2020-12-06 00:30]:
> > All the time I have to jump from one function to other function. What
> > I used so far is C-SPC C-SPC to leave mark at the point and deactivate
> > it. Then I can jump to other places and come back with C-u SPC.
> > 
> > What I would like is to keep somehow automatically source position as
> > new mark, when I do C-u SPC at position X that I jump to position Y,
> > and then from Y with C-u SPC again back to X.
> > 
> > But Emacs does not work this way.
> > 
> > If anybody have better way of jumping from one place A to place B and
> > returning again to place A, and again to place B, let me know.
> 
> (`C-SPC') `C-x C-x'  Repeat to move back.
> `C-g' do deactivate region.

Thank you for references.

In some programming cases M-, and M-. can bring me to referenced or
referencing functions. It helps but is not same.

I think maybe to maybe function for a key to remember the current
marker and jump to last marker, then again same key to remember that
other marker and jump to last remembered.

It should be one key like s-m or similar, definitely not two or
combinations of too many keys. F5 would serve me better than current:
C-SPC C-SPC followed by C-u SPC that is not really doing what I mean
but is helpfull.

> There are also libraries that give you ways to
> browse among the marks, including by choosing
> the text surrounding them using completion.

Small stuff is better kept in one's own configuration then relying on
libraries. Then on each Emacs installation I would need to either
remember which is external library or make sure it is installed PLUS
using my own configuration. It is double action which I always try to
prevent.

(info "(emacs) Mark Ring") says:

,----
|    To return to a marked position, use ‘set-mark-command’ with a prefix
| argument: ‘C-u C-<SPC>’.  This moves point to where the mark was, and
| deactivates the mark if it was active.  Each subsequent ‘C-u C-<SPC>’
| jumps to a prior position stored in the mark ring.  The positions you
| move through in this way are not lost; they go to the end of the ring.
`----

Just that I am not satisfied with it. It does not bring me back how I
mean. I am using this for years.

But maybe this can help:

,----
|    The variable ‘mark-ring-max’ specifies the maximum number of entries
| to keep in the mark ring.  This defaults to 16 entries.  If that many
| entries exist and another one is pushed, the earliest one in the list is
| discarded.  Repeating ‘C-u C-<SPC>’ cycles through the positions
| currently in the ring.
`----

Because if I specify `mark-ring-max' to be 2 then maybe this is what I
need. So I will test this feature while programming. Majority of times
I jump back I do not want to jump to previous 3rd or 4th position but
just to previous position and back.

Useful logical jumping would be for me:

1 2 3 4 5 6 7 8 7 8 7 8 7 8
                ~~~~~~~~~~~
		this is where mode of jumping changes

then one could maybe decide to go back to mode to reach again 1-6
positions.




^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-05 22:11 ` Michael Heerdegen
  2020-12-05 22:21   ` arthur miller
  2020-12-05 23:38   ` Eric Abrahamsen
@ 2020-12-06  5:41   ` Jean Louis
  2020-12-06 23:11     ` Michael Heerdegen
  2020-12-06  9:13   ` Marcin Borkowski
  3 siblings, 1 reply; 23+ messages in thread
From: Jean Louis @ 2020-12-06  5:41 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

* Michael Heerdegen <michael_heerdegen@web.de> [2020-12-06 01:12]:
> Jean Louis <bugs@gnu.support> writes:
> 
> > If anybody have better way of jumping from one place A to place B and
> > returning again to place A, and again to place B, let me know.
> 
> (1) Most obvious: Use two windows.
> 
> (2) Use registers.  I've created "hotkeys" to save and restore 3
> positions in 3 registers (I use registers A, B and C for that).  One-key
> sequences, of course, should that be.  I chose H-kp-1, C-kp-1,
> H-kp-2, ...
> 
> (3) A very smart "go to last change" package would ease that pain.  I
> once tried to implement something, but finding a good heuristic that
> behaves well under different circumstances is surprisingly hard.

Maybe I just do not know how to use built-in functions like C-SPC
C-SPC to leave mark, I use it all the time, but maybe I miss
something.





^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-05 22:11 ` Michael Heerdegen
                     ` (2 preceding siblings ...)
  2020-12-06  5:41   ` Jean Louis
@ 2020-12-06  9:13   ` Marcin Borkowski
  3 siblings, 0 replies; 23+ messages in thread
From: Marcin Borkowski @ 2020-12-06  9:13 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs


On 2020-12-05, at 23:11, Michael Heerdegen <michael_heerdegen@web.de> wrote:

> Jean Louis <bugs@gnu.support> writes:
>
>> If anybody have better way of jumping from one place A to place B and
>> returning again to place A, and again to place B, let me know.

> (2) Use registers.  I've created "hotkeys" to save and restore 3

This.  Also, avy.

Hth,

-- 
Marcin Borkowski
http://mbork.pl



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-06  3:42       ` Eric Abrahamsen
@ 2020-12-06 11:51         ` Stefan Möding
  2020-12-06 18:15           ` Eric Abrahamsen
  2020-12-06 23:06         ` Michael Heerdegen
  1 sibling, 1 reply; 23+ messages in thread
From: Stefan Möding @ 2020-12-06 11:51 UTC (permalink / raw)
  To: help-gnu-emacs

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Wow, that does sound hairy. I've never wanted anything but to go to the
> previous change (a command I'm off to implement now using
> `buffer-undo-list'), so I expect less frustration.

I’ve used the "goto-chg" package (it’s on MELPA) occasionally. There is
also an entry on the Emacs Wiki concerning this topic:

https://www.emacswiki.org/emacs/GotoChg

-- 
Stefan



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-06 11:51         ` Stefan Möding
@ 2020-12-06 18:15           ` Eric Abrahamsen
  2020-12-06 23:07             ` Michael Heerdegen
  0 siblings, 1 reply; 23+ messages in thread
From: Eric Abrahamsen @ 2020-12-06 18:15 UTC (permalink / raw)
  To: Stefan Möding; +Cc: help-gnu-emacs

Stefan Möding <s.moeding@gmail.com> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Wow, that does sound hairy. I've never wanted anything but to go to the
>> previous change (a command I'm off to implement now using
>> `buffer-undo-list'), so I expect less frustration.
>
> I’ve used the "goto-chg" package (it’s on MELPA) occasionally. There is
> also an entry on the Emacs Wiki concerning this topic:
>
> https://www.emacswiki.org/emacs/GotoChg

There's nothing you can think of doing with Emacs that doesn't already
have a package for doing it :) That's really an amazing amount of code,
though.



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-06  3:42       ` Eric Abrahamsen
  2020-12-06 11:51         ` Stefan Möding
@ 2020-12-06 23:06         ` Michael Heerdegen
  1 sibling, 0 replies; 23+ messages in thread
From: Michael Heerdegen @ 2020-12-06 23:06 UTC (permalink / raw)
  To: help-gnu-emacs

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I assume you've tried undo-tree, too...

I like it and use it and also hacked it a bit.  Too bad the author had
not much time recently.

It's a bit hard to hack it.  For example, the time stamps of the
entries.  They get updated whenever you only look at the according
entry.  Sooner or later it gets a mess.  It's hard to change things like
that.  I think there is room for improving the user interface.

Regards,

Michael.




^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-06 18:15           ` Eric Abrahamsen
@ 2020-12-06 23:07             ` Michael Heerdegen
  0 siblings, 0 replies; 23+ messages in thread
From: Michael Heerdegen @ 2020-12-06 23:07 UTC (permalink / raw)
  To: help-gnu-emacs

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> > https://www.emacswiki.org/emacs/GotoChg
>
> There's nothing you can think of doing with Emacs that doesn't already
> have a package for doing it :) That's really an amazing amount of code,
> though.

Yeah, that was also my first step, before I tried to make something
better (and failed).

It's probably exactly what you were looking for.

Regards,

Michael.




^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-06  5:41   ` Jean Louis
@ 2020-12-06 23:11     ` Michael Heerdegen
  0 siblings, 0 replies; 23+ messages in thread
From: Michael Heerdegen @ 2020-12-06 23:11 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis <bugs@gnu.support> writes:

> Maybe I just do not know how to use built-in functions like C-SPC
> C-SPC to leave mark, I use it all the time, but maybe I miss
> something.

What do you do when you need the mark for, well, marking, because you
need to copy and paste between the two positions?

Using the mark reminds me of the more general concept of the
global-mark-ring, with a bit of tuning one can also use it to find back
to recent positions conveniently, even across buffers.

Regards,

Michael.




^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-06  5:24   ` Jean Louis
@ 2020-12-06 23:25     ` Michael Heerdegen
  0 siblings, 0 replies; 23+ messages in thread
From: Michael Heerdegen @ 2020-12-06 23:25 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis <bugs@gnu.support> writes:

> Because if I specify `mark-ring-max' to be 2 then maybe this is what I
> need.

I had tried to use a similar setup.  I then got crazy when I needed to
jump between more than 2 positions.  That happens more often than you
might expect.  And then you have no tool to rely on again.

That's why I now prefer the register solution: still one key, or two,
but not as limited.

Michael.




^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-05 22:21   ` arthur miller
  2020-12-05 22:54     ` Drew Adams
@ 2020-12-07  6:50     ` Jean Louis
  2020-12-07 19:41       ` Arthur Miller
  1 sibling, 1 reply; 23+ messages in thread
From: Jean Louis @ 2020-12-07  6:50 UTC (permalink / raw)
  To: arthur miller; +Cc: Michael Heerdegen, help-gnu-emacs@gnu.org

* arthur miller <arthur.miller@live.com> [2020-12-06 01:22]:
> Would this be useful: to you guys?
> 
> https://www.emacswiki.org/emacs/VisibleBookmarks
> 
> https://github.com/joodland/bm

That is great solution! That is exactly how it should be that user can
also visually see a point and quickly go back and forth.




^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-07  6:50     ` Jean Louis
@ 2020-12-07 19:41       ` Arthur Miller
  2020-12-07 20:26         ` Jean Louis
  0 siblings, 1 reply; 23+ messages in thread
From: Arthur Miller @ 2020-12-07 19:41 UTC (permalink / raw)
  To: Jean Louis; +Cc: Michael Heerdegen, help-gnu-emacs@gnu.org

Jean Louis <bugs@gnu.support> writes:

> * arthur miller <arthur.miller@live.com> [2020-12-06 01:22]:
>> Would this be useful: to you guys?
>> 
>> https://www.emacswiki.org/emacs/VisibleBookmarks
>> 
>> https://github.com/joodland/bm
>
> That is great solution! That is exactly how it should be that user can
> also visually see a point and quickly go back and forth.
Cool, glad it suits you.

Consider checking Drew's Bookmark+ too. It does lot's of things, some of
which you might find useful! :-).



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Jumping from one position to other position
  2020-12-07 19:41       ` Arthur Miller
@ 2020-12-07 20:26         ` Jean Louis
  0 siblings, 0 replies; 23+ messages in thread
From: Jean Louis @ 2020-12-07 20:26 UTC (permalink / raw)
  To: Arthur Miller; +Cc: Michael Heerdegen, help-gnu-emacs@gnu.org

* Arthur Miller <arthur.miller@live.com> [2020-12-07 22:42]:
> Jean Louis <bugs@gnu.support> writes:
> 
> > * arthur miller <arthur.miller@live.com> [2020-12-06 01:22]:
> >> Would this be useful: to you guys?
> >> 
> >> https://www.emacswiki.org/emacs/VisibleBookmarks
> >> 
> >> https://github.com/joodland/bm
> >
> > That is great solution! That is exactly how it should be that user can
> > also visually see a point and quickly go back and forth.
> Cool, glad it suits you.
> 
> Consider checking Drew's Bookmark+ too. It does lot's of things, some of
> which you might find useful! :-).

I have it and just not currently using it.

The bm package I can maybe now use with Hyper key on Caps_Lock and I
get Caps Lock with shift Caps Lock.

For example I could then bind H-q to go back H-a to go forward or
maybe better H-a and H-s as it is maybe easier accessible.

clear      lock 
clear   control
clear      mod1
clear      mod2
clear      mod3
clear      mod4
clear      mod5
keycode      66 = Hyper_L Caps_Lock
keycode	    108 = Alt_R
add     control = Control_L Control_R
add        mod1 = Alt_L Alt_R Meta_L
add        mod2 = Num_Lock
add        mod3 = Hyper_L
add        mod4 = Super_L Super_R
add        mod5 = Mode_switch ISO_Level3_Shift




^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2020-12-07 20:26 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-05 18:23 Jumping from one position to other position Jean Louis
2020-12-05 22:11 ` Michael Heerdegen
2020-12-05 22:21   ` arthur miller
2020-12-05 22:54     ` Drew Adams
2020-12-06  0:55       ` arthur miller
2020-12-06  2:06         ` Drew Adams
2020-12-07  6:50     ` Jean Louis
2020-12-07 19:41       ` Arthur Miller
2020-12-07 20:26         ` Jean Louis
2020-12-05 23:38   ` Eric Abrahamsen
2020-12-06  0:12     ` Michael Heerdegen
2020-12-06  3:42       ` Eric Abrahamsen
2020-12-06 11:51         ` Stefan Möding
2020-12-06 18:15           ` Eric Abrahamsen
2020-12-06 23:07             ` Michael Heerdegen
2020-12-06 23:06         ` Michael Heerdegen
2020-12-06  5:41   ` Jean Louis
2020-12-06 23:11     ` Michael Heerdegen
2020-12-06  9:13   ` Marcin Borkowski
2020-12-06  2:12 ` Dmitry Gutov
     [not found] <<courier.000000005FCBD00B.00007ECE@static.rcdrun.com>
2020-12-05 21:29 ` Drew Adams
2020-12-06  5:24   ` Jean Louis
2020-12-06 23:25     ` Michael Heerdegen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.