[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Jumping from one position to other position
From: |
Eric Abrahamsen |
Subject: |
Re: Jumping from one position to other position |
Date: |
Sat, 05 Dec 2020 19:42:42 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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...
- Re: Jumping from one position to other position, (continued)
Re: Jumping from one position to other position, Eric Abrahamsen, 2020/12/05
Re: Jumping from one position to other position, Michael Heerdegen, 2020/12/06
Re: Jumping from one position to other position, Jean Louis, 2020/12/06
Re: Jumping from one position to other position, Marcin Borkowski, 2020/12/06
Re: Jumping from one position to other position, Dmitry Gutov, 2020/12/05