So I generally have 3 buffers open in Emacs.
How do I disable this third buffer such that when I press C-x o I am only switching between buffer 1 and buffer 2? Currently, I switch between buffer 1, then buffer 2, then buffer 3, then buffer 1, etc. To be specific, I want C-x o to only switch between buffer 1 and 2.
Thank you.
Opens a new window in incognito mode. Ctrl+Shift+N. Opens a file from your computer in Google Chrome. PressCtrl+O, then select file. Opens the link in a new tab in the background.
Ctrl-Shift-SSave current data under a different name. The file name associated with the data changes to the new name.
A general solution to this (can look) something like the following:
(defvar ignore-windows-containing-buffers-matching-res '("\\*Help")
"List of regular expressions specifying windows to skip (if window contains buffer that matches, skip)")
(defadvice other-window (before other-window-ignore-windows-containing activate)
"skip over windows containing buffers which match regular expressions in 'ignore-windows-containing-buffers-matching-res"
(if (and (= 1 (ad-get-arg 0)) (interactive-p))
(let* ((win (next-window))
(bname (buffer-name (window-buffer win))))
(when (some 'identity (mapcar '(lambda (re)
(string-match re bname))
ignore-windows-containing-buffers-matching-res))
(ad-set-arg 0 2)))))
Customize the variable to be a regular expression matching the buffer names you want to skip.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With