[Top][All Lists]

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

Re: emacs equivalent of vi %

From: Rustom Mody
Subject: Re: emacs equivalent of vi %
Date: Wed, 13 Aug 2008 18:54:26 +0530

On Wed, Aug 13, 2008 at 4:40 PM, Lennart Borgman (gmail)
<address@hidden> wrote:
> Rustom Mody wrote:
>> On Wed, Aug 13, 2008 at 3:04 PM, Lennart Borgman (gmail)
>> <address@hidden> wrote:
>> But this does not answer my problem.  In vi you can use the visual
>> (aka VIsual) part or the ex part -- commands that you give with a ':'
>> (somewhat like M-x which puts you in the minibuffer).
>> The % behavior in vi -- paren matchng -- is quite unrelated to the %
>> in ex which substitutes (interpolates) the current file name into the
>> command
> Ah, sorry. Look at the compile command:
>  C-h f compile

Yeah I know about compile but I am interested in interpolating the
file name into an arbitrary command (not just gcc)

Roughly I know what to do:

Bind the character '%' to
(file-name-nondirectory (buffer-file-name))
in the keymap that is in effect when shell-command ( M-! )  is running.

Im only not sure which keymap (and/or how to find it)

reply via email to

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