LoginSignup
1
1

More than 5 years have passed since last update.

helm-buffers-listとhelm-migemo(2)

Posted at

helmのバッファマッチング関数がいつのまにか変わっていたようです。

(defun helm-compile-source--migemo (source)
  (if (not (featurep 'migemo))
      source
    (let* ((match-identity-p 
            (or (assoc 'candidates-in-buffer source)
                (equal '(identity) (assoc-default 'match source))))

           (matcher 'helm-mp-3migemo-match)
           (searcher (if (assoc 'search-from-end source)

                           'helm-mp-3migemo-search-backward
                         'helm-mp-3migemo-search)))
      (cond (helm-use-migemo
             `((delayed)
               (search ,@(assoc-default 'search source) ,searcher)
               ,(if match-identity-p
                    '(match identity)
                  `(match ,matcher
                          ,@(if (eq (cdr (assoc 'match source)) 'helm-buffers-match-function)
                                 '(helm-string-match-with-migemo)
                              (assoc-default 'match source))))
                  ,@source))
            ((assoc 'migemo source)
             `((search ,searcher)
               ,(if match-identity-p
                    '(match identity)
                  `(match ,matcher))
               ,@source))
            (t source)))))
(add-to-list 'helm-compile-source-functions 'helm-compile-source--migemo t)

にすればバッファ名での絞り込みが動作します。

'helm-buffers-list--match-fn'helm-buffers-match-function にしただけです。

でもhelm-migemoを使わないほうがhelm-buffers-listの機能を十分に使えます。* でモードでの絞り込み、@でmoccur? のような絞り込みができます。

helm-migemoを使う以上あきらめなければいけないのが残念です。

バッファを変えるだけならば無理にhelm-buffers-listを使わず
ともswitch-to-bufferのままでよいのかもしれません。
こちらはデフォルトでhelm-migemoでのバッファ名の絞り込みがききます。
そもそもバッファ名しかありませんけれども。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1