I recently switched from
helm. Now I'm using
helm-buffers-list to select buffers.
Additionally I want to create a customised
helm-buffers-list function which allows me only to select from shell buffers; let's call this new function
helm-shell-buffers-list. From earlier times where I used
ido I still have a function populating a list with all shell buffers - how can I use this list to create the function
I looked at the source for helm-buffers-list:
(defun helm-buffers-list () (interactive) (unless helm-source-buffers-list (setq helm-source-buffers-list (helm-make-source "Buffers" 'helm-source-buffers))) (helm :sources '(helm-source-buffers-list helm-source-ido-virtual-buffers helm-source-buffer-not-found) :buffer "*helm buffers*" :keymap helm-buffer-map :truncate-lines helm-buffers-truncate-lines))
This leads me to believe I have to provide a new class similar to
(defclass helm-source-buffers (helm-source-sync helm-type-buffer) ((buffer-list :initarg :buffer-list :initform #'helm-buffer-list :custom function :documentation " A function with no arguments to create buffer list.") (init :initform 'helm-buffers-list--init) (multimatch :initform nil) (match :initform 'helm-buffers-match-function) (persistent-action :initform 'helm-buffers-list-persistent-action) (keymap :initform helm-buffer-map) (migemo :initform 'nomultimatch) (volatile :initform t) (nohighlight :initform t) (resume :initform (lambda () (setq helm-buffers-in-project-p nil))) (help-message :initform 'helm-buffer-help-message)))
However in that class I have no idea where to provide the list with buffers...
Any help greatly appreciated!