Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

yasnippet insert file name

283 views
Skip to first unread message

Fabian Braennstroem

unread,
Jul 20, 2008, 12:31:12 PM7/20/08
to
Hi,

I just saw yasnippet and wonder, if it is possible to do
filename completion as well!?

A simple: filename ${1:`(insert-filename)`} does not
work:

filename (error in elisp evaluation: Wrong number of
arguments: (lambda (fn) "Use filename completion to
insert a filename into current buffer."
(interactive "FFilename to insert: ") (insert
fn)), 0)

Would be nice, if someone has a suggestion.

Greetings!
Fabian

weber

unread,
Jul 20, 2008, 9:31:24 PM7/20/08
to

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

Fabian Braennstroem

unread,
Jul 21, 2008, 2:22:10 PM7/21/08
to
Hi weber,

* weber <hug...@gmail.com> wrote:
> On Jul 20, 1:31 pm, Fabian Braennstroem <f.braennstr...@gmx.de> wrote:
>> Hi,
>>
>>     I just saw yasnippet and wonder, if it is possible to do
>>     filename completion as well!?
>>
>>     A simple:  filename ${1:`(insert-filename)`} does not
>>     work:
>>
>>     filename (error in elisp evaluation: Wrong number of
>>         arguments: (lambda (fn) "Use filename completion to
>>             insert a filename into current buffer."
>>             (interactive "FFilename to insert: ") (insert
>>                 fn)), 0)
>>
>>     Would be nice, if someone has a suggestion.
>>
>> Greetings!
>>  Fabian
>
> Do you want to insert the current buffer file name there?
> If so, use (buffer-file-name) instead.
No, I would like to insert a different file.

> I suggest you ask on yasnippet group, the author always answers there.
Ok., thanks for the hint.

Greetings!
Fabian

0 new messages