Skip to main content
added 9 characters in body
Source Link
Drew
  • 80.9k
  • 10
  • 125
  • 265

I can make a buffer dedicated to a frame using the following snippet I got from other posts

(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))) (global-set-key (kbd "C-c d") 'toggle-window-dedicated) 

Now from from another frame if I want to switch to the dedicated buffer then a copy of the buffer is opened. This is not the behavior I want. I want the focus to switch to the dedicated frame. The solution posted here : switch-to-buffer does not work.

I can make a buffer dedicated to a frame using the following snippet I got from other posts

(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))) (global-set-key (kbd "C-c d") 'toggle-window-dedicated) 

Now from from another frame if I want to switch to the dedicated buffer then a copy of the buffer is opened. This is not the behavior I want. I want the focus to switch to the dedicated frame. The solution posted here : switch-to-buffer does not work.

I can make a buffer dedicated to a frame using the following snippet I got from other posts

(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))) (global-set-key (kbd "C-c d") 'toggle-window-dedicated) 

Now from from another frame if I want to switch to the dedicated buffer then a copy of the buffer is opened. This is not the behavior I want. I want the focus to switch to the dedicated frame. The solution posted here : switch-to-buffer does not work.

Source Link

switch to dedicated window instead of duplicating the buffer

I can make a buffer dedicated to a frame using the following snippet I got from other posts

(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))) (global-set-key (kbd "C-c d") 'toggle-window-dedicated) 

Now from from another frame if I want to switch to the dedicated buffer then a copy of the buffer is opened. This is not the behavior I want. I want the focus to switch to the dedicated frame. The solution posted here : switch-to-buffer does not work.