Skip to content

yothebob/buffer-query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 

Repository files navigation

Buffer Query

Interact with your buffers in a SQL like fashion!

.gif here

Get Started

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.git

NOTE: 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)

Case Scenarios

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"

Params

Actions

CommandDescription
“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

Columns

These are the direct fields in your Buffer List page, take a look at that if more info is needed.

CommandDescription
“name”File Name/Buffer Name
“size”Size of File/Buffer
“mode”Current Buffer Mode
“file”Full File Path. Note reads file dired from magit

Where Conditionals

CommandDescription
”=”Is equal to
”!=”Not equal to
“not in”x is not in y
“in”x is in y

Tables

NOTE: Not needed in command because this is the only ‘table’ supported ATM.

Command
“buffers”

TODOS

  • 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

About

Manage your Emacs buffers with SQL like commands!

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors