From 711175587fe8022dbaae300916006fdfe74ca442 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Wed, 13 Dec 2023 14:27:54 +0800 Subject: bookmark: jump to bookmark in a new tab * bookmark-conf.el (durand-jump-bookmark-new-tab, tab-prefix-map): Jump to bookmark in a new tab. --- bookmark-conf.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bookmark-conf.el') diff --git a/bookmark-conf.el b/bookmark-conf.el index eddb3d5..04973ba 100644 --- a/bookmark-conf.el +++ b/bookmark-conf.el @@ -473,5 +473,18 @@ Below are listed three possible scenarios: (define-key ctl-x-r-map (vector ?s) #'durand-save-bookmark-or-desktop) +;;; Jump to bookmark in a new tab + +(defun durand-jump-bookmark-new-tab (bookmark) + "Jump to BOOKMARK similar to `bookmark-jump'. +But this always opens the bookmark in a new tab." + (interactive + (list (bookmark-completing-read "Jump to bookmark" + bookmark-current-bookmark))) + (bookmark-jump bookmark #'switch-to-buffer-other-tab)) + +(define-key tab-prefix-map (vector ?B) + #'durand-jump-bookmark-new-tab) + (provide 'bookmark-conf) ;;; bookmark-conf.el ends here -- cgit v1.2.3-18-g5258