dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit f6fe407b708a6d57d35a583582f68dfd5db252ef
parent 0c66fd057c73191bfc97d0ca7d594ddd534ff31d
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Tue,  1 Mar 2022 17:03:41 +0100

emacs: keybinding to toggle dedicated window

Diffstat:
Memacs/config.org | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/emacs/config.org b/emacs/config.org @@ -1293,6 +1293,26 @@ Also, to raise a sexp (e.g. ~(one (two))~ → ~(two)~): (global-set-key (kbd "C-S-u") #'raise-sexp) #+end_src +** Dedicated windows +Sometimes I want to avoid Emacs overriding a window's contents. +So I create a keybinding to toggle dedicated on a window: + +#+begin_src emacs-lisp + (defun za/toggle-window-dedicated-p () + "Toggle set-window-dedicated-p on current window" + (interactive) + (cond ((window-dedicated-p (selected-window)) + (set-window-dedicated-p (selected-window) nil) + (message "Window no longer dedicated")) + (t + (set-window-dedicated-p (selected-window) t) + (message "Window marked as dedicated")))) + + (global-set-key (kbd "C-x 9") #'za/toggle-window-dedicated-p) + +#+end_src + + * Notmuch Define some saved searches (i.e. mailboxes):