- Subject: Re: How do I set up a template?
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Wed, 29 Oct 2008 17:01:41 -0400
On Wed, 29 Oct 2008 21:43:20 +0100 (CET), Michele Dondi <blazar@xxxxxxxxxxxxxxxxxx> said:
>For some reason, it doesn't work, in the sense that the template is not
>inserted. But I blindly concocted up the following mixing your code with
>Mark Olesen's:
I believe that it didn't work because in the example I gave, the name
of the template file used a .tpl extension, whereas you assumed files
with no extensions. So it should work if you change
variable file = expand_filename ("~/.jed/templates/$mode.tpl"$);
to:
variable file = expand_filename ("~/.jed/templates/$mode"$);
I assume that you are using slang-2. If using slang-1, then you will
have to modify the above to:
variable file = expand_filename ("~/.jed/templates/" + mode);
Also if you use slang-2, then you can use the variation
variable file = "$HOME/.jed/templates/$mode"$;
[...]
>This DOES work as intended. I have one final doubt. Will it also work
>under Windows? Or will the version with expand_filename() instead of the
>sprintf() statement? Isn't there a special function, say
>jed_personal_dir() which will return the properly expanded path of (in
>this case) ~.jed and whatever it will be under Windows?
define jed_personal_dir ()
{
return Jed_Home_Directory;
}
Jed_Home_Directory
SYNOPSIS
User's jed home directory
DESCRIPTION
The value of this variable specifies the user's so-called home directory
where personal jed-related files are assumed to be found. Normally, this
corresponds to the user's home directory unless the user has specified
an alternate directory via the `JED_HOME' environment variable.
--John
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2008 date index]
[2008 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]