Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Pin an buffer to a window in #emacs
;; Similar to: http://stackoverflow.com/questions/43765/pin-emacs-buffers-to-windows-for-cscope/65992#65992
(defun pin-buffer ()
"Pin buffer to current window."
(interactive)
(message
(if (let (window (get-buffer-window (current-buffer)))
(set-window-dedicated-p window (not (window-dedicated-p window))))
"pinned buffer" "un-pinned buffer")
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment