Commit a85255106060
Changed files (1)
dots
.config
emacs
dots/.config/emacs/init.el
@@ -1771,7 +1771,8 @@ minibuffer, even without explicitly focusing it."
("C-<right>" . org-shiftright)
("C-<up>" . org-shiftup)
("C-<down>" . org-shiftdown)
- ("C-c e" . vde/org-eisenhower-set-tags))
+ ("C-c e" . vde/org-eisenhower-set-tags)
+ ("C-c C-S-o" . vde/org-open-at-point-in-new-tab))
:config
;; Unbind C-, to allow embark-act to work
(unbind-key "C-," org-mode-map)
@@ -1789,6 +1790,15 @@ minibuffer, even without explicitly focusing it."
(unbind-key "C-S-<up>" org-mode-map)
(unbind-key "C-S-<down>" org-mode-map)
+ (defun vde/org-open-at-point-in-new-tab ()
+ "Open org link at point in a new tab-bar tab.
+Works with any org link type. Creates a new tab, then opens the link."
+ (interactive)
+ (let ((link-info (org-element-context)))
+ (when (eq (org-element-type link-info) 'link)
+ (tab-bar-new-tab)
+ (org-open-at-point))))
+
(declare-function org-before-first-heading-p "org")
(declare-function org-get-repeat "org")
(defun my/org-agenda-repeater ()
@@ -2590,6 +2600,19 @@ show recent activity."
(add-hook 'mu4e-search-bookmark-hook #'vde/mu4e-set-sort-order-by-bookmark)
+ ;; Open mu4e links in a new tab
+ ;; This overrides the default mu4e link handler to open in tab-bar
+ (defun vde/mu4e-org-open-in-new-tab (link)
+ "Open mu4e LINK in a new tab-bar tab.
+LINK is the part after 'mu4e:' in the org link."
+ (tab-bar-new-tab)
+ (require 'mu4e-org)
+ (mu4e-org-open link))
+
+ (with-eval-after-load 'ol
+ (org-link-set-parameters "mu4e"
+ :follow #'vde/mu4e-org-open-in-new-tab))
+
;; imapfilter integration
(defun vde/mu4e-imapfilter-add-rule ()
"Add an imapfilter rule from the current email message.