Interact with your buffers in a SQL like fashion!
.gif here
If you download this from github, you can put this folder in your ~/.emacs.d.
cd ~/.emacs.d
git clone https://github.com/yothebob/buffer-query.gitNOTE: no capitalizing, that will not work (I know.. need to fix. Check the todo list at the bottom.)
(add-to-list 'load-path (expand-file-name "~/.emacs.d/buffer-query"))
(require 'buffer-query)
(global-set-key (kbd "C-c b q") 'bq-query)Working on a project that you want to close all those related buffers. You can pick out a name from the file path that is unique.
C-c b q "kill where projectname in file"| Command | Description |
|---|---|
| “select” | display options found in Messages |
| “mark” | Switch to Buffer List with found buffers marked |
| “kill” | Kill selected buffers |
| “open” | Switch to first buffer found in query |
| “save” | Save selected buffers |
| “delete” | Switch to Buffer List with found buffers marked for killing |
These are the direct fields in your Buffer List page, take a look at that if more info is needed.
| Command | Description |
|---|---|
| “name” | File Name/Buffer Name |
| “size” | Size of File/Buffer |
| “mode” | Current Buffer Mode |
| “file” | Full File Path. Note reads file dired from magit |
| Command | Description |
|---|---|
| ”=” | Is equal to |
| ”!=” | Not equal to |
| “not in” | x is not in y |
| “in” | x is in y |
NOTE: Not needed in command because this is the only ‘table’ supported ATM.
| Command |
|---|
| “buffers” |
- Impl more offical sqlite architecture. https://sqlite.org/arch.html
- add tests
- impl crm column
- add distinct support
- “not in” broken
- finish adding conditionals
- optimize speed