Author: XahXah Date: Aug 13, 2008 08:14
In dired, you can type “!” to run a command on a file.
On Aug 12, 11:52 pm, "Rustom Mody" gmail.com> wrote:
> In vi one can do, for example,
> :!gcc %%
> and the current file gets compiled -- ingeneral :
> :!someCommand options %% otherStuff
> and the filename gets interpolated.
> Is there any way to get the '%%' behavior in emacs?
> [Note: I know about compile; I am asking a more general question about
> getting the filename]
as far as i know there's no similar mechanism. Here's related things i
know:
This code will run the current file:
(defun run-current-file ()
"Execute or compile the current file.
For example, if the current buffer is the file x.pl,
then it'll call “perl x.pl” in a shell.
The file can be php, perl, python, bash,...
|