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

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

Re: Passing current buffer to compile command


From: Pascal J. Bourguignon
Subject: Re: Passing current buffer to compile command
Date: Sun, 16 Jan 2011 22:12:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

duke <sidney.reilley.ii@gmail.com> writes:

> How do I do that? 

That's not possible.  Buffers are not accessible from external commands.

You could render them accessible on some system.  For that, you would
have to write a virtual file system, mount it on your host, so that
external commands could open a virtual file whose content would be the
buffer contents.


> I'm not using make, but another compiler. So I need to pass a
> filename.  

Yes.   The problem is that buffers don't have file names.   Some buffers
have a file, and files have file names, but not all buffers have an
associated file, so you cannot do that, in general.


> Instead of inputing the filename, how do I pass
> the current buffer file name? %f ?

What file name?



Once you get a clearer picture in your mind, you may use M-x apropos RET
to find the function you need.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.


reply via email to

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