helmで最近開いたディレクトリを開く(修正版)

helm で最近開いたディレクトリの一覧を表示する設定に手を加えたので、再びアップしてみました。

;;helm recentf only directories
(defclass helm-recentf-directory-source (helm-recentf-source)
  ((candidates :initform (lambda ()
                           (helm-fast-remove-dups
                            (loop for file in recentf-list
                                  collect (file-name-directory file)
                                  )
                            :test 'equal)))))
                                 
(setq helm-recentf-directory-source
      (helm-make-source "Recentf" 'helm-recentf-directory-source
        :fuzzy-match t))

(defun helm-recentf-directory ()
  "Preconfigured `helm' for `recentf'."
  (interactive)
  (helm :sources 'helm-recentf-directory-source
        :ff-transformer-show-only-basename nil
        :buffer "*helm recentf*"))

以前のものとの違いは、履歴ファイルからすべてのディレクトリ情報を取得して、重複しているディレクトリを削除した上で表示するように変更したことです。