From: duke <sidney.reilley.ii@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Passing current buffer to compile command
Date: Wed, 19 Jan 2011 12:12:25 -0800 (PST) [thread overview]
Message-ID: <6726c896-b9a1-4f79-bc63-1ddc42e72fad@p7g2000prb.googlegroups.com> (raw)
In-Reply-To: mailman.0.1295366801.24998.help-gnu-emacs@gnu.org
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.
next prev parent reply other threads:[~2011-01-19 20:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-16 19:12 Passing current buffer to compile command duke
2011-01-16 20:50 ` Peter Dyballa
2011-01-16 21:12 ` Pascal J. Bourguignon
[not found] ` <mailman.12.1295211063.24679.help-gnu-emacs@gnu.org>
2011-01-16 21:54 ` duke
2011-01-16 22:53 ` Eli Zaretskii
2011-01-19 4:41 ` Kevin Rodgers
2011-01-16 23:42 ` Peter Dyballa
[not found] ` <mailman.1.1295218445.29897.help-gnu-emacs@gnu.org>
2011-01-17 1:29 ` duke
2011-01-17 12:44 ` Eli Zaretskii
[not found] ` <mailman.2.1295268672.1793.help-gnu-emacs@gnu.org>
2011-01-17 19:08 ` duke
2011-01-16 21:58 ` despen
2011-01-17 5:48 ` despen
2011-01-17 19:09 ` duke
2011-01-17 3:29 ` rusi
2011-01-17 3:49 ` rusi
2011-01-17 19:07 ` duke
2011-01-18 3:42 ` rusi
2011-01-18 4:05 ` rusi
2011-01-18 16:06 ` Le Wang
[not found] ` <mailman.0.1295366801.24998.help-gnu-emacs@gnu.org>
2011-01-19 20:12 ` duke [this message]
2011-01-18 5:14 ` duke
2011-01-21 1:08 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6726c896-b9a1-4f79-bc63-1ddc42e72fad@p7g2000prb.googlegroups.com \
--to=sidney.reilley.ii@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).