I’ve really gotten into using tabs in Emacs 28.2. I’ve also been checking out Helm more thoroughly. Although Helm has the feature `helm-filtered-bookmarks` (which is great for me), but when hitting the <tab> key, there are options for opening the bookmarked file in the current buffer, a buffer in a different window, and buffer in a different frame. I thought I’d dig a little to see if I could figure out how to add the ability to open a bookmark in a new tab.
**NOTE: I’m just a hobbiest programmer.**
I copied `bookmark-jump-other-buffer` and `helm-bookmark-jump-other-buffer` and modified them. I also used `customize-option` to add the line `("Jump to BM other tab" . my/helm-bookmark-jump-other-tab)` to `helm-type-bookmark-actions`.
(require 'tab-bar)
(require 'helm)
(defun my/bookmark-jump-other-tab (bookmark)
"Jump to BOOKMARK in another tab. See `bookmark-jump' for more."
(interactive
(list (bookmark-completing-read "Jump to bookmark (in another tab)"
bookmark-current-bookmark)))
(bookmark-jump bookmark 'switch-to-buffer-other-tab))
(defun my/helm-bookmark-jump-other-tab (candidate)
"Jump to bookmark in other tab action."
(let (non-essential)
(my/bookmark-jump-other-tab candidate)))
I don’t know if the first `require` statement is necessary, given that `tab-bar` is part of GNU Emacs, but I added it just in case. The code seems to be working, but if there’s anything I’ve missed, I would be grateful for input. Also I was wondering if this is something that I should send along to the Helm author for the sake of completeness.