From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: weber Newsgroups: gmane.emacs.help Subject: Re: yasnippet insert file name Date: Sun, 20 Jul 2008 18:31:24 -0700 (PDT) Organization: http://groups.google.com Message-ID: <869c0642-5cbd-4806-a4a9-ef11478f200d@b1g2000hsg.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1216604445 21927 80.91.229.12 (21 Jul 2008 01:40:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Jul 2008 01:40:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 21 03:41:33 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KKkP6-000080-Pz for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Jul 2008 03:41:33 +0200 Original-Received: from localhost ([127.0.0.1]:58425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKkOD-0008Pf-MH for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Jul 2008 21:40:37 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!b1g2000hsg.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-NNTP-Posting-Host: 189.32.111.130 Original-X-Trace: posting.google.com 1216603885 11862 127.0.0.1 (21 Jul 2008 01:31:25 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 21 Jul 2008 01:31:25 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b1g2000hsg.googlegroups.com; posting-host=189.32.111.130; posting-account=7GrjgQoAAAD6slWURausdJnhFDkmQYC8 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:160415 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:55762 Archived-At: On Jul 20, 1:31=A0pm, Fabian Braennstroem wrote: > Hi, > > =A0 =A0 I just saw yasnippet and wonder, if it is possible to do > =A0 =A0 filename completion as well!? > > =A0 =A0 A simple: =A0filename ${1:`(insert-filename)`} does not > =A0 =A0 work: > > =A0 =A0 filename (error in elisp evaluation: Wrong number of > =A0 =A0 =A0 =A0 arguments: (lambda (fn) "Use filename completion to > =A0 =A0 =A0 =A0 =A0 =A0 insert a filename into current buffer." > =A0 =A0 =A0 =A0 =A0 =A0 (interactive "FFilename to insert: ") (insert > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 fn)), 0) > > =A0 =A0 Would be nice, if someone has a suggestion. > > Greetings! > =A0Fabian Do you want to insert the current buffer file name there? If so, use (buffer-file-name) instead. I suggest you ask on yasnippet group, the author always answers there. HTH, weber