LoginSignup
5
7

More than 3 years have passed since last update.

How to use `gls' on Emacs dired with MacOSX and coreutils

Last updated at Posted at 2013-12-17

Emacs で dired を使うと以下のようなメッセージが出るときがあります。

ls does not support --dired; see `dired-use-ls-dired' for more details.

これは MacOSX の ls がオプション --dired をサポートしていないためです。
coreutils をインストールして /usr/local/opt/coreutils/libexec/gnubinパスに含めちゃうという手もあるのですが、coreutils は日本語のサポートがいまいちなのでちょっと避けたい(たとえば df)。

で、~/.emacs.d/.init に以下を追加すればオッケーです。

(let ((gls "/usr/local/bin/gls"))
  (if (file-exists-p gls) (setq insert-directory-program gls)))

下記サイトを参照しました。
http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg01208.html

5
7
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
5
7