all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
Cc: "Daniel Martín" <mardani29@yahoo.es>,
	"andrés ramírez" <rrandresf@hotmail.com>,
	"Eli Zaretskii" <eliz@gnu.org>,
	emacs-devel@gnu.org
Subject: Re: A feature to go to last edit locations
Date: Mon, 13 Feb 2023 09:50:51 +0200	[thread overview]
Message-ID: <86r0uuf0zt.fsf@mail.linkov.net> (raw)
In-Reply-To: <874jrqmo4m.fsf@web.de> (Arne Babenhauserheide's message of "Mon,  13 Feb 2023 00:54:16 +0100")

>> Daniel Martín <mardani29@yahoo.es> writes:
>> I see that Evil uses the NonGNU ELPA package goto-chg
>> (https://elpa.nongnu.org/nongnu/goto-chg.html) to implement that
>> functionality.
>
> I use that package outside Evil all the time. Any mode that clobbers the
> shortcut I assigned to it (C-.) blocks my productivity a lot. That’s the
> main reason why I don’t have flyspell active while writing emails.

You can unbind this key:

```
(with-eval-after-load 'flyspell
  (keymap-unset flyspell-mode-map "C-."))
```

> It only works inside buffers, but with ido for changing buffers and
> dumb-jump/xref support for jumping back after cross-file navigation, I
> don’t need more. This jumping back after an explicit cross-file
> navigation command is actually closer to what I need than what intellij
> offers. I don’t want to go back to the buffer I selected via
> switch-buffer, but if "find reference" takes me to another file, I need
> a way to jump back.

Something like this will get the most recently used buffer with undo,
then the logic from goto-chg can navigate to the last undo entry:

```
(seq-sort (lambda (b1 b2)
            (time-less-p
             (with-current-buffer b2 buffer-display-time)
             (with-current-buffer b1 buffer-display-time)))
          (seq-remove (lambda (b)
                        (with-current-buffer b
                          (or (not buffer-undo-list)
                              (eq buffer-undo-list t)
                              buffer-read-only
                              (not buffer-display-time)
                              (string-match-p "\\` " (buffer-name b)))))
                      (buffer-list)))
```



  reply	other threads:[~2023-02-13  7:50 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m1fsbakchr.fsf.ref@yahoo.es>
2023-02-12 17:41 ` A feature to go to last edit locations Daniel Martín
2023-02-12 17:52   ` Eli Zaretskii
2023-02-12 18:59     ` Daniel Martín
2023-02-12 19:26       ` Eli Zaretskii
2023-02-12 19:42         ` andrés ramírez
2023-02-12 22:19           ` Daniel Martín
2023-02-12 23:54             ` Dr. Arne Babenhauserheide
2023-02-13  7:50               ` Juri Linkov [this message]
2023-02-12 21:40         ` [External] : " Drew Adams
2023-02-13 20:28           ` Jean Louis
2023-02-12 18:07   ` Dmitry Gutov
2023-02-12 18:50     ` Daniel Martín
2023-02-12 18:52       ` Dmitry Gutov
2023-02-12 19:23         ` Daniel Martín
2023-02-13 19:28         ` Jean Louis
2023-02-13 19:24     ` Jean Louis
2023-02-13 19:41       ` Dmitry Gutov
2023-02-13 20:22         ` Dr. Arne Babenhauserheide
2023-02-13 20:56         ` Jean Louis
2023-02-14  3:25         ` Eli Zaretskii
2023-02-14  4:36           ` [External] : " Drew Adams
2023-02-14  4:56             ` Drew Adams
2023-02-14  5:53               ` Jean Louis
2023-02-14 16:24                 ` Drew Adams
2023-02-15  5:45                   ` Jean Louis
2023-02-15 16:34                     ` Drew Adams
2023-02-16  8:17                       ` On Bookmarks+ package Jean Louis
2023-02-16 17:38                         ` [External] : " Drew Adams
2023-02-14 20:08           ` A feature to go to last edit locations Dmitry Gutov
2023-02-13 19:48       ` [External] : " Drew Adams
2023-02-13 20:28         ` Dr. Arne Babenhauserheide
2023-02-13 21:17           ` Drew Adams
2023-02-13 21:21           ` Jean Louis
2023-02-13 21:14         ` Jean Louis
2023-02-14  5:21           ` Drew Adams
2023-02-13 19:49   ` Michael Welsh Duggan
2023-02-13 21:35     ` Jean Louis
2023-02-13 23:14     ` Konstantin Kharlamov
2023-02-14  0:00     ` Ergus
2023-02-14  6:29       ` Dr. Arne Babenhauserheide
2023-02-15  0:00         ` Karthik Chikmagalur

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

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

  git send-email \
    --in-reply-to=86r0uuf0zt.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=arne_bab@web.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mardani29@yahoo.es \
    --cc=rrandresf@hotmail.com \
    /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.
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.