Gregor Zattler <[email protected]> wrote:
> Dear org-moders,
>
> I want to open-link-at-point (C-c C-o) in other window. With
> file links this is standard behaviour (at least with my
> configuration). But I don’t know how to do so with notmuch:
> links. Universal argument won’t help.
>
> Any ideas?
org-notmuch-follow-link calls notmuch-show, which uses switch-to-buffer.
You can set org-notmuch-open-function to a function that behaves the way
you want. There are probably cleaner ways to handle this, but below
seems to work.
#+begin_src elisp
(setq org-notmuch-open-function 'org-notmuch-follow-link-other-window)
(defun org-notmuch-follow-link-other-window (search)
"Like `org-notmuch-follow-link', but use other window."
(pop-to-buffer (save-window-excursion
(notmuch-show (org-link-unescape search)))))
#+end_src
--
Kyle