LoginSignup
1
2

More than 3 years have passed since last update.

EmacsのM-x grepでThe Platinum Searcherを使う

Last updated at Posted at 2020-04-11

The Platinum Searcher (pt) は複数のエンコーディングのテキストファイルが混在する中で素早くファイル中のキーワードを含む行を見つけてくれるツールです。
Emacs 上で pt を使う方法として、pt の README では pt.el が紹介されています。ここではそれを使わずに Emacs 標準機能の M-x grep で使う方法を紹介します。

macOS

(require 'grep)
(grep-apply-setting 'grep-command "pt --nogroup ")
(grep-apply-setting 'grep-use-null-device nil)

確認環境

Windows

(require 'grep)
(grep-apply-setting 'grep-command "echo . | xargs pt ")

確認環境

1
2
1

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
2