Не могу понять, как этот косяк пофиксить
(defun my/kill-all-buffers-except-toolbox ()
"Kill all buffers except current one and toolkit (*Messages*, *scratch*). Close other windows."
;; (interactive)
(mapc 'kill-buffer (remove-if
(lambda (x)
(or
;; (string-equal (buffer-name) (buffer-name x))
(string-equal "*Messages*" (buffer-name x))
(string-equal "*ycmd-server*" (buffer-name x))
(string-equal "*scratch*" (buffer-name x))))
(buffer-list)))
(delete-other-windows))
;; load bookmarks & kill all buffer's
(global-set-key (kbd "C-x r b")
(lambda ()
(interactive)
(bookmark-jump
(completing-read "Jump to bookmark: " (bookmark-all-names)))
;; save current dir
(defvar my-cur-dir (file-name-directory (buffer-file-name)))
(switch-to-buffer "*scratch*")
(my/kill-all-buffers-except-toolbox)
;; revert current dir
(setq default-directory my-cur-dir)))