Created
June 15, 2016 16:06
-
-
Save HeinrichHartmann/c4401ff0347cea975380e221c7e24f42 to your computer and use it in GitHub Desktop.
Pin an buffer to a window in #emacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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