Skip to content

grafov/pin-buffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📍 pin-buffer for GNU/Emacs

When you switch a buffer in GNU/Emacs it could reuse any of opened windows to place new buffer content. Sometimes this behavior is annoying. The extension just pins buffer to current window in GNU/Emacs. It will omited during switching buffers and not used for popups until you unpin it (or close it).

  • toggles buffer state between dedicated/normal
  • displays 📌 in modeline for dedicated mode
  • it's all

example

Install with straight

(use-package pin-buffer
  :bind ("<f11>" . 'pin-buffer)
  :straight (pin-buffer :type git :host github :repo "grafov/pin-buffer"))

Usage

Just call M-x pin-buffer to toglle current buffer.

Explanation

The code uses "dedicated window" feature of Emacs. You could do it in your manner without this extension. Just check this code for idea:

  (let (window (get-buffer-window (current-buffer)))
	 (if (set-window-dedicated-p window
						 (not (window-dedicated-p window)))))

Similar plugins

License

Under terms of GPL v3. See LICENSE file.

About

📍Pins buffer to current window in GNU/Emacs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published