From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#52417: Mark ring navigation could be two-way Date: Sat, 11 Dec 2021 20:34:31 +0200 Organization: LINKOV.NET Message-ID: <86mtl7ovp4.fsf@mail.linkov.net> References: <-j5gTcLQGFew-tw_ci6TkJS4FRkRAci7rQ_Blw_-TN1RWE9pvew0hgL9b78KA4pBSbBO7bVAGGslf5ilY8JbalPxdpPibWBkQ4oqm0hCOfo=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26444"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: laszlomail@protonmail.com, mardani29@yahoo.es To: 52417@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 11 19:53:46 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mw7VC-0006kF-Ci for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Dec 2021 19:53:46 +0100 Original-Received: from localhost ([::1]:47040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mw7VA-0008Qg-KF for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Dec 2021 13:53:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mw7UV-0008Ko-QM for bug-gnu-emacs@gnu.org; Sat, 11 Dec 2021 13:53:35 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38442) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mw7UV-0008IE-I1 for bug-gnu-emacs@gnu.org; Sat, 11 Dec 2021 13:53:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mw7UV-00072H-GW for bug-gnu-emacs@gnu.org; Sat, 11 Dec 2021 13:53:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Dec 2021 18:53:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52417 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Daniel =?UTF-8?Q?Mart=C3=ADn?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: 52417@debbugs.gnu.org, laszlomail@protonmail.com, Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-Received: via spool by 52417-submit@debbugs.gnu.org id=B52417.163924873626938 (code B ref 52417); Sat, 11 Dec 2021 18:53:03 +0000 Original-Received: (at 52417) by debbugs.gnu.org; 11 Dec 2021 18:52:16 +0000 Original-Received: from localhost ([127.0.0.1]:49979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mw7Tk-00070L-3y for submit@debbugs.gnu.org; Sat, 11 Dec 2021 13:52:16 -0500 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:52341) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mw7Tg-0006zt-0M for 52417@debbugs.gnu.org; Sat, 11 Dec 2021 13:52:14 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 316B224000A; Sat, 11 Dec 2021 18:52:03 +0000 (UTC) In-Reply-To: ("Daniel =?UTF-8?Q?Mart=C3=ADn?= via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\""'s message of "Sat, 11 Dec 2021 16:44:13 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:222137 Archived-At: >> 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.