[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Passing current buffer to compile command
From: |
rusi |
Subject: |
Re: Passing current buffer to compile command |
Date: |
Sun, 16 Jan 2011 19:29:50 -0800 (PST) |
User-agent: |
G2/1.0 |
On Jan 17, 12:12 am, duke <sidney.reilley...@gmail.com> wrote:
> How do I do that? I'm not using make, but another compiler. So I need
> to pass a filename. Instead of inputing the filename, how do I pass
> the current buffer file name? %f ?
> --
> duke
In vi '%' at the colon prompt gives the file name. (Like your %f)
The following will give that to you in the minibuffer
[But beware of using it with buffers that have no file associated)
(define-key minibuffer-local-map "%"
(function
(lambda ()
(interactive)
(insert (file-name-nondirectory
(buffer-file-name
(window-buffer (minibuffer-selected-window))))))))
- Re: Passing current buffer to compile command, (continued)
- Re: Passing current buffer to compile command, despen, 2011/01/16
- Message not available
- Re: Passing current buffer to compile command, duke, 2011/01/16
- Re: Passing current buffer to compile command, Peter Dyballa, 2011/01/16
- Message not available
- Re: Passing current buffer to compile command, duke, 2011/01/16
- Re: Passing current buffer to compile command, Eli Zaretskii, 2011/01/17
- Message not available
- Re: Passing current buffer to compile command, duke, 2011/01/17
Re: Passing current buffer to compile command,
rusi <=
- Re: Passing current buffer to compile command, rusi, 2011/01/16
- Re: Passing current buffer to compile command, duke, 2011/01/17
- Re: Passing current buffer to compile command, rusi, 2011/01/17
- Re: Passing current buffer to compile command, rusi, 2011/01/17
- Re: Passing current buffer to compile command, Le Wang, 2011/01/18
- Message not available
- Re: Passing current buffer to compile command, duke, 2011/01/19
Re: Passing current buffer to compile command, duke, 2011/01/18
RE: Passing current buffer to compile command, Drew Adams, 2011/01/20