From: Juri Linkov <juri@linkov.net>
To: 52417@debbugs.gnu.org
Cc: laszlomail@protonmail.com, mardani29@yahoo.es
Subject: bug#52417: Mark ring navigation could be two-way
Date: Sat, 11 Dec 2021 20:34:31 +0200 [thread overview]
Message-ID: <86mtl7ovp4.fsf@mail.linkov.net> (raw)
In-Reply-To: <m1wnkbkuya.fsf@yahoo.es> ("Daniel Martín via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\""'s message of "Sat, 11 Dec 2021 16:44:13 +0100")
>> Other tools has similar features like the mark ring and they
>> provide two-way navigation, so you can go back to some previous
>> position to check something, and then you can go forward in the
>> ring to get back to a more recent position or the latest position
>> if you want.
>>
>> Emacs could have this too by providing a command which allows
>> moving forward in the mark ring.
>
> +1. I agree that this is a useful feature that would improve the text
> editing capabilities of Emacs. In Vim, you can use C-i and C-o to
> navigate forwards and backwards, respectively.
>
> A similar thing happens with the kill-ring. M-y moves the last-yank
> pointer in one direction, but there could be a command to move it in the
> opposite direction. Even if the mark and kill ring cycle, it is
> inconvenient to browse them in one direction only, because as modern
> computers have more memory available, the rings can store more things.
>
> This is probably one of the reasons why there are a lot of external
> packages that let you browse the contents of the mark-ring and kill-ring
> in the minibuffer or a separate buffer.
After enabling repeat-mode, this browses the kill-ring with
'M-y up down up down ...'
(defvar yank-pop-repeat-map
(let ((map (make-sparse-keymap)))
(define-key map "\M-y" 'yank-pop)
(define-key map [up] 'yank-pop)
(define-key map [down] (lambda ()
(interactive)
(setq repeat-map 'yank-pop-repeat-map)
(yank-pop -1)))
map)
"Keymap to repeat `yank-pop' key sequences. Used in `repeat-mode'.")
(put 'yank-pop 'repeat-map 'yank-pop-repeat-map)
The same can be created for the mark-ring.
next prev parent reply other threads:[~2021-12-11 18:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 21:20 bug#52417: Mark ring navigation could be two-way ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-11 15:44 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-11 18:34 ` Juri Linkov [this message]
2021-12-11 20:11 ` André A. Gomes
2021-12-13 1:17 ` Dmitry Gutov
2021-12-13 8:44 ` Juri Linkov
2021-12-13 15:09 ` bug#52417: [External] : " Drew Adams
2021-12-13 15:15 ` Dmitry Gutov
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=86mtl7ovp4.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=52417@debbugs.gnu.org \
--cc=laszlomail@protonmail.com \
--cc=mardani29@yahoo.es \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).