理系学生日記

おまえはいつまで学生気分なのか

helmで "Not a Tramp file name: /To create the database, run the following command:"

helm-for-files 使ってると "Not a Tramp file name: /To create the database, run the following command:" とかいうスタックトレースを伴うエラーが出てムムムーーーとなってしまう状況に陥りました。かなしいですね。 helm-for-files のドキュメントを読むと

Preconfigured helm' for opening files. Run all sources defined inhelm-for-files-preferred-list'. << と出力され、helm-for-files-preferred-list に記載のある source からデータを取得していることが分かります。 それで、describe-variable で helm-for-files-preferred-list の中身を調べると、 |lisp| Its value is (helm-source-buffers-list helm-source-recentf helm-source-bookmarks helm-source-file-cache helm-source-files-in-current-dir helm-source-locate) ||< となるんですね。そういや、locate.database を作成していない (Mac の場合は launchctl で /System/Library/LaunchDaemons/com.apple.locate.plist を有効化していない) 場合に、同じようなエラーが出てました。 というわけで、Tramp のスタックトレースを簡単に回避するには、以下のようにして helm-source-locate を除外するっていうのが暫定対処になります。 |lisp| ;; helm-for-files の source から locate を外す (setq helm-for-files-preferred-list '(helm-source-buffers-list helm-source-recentf helm-source-bookmarks helm-source-file-cache helm-source-files-in-current-dir ; helm-source-locate )) ||<