Loading ...
Sorry, an error occurred while loading the content.

2283RE: [jasspa] Template changed by directory?

Expand Messages
  • Phillips, Steven
    Oct 12, 2007
      I have 3 potential solutions for this, I'm sure there are more.
      1) Make use of sessions - I have an ME running for each main project area and each one uses a different session (so each has a different color scheme so I can easily tell them apart), this can be used to solve your problem as follows:
      !if &exi %session-name
          set-variable $search-path &spr "%s%s;%s" $user-path %session-name $search-path
      Put this into your startup macro file, it puts '<your user path>/<session name>' into the search path so if your user path is 'c:/me/jeremy' & session is 'gnu' then it adds 'c:/me/jeremy/gnu', put all your gnu project override files (i.e. gnu etf templates) into this directory.
      2) Similar to (1) you could create simple macros to set the path in the same session, add the following to your user file:
      set-variable %init-search-path $search-path
      define-macro GNU-project
          set-variable $search-path &spr "%sgnu;%s" $user-path %init-search-path
      Simply execute the GNU-project command when you need to start using GNU templates.
      3) A more manual solution is to use multiple templates in the etf files. When you create a new file it will always insert the first template, but if this is the wrong one then delete it and use the insert-template command to insert the correct one. Following is an example of an etf file containing multiple templates:
      This is template example 1
         Created By : $USER_NAME$ Created : $ASCII_TIME$
      This is template example 2
      This is template example 3

        Created: $ASCII_TIME$ Synopsis: Authors: $USER_NAME$
      The $TEMPLATES$ line must be on the first line, the template names (Temp1, Temp2 & Temp3 in this example) can be anything you like and you can also have as many as you like.

      From: jasspa@yahoogroups.com [mailto:jasspa@yahoogroups.com] On Behalf Of Jeremy Cowgar
      Sent: 11 October 2007 15:15
      To: jasspa@yahoogroups.com
      Subject: [jasspa] Template changed by directory?

      Is it possible to change new templates base upon directory? For
      instance, I may be working on one project for work, then turn around and
      work on a GNU project which require a totally different template. Any

      Jeremy Cowgar

    • Show all 3 messages in this topic