rougier / mu4e-dashboard

A dashboard for mu4e (mu for emacs)
GNU General Public License v3.0
467 stars 43 forks source link

guarantee opening link in other window? #36

Open titaniumbones opened 2 years ago

titaniumbones commented 2 years ago

I'm trying to figure out if there's a way to be sure an mu link always opens in other-window (I'm using the side-dashboard). For me, by default links always seem to open in the dashboard window (perhaps there's something wrong with my org-link config, I don't know). By changing all instances of switch-to-buffer in window-excursion to switch-to-buffer-other-window, I can fix that for most cases. However, if mu4e has not yet started and there's no *mu4e-headers* buffer, the link will again open in the dashboard. Any suggestions on how I might fix that? It seems a bit tricky to open another window without an existing buffer, and the mu4e buffers don't exist until mu4e is called for the first time. Thanks!

ghost commented 2 years ago

Hello I am using side-dashboard and mu links are opened in another buffer, I would like to have the side-dashboard and links in the same buffer like

dashboard-2

my side-dashboard looks like 2021-11-29-131525_2560x1440_scrot

titaniumbones commented 2 years ago

I'm a little uncertain whether we have the same issue or are looking for the same thing, but I've left a comment in #15 because I think this issue may be a duplicate. It might help you, @wereket .

rougier commented 2 years ago

I'm actually using the dedicated window flag on the dashboard:

(defun toggle-window-dedicated ()
  "Toggle whether the current active window is dedicated or not"
  (interactive)
  (message
   (if (let (window (get-buffer-window (current-buffer)))
     (set-window-dedicated-p window (not (window-dedicated-p window))))
       "Window '%s' is dedicated"
     "Window '%s' is normal")
   (current-buffer)))