Here\'s my problem: I use Emacs and get lots of buffers that are pretty useless all the time, like *Messages* or *Completions*.
I want to bind \\C-y to close all buf
To kill all other buffers
(defun px-kill-other-buffers ()
"Kill all other buffers."
(interactive)
(mapc 'kill-buffer (delq (current-buffer) (buffer-list))))
To search the beginning of a string
(defun string-starts-with-p (string prefix)
"Return t if STRING starts with prefix."
(and
(string-match (rx-to-string `(: bos ,prefix) t) string)
t))