From 1622ac38772868d101e48107591db8f4700627c4 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Tue, 5 Sep 2023 00:14:03 +1000 Subject: A few changes - add dedicate-windows-by-modes as window-configuration-change-hook, but it did not work well when used on gnus-summary-mode - copying gnus article regions also copies links, which are appended at the end of the copy as footnote - overload org-id-store-link so that capturing today's work could include the item priority - org should open a gnus link in other-window - fixing my-org-clean-up-entry so that it deletes trailing empty lines - added a silly utility function to clean a red energy bill pay link --- emacs/.emacs.d/lisp/my/my-buffer.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'emacs/.emacs.d/lisp/my/my-buffer.el') diff --git a/emacs/.emacs.d/lisp/my/my-buffer.el b/emacs/.emacs.d/lisp/my/my-buffer.el index 11d869d..fa51abf 100644 --- a/emacs/.emacs.d/lisp/my/my-buffer.el +++ b/emacs/.emacs.d/lisp/my/my-buffer.el @@ -313,6 +313,16 @@ that point." (zerop (forward-line 1)))) (eobp)))) +(defvar my-dedicated-modes nil + "Modes whose windows will be dedicated") +(defun my-dedicate-windows-by-modes () + "Dedicate windows with modes from `my-dedicated-modes'." + (walk-windows + (lambda (window) + (when (with-current-buffer (window-buffer window) + (apply 'derived-mode-p my-dedicated-modes)) + (set-window-dedicated-p window t))))) + ;;;; Scratch buffers ;; The idea is based on the `scratch.el' package by Ian Eure: ;; . -- cgit v1.2.3