help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Name of the active buffer


From: Daniel Jensen
Subject: Re: Name of the active buffer
Date: Fri, 08 Jun 2007 13:33:23 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux)

hfleming <hfleming38@gmail.com> writes:

> Suppose I want to run, from emacs, the program "prog" with the active buffer,
> "buffer", say, as argument.
> Of course I can do "Meta-! prog buffer". Some editors, however, have a
> default name for the active buffer. In vi, for instance, one can do ":! prog
> %" . In ultraedit, the buffer is called "%f". How can we do that in emacs?

I assume you want to pass the buffer /file/ name as an argument to the
program, not the name.

Normally this is what you want for the compile command. It's a good idea
to use that even if the program is not strictly a compiler.

There is no built-in feature for taking the file name and using it with
M-x compile. One way to do it is to have a local variable in the file:

    compile-command: program and arguments...

See <http://www.emacswiki.org/cgi-bin/wiki/CompileCommand> for possible
other ways.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]