Suvayu Ali <fatkasuvayu+li...@gmail.com> wrote:
> On Thu, May 21, 2015 at 11:41:07AM -0400, Kyle Meyer wrote:
[...]
>> 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
>
> I think this (writing your own defun) is the cleanest way to handle
> this.  There is no way for Org to ensure a consistent behaviour for all
> possible link types, there are too many.

Yes, I agree.  It wasn't clear in my original message, but by "cleaner
ways", I was referring to the implementation of
org-notmuch-follow-link-other-window.  I don't know if there's a better
way to override switch-to-buffer.

-- 
Kyle

Reply via email to