emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add repeat-map for navigation commands


From: Ihor Radchenko
Subject: Re: [PATCH] Add repeat-map for navigation commands
Date: Sun, 15 Sep 2024 12:54:13 +0000

Karthik Chikmagalur <karthikchikmagalur@gmail.com> writes:

> Do you think it makes sense to add repeat-maps for other next/previous
> commands in Org, such as org-next-link and org-previous-link?  I've been
> using this for a while (they don't use defvar-keymap as I wrote them a
> while ago):
>
> (defvar org-link-navigation-repeat-map
>   (let ((map (make-sparse-keymap)))
>     (define-key map (kbd "n") #'org-next-link)
>     (define-key map (kbd "p") #'org-previous-link)
>     (define-key map (kbd "v") #'org-link-preview) ;toggle preview for link at 
> point
>     map))
>
> (map-keymap
>  (lambda (_ cmd)
>    (put cmd 'repeat-map 'org-link-navigation-repeat-map))
>  org-link-navigation-repeat-map)

Looks reasonable, yes.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]