Re: emacs cat
- From: Mike Kazantsev <mk.fraggod@xxxxxxxxx>
- Date: Wed, 10 Jun 2009 09:37:27 +0600
On Wed, 10 Jun 2009 02:12:29 +0200
Hans-Peter Engelund Kristiansen <hpek@xxxxxxxxxx> wrote:
Can emacs be used to cat a file?
I would like to overwrite the shell command "cat" with something that
can show the syntax highlighting of the file.
You can use batch mode to output stuff w/o launching emacs, and it's
actually quite fast.
emacs --batch --eval '(print "hello world")'
I don't know how to make it actually dump colors' escape sequences
along w/ text but I guess it should be done via modes' lisp interface,
if it's possible at all.
On a side note you can use a bit more specialized packages to create
"colored cat". I'd use pygments w/ python (which can do it right out of
the box), but I guess there should be at least one accessible from your
language of choice.
Mike Kazantsev // fraggod.net
Description: PGP signature
- emacs cat
- From: Hans-Peter Engelund Kristiansen
- emacs cat
- Prev by Date: Re: emacs cat
- Next by Date: Re: emacs cat
- Previous by thread: Re: emacs cat
- Next by thread: Is there a way to find the key-binding for a given command?