From 9c11ee9eef0a7caf5892a9a7557160f6f506b5f9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 5 Aug 2018 23:42:27 +0200 Subject: [PATCH] Fix workspace-restricted helm-buffers-list Now SPC b b and SPC b B can both enjoy the power of helm-buffers-list, while the former is restricted to the buffers in the current workspace. --- modules/completion/helm/autoload/helm.el | 7 +++++++ modules/completion/helm/config.el | 2 ++ 2 files changed, 9 insertions(+) diff --git a/modules/completion/helm/autoload/helm.el b/modules/completion/helm/autoload/helm.el index 6e44f4a32..655e635f3 100644 --- a/modules/completion/helm/autoload/helm.el +++ b/modules/completion/helm/autoload/helm.el @@ -18,6 +18,13 @@ #'helm-find-files #'helm-projectile-find-file))) +;;;###autoload +(defun +helm/persp-buffer-list () + "A version of `helm-buffers-list', but with its buffer list restricted to the +current workspace." + (interactive) + (with-persp-buffer-list nil (helm-buffers-list))) + ;; ;; Project search diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index ca385de3b..82d4fbd28 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -45,6 +45,8 @@ be negative.") [remap imenu-anywhere] #'helm-imenu-anywhere [remap imenu] #'helm-semantic-or-imenu [remap noop-show-kill-ring] #'helm-show-kill-ring + [remap persp-switch-to-buffer] #'+helm/persp-buffer-list + [remap switch-to-buffer] #'helm-buffers-list [remap projectile-find-file] #'+helm/projectile-find-file [remap projectile-recentf] #'helm-projectile-recentf [remap projectile-switch-project] #'helm-projectile-switch-project