|
From: | Lennart Borgman (gmail) |
Subject: | Re: emacs equivalent of vi % |
Date: | Thu, 14 Aug 2008 02:14:48 +0200 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 |
Nikolaj Schumacher wrote:
Nikolaj Schumacher <n_schumacher@web.de> wrote:"Rustom Mody" <rustompmody@gmail.com> wrote:Bind the character '%' to (file-name-nondirectory (buffer-file-name))Also, note that you'll need to make an interactive function out of the form to bind it to a key.Oups, that's not all... It won't work, because `buffer-file-name' will of course return the minibuffer's file name (i.e. none). I'm currently not aware of an easy way to get the originating buffer from the minibuffer. Sorry.
Maybe minibuffer-selected-window + window-buffer?
[Prev in Thread] | Current Thread | [Next in Thread] |