diff options
author | William Carroll <wpcarro@gmail.com> | 2021-10-29T23·01-0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-01-08T05·55+0000 |
commit | afabc77f74c9dfac8209de2fd8c0df59c9baafee (patch) | |
tree | e0ab25f8315efdec2d62935debb0c05fbe53b3d9 | |
parent | 02db4640308a736c761f1c8c14e4f9348a06f6d8 (diff) |
feat(wpcarro/emacs): Include *scratch* and *Messages* r/3555
While these aren't technically source code buffers, but the purpose of `buffer-ivy-source-code` is to create a list of buffers I likely want to switch to, which includes these. Change-Id: If3f7b6afa6282a3fb8d0d4a3f7aa4ee64287df65 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4799 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com>
-rw-r--r-- | users/wpcarro/emacs/.emacs.d/wpc/buffer.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/users/wpcarro/emacs/.emacs.d/wpc/buffer.el b/users/wpcarro/emacs/.emacs.d/wpc/buffer.el index c152f53bc658..098d499e39d3 100644 --- a/users/wpcarro/emacs/.emacs.d/wpc/buffer.el +++ b/users/wpcarro/emacs/.emacs.d/wpc/buffer.el @@ -56,6 +56,9 @@ 'fundamental-mode) "A blacklist of major-modes to ignore for listing source code buffers.") +(defconst buffer-ivy-source-code-whitelist '("*scratch*" "*Messages*") + "A whitelist of buffers to include when listing source code buffers.") + (defconst buffer-source-code-timeout 2 "Number of seconds to wait before invalidating the cycle.") @@ -156,7 +159,8 @@ Return a reference to that buffer." "Use `ivy-read' to choose among all open source code buffers." (interactive) (ivy-read "Source code buffer: " - (-drop 1 (buffer-source-code-buffers)) + (-concat buffer-ivy-source-code-whitelist + (-drop 1 (buffer-source-code-buffers))) :sort nil :action #'switch-to-buffer)) |