Lugaru's Epsilon

Epsilon User's Manual and Reference
   Commands by Topic
      Buffers and Files
            . . .
            Saving Files
            Backup Files
            File Name Templates
            Line Translation
            DOS/OEM Character Set Support
            . . .
         File Variables
            Directory-wide File Variables
            Vi/Vim File Variables
         . . .

Previous   Up    Next
Backup Files  Commands by Topic   Line Translation

Epsilon User's Manual and Reference > Commands by Topic > Buffers and Files > Files >

File Name Templates

Epsilon uses file name templates to construct one file name from another, such as constructing the name of a backup file from the original file name. Epsilon also uses these to construct command lines, for example in the various compile-?-cmd variables that the compile-buffer command uses, or with the % sequence in .mnu files.

Epsilon copies the template text, substituting pieces of the original file name when it encounters codes in the template, according to the table. The sequence %r substitutes a relative pathname to the original file name, if the file is within the current directory or its subdirectories, or an absolute pathname otherwise.

The sequence %x substitutes the full pathname of the directory containing the Epsilon executable. The sequence %X substitutes the same full pathname, but this time after converting all Windows long file names making up the path to their equivalent short name aliases. For example, if the Epsilon executable was in the directory c:\Program Files\Eps13\bin\, %x would use exactly that pathname, while %X might yield c:\Progra~1\Eps13\bin\. Under Unix, %X is the same as %x. Either always ends with a path separator character like / or \.

     Example 1  Example 2
 Code  Part  c:\dos\  /usr/bin
 %p  Path  c:\dos\  /usr/
 %b  Base  read  bin
 %e  Extension  .me  (None)
 %f  Full name  c:\dos\  /usr/bin
 %r  Relative path  dos\  /usr/bin
   (assuming current    
   directory is  c:\  /usr/mark )
 %x  Executable path  c:\Program Files\Eps13\bin\  /usr/local/epsilon13.16/bin/
 %X  Alias to path  c:\Progra~1\Eps13\bin\  /usr/local/epsilon13.16/bin/

If any other character follows %, Epsilon puts that character into the resulting file name. You can use this, for example, to include an actual % character in the result by putting %% in the template.

Previous   Up    Next
Backup Files  Commands by Topic   Line Translation

Lugaru Copyright (C) 1984, 2018 Lugaru Software Ltd. All Rights Reserved.