[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Oneliner has a perl script the name of `el'. You can more integrate shell with Emacs with `el' command.
4.1 What is `el' command ? 4.2 Manual of `el' command 4.3 Let's try `el' command
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You can make a tuned shell-command for Oneliner with `el' command. The `el' command can send S-exp to Emacs, and it can make Emacs to evaluate it, too. In other words, You can execute Emacs's function from shell-commands. And you can make Emacs to work in closer cooperation with your favorite shell-commands.
For example, You can perform a technique as follows: (If you input the follows, Emacs opens a file "a.c" automatically.)
$ find-file a.c |
How do we implement to do it ? Let's define an alias with `el' as follows:
alias find-file="el -x -f '(display-buffer (find-file-noselect \"%s\"))'" |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Here is explanation for `el' command. We assume that a default pipe-buffer has data as follows on all examples:
1 2 3 4 |
The primary actions are building S-exp from command line arguments and stdin. And then, display it.
$ el 1 2 3 4 (1 "2" "3" "4") $ echo 1 2 3 4 | el (1 "2" "3" "4") $ echo 1 2 | el 3 4 (3 "4") $ | el (1 "2") (3 "4") |
`el' command has many command line switches. Here is explanation of switches.
$ | el -c elisp-func (elisp-func "1" "2") (elisp-func "3" "4") |
$ | el -a 1 -c elisp-func (elisp-func "1") (elisp-func "2") (elisp-func "3") (elisp-func "4") |
$ | el -f '(elisp-func "%s")' (elisp-func "1") (elisp-func "2") (elisp-func "3") (elisp-func "4") $ | el -f '(elisp-func "%s" "%s")' (elisp-func "1" "2") (elisp-func "3" "4") |
$ | el -s -c elisp-func (elisp-func "1" "2" "3" "4") $ | el -s -a 3 -c elisp-func (elisp-func "1" "2" "3") (elisp-func "4") |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
alias find-file="el -x -f '(display-buffer (find-file-noselect \"%s\"))'"
|
find-dired="el -x -f '(find-dired \"%s\" \"-name %s\")'"
|
alias dired='el -x -a 1 -c dired'
|
alias ediff-files='el -x -s -a 2 -c ediff-files'
|
alias w3m-find-file='el -x -a 1 -c w3m-find-file'
|
alias cvs-update="el -x -f '(cvs-update \"%s\" nil)'"
|
alias google="echo nil | el -x -f '(w3m \"http://www.google.co.jp/\" %s)'"
|
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |