[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Passing current buffer to compile command
From: |
duke |
Subject: |
Re: Passing current buffer to compile command |
Date: |
Wed, 19 Jan 2011 12:12:25 -0800 (PST) |
User-agent: |
G2/1.0 |
On Jan 18, 9:06 am, Le Wang <l26w...@gmail.com> wrote:
> For completeness, I'll present the yasnippet solution here, it should be
> saved under the "fundamental-mode" subdir of the snippets folder. This
> expansion key works in any buffer, including the minibuffer:
>
> # -*- mode: snippet -*-
> # name: buffer-file-name-nondir
> # key: %
> # --
> `(let ((fname (file-name-nondirectory
> (or (buffer-file-name (window-buffer
> (minibuffer-selected-window)))
> ""))))
> (if (zerop (length fname))
> "%"
> fname))`$0
>
> On Tue, Jan 18, 2011 at 12:05 PM, rusi <rustompm...@gmail.com> wrote:
> > On Jan 18, 8:42 am, rusi <rustompm...@gmail.com> wrote:
> > > On Jan 18, 12:07 am, duke <sidney.reilley...@gmail.com> wrote:
> > : snipped
>
> > > > You are too kind! Much obliged for the snippet, but especially the
> > > > courtesy. Can't wait to hack my .emacs and try it out :)
>
> > > I should attribute this to someone (who helped me write this) -- but
> > > cant remember who :-)
>
> > Found the original thread
> >http://lists.gnu.org/archive/html/help-gnu-emacs/2008-08/msg00433.html
>
> --
> Le
Another useful option! Thanks.
- Re: Passing current buffer to compile command, (continued)
Re: Passing current buffer to compile command, rusi, 2011/01/16
Re: Passing current buffer to compile command, duke, 2011/01/18
RE: Passing current buffer to compile command, Drew Adams, 2011/01/20