unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Jumping from one position to other position
Date: Sun, 06 Dec 2020 01:12:07 +0100	[thread overview]
Message-ID: <871rg3iyi0.fsf@web.de> (raw)
In-Reply-To: 87mtyrombe.fsf@ericabrahamsen.net

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.




  reply	other threads:[~2020-12-06  0:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871rg3iyi0.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).