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

-i command line option and Set Directories Edit Plus 3.11

Expand Messages
  • frederickmc
    I need two different sets of ini and syntax directories for different projects (primarily because of the templates). I have two shortcuts to start Edit Plus:
    Message 1 of 3 , Jul 3 2:21 PM
    • 0 Attachment
      I need two different sets of ini and syntax directories for different projects (primarily because of the templates). I have two shortcuts to start Edit Plus:

      "C:\Program Files\EditPlus\editplus.exe" -d G:\shared\proj1\code -i G:\shared\EditPlus\proj1

      "C:\Program Files\EditPlus\editplus.exe" -d G:\shared\proj2\code -i G:\shared\EditPlus\proj2

      (Note: I changed the default install location from "EditPlus 3" to "EditPlus"

      The problem is, when I open EP and use Tools > Set Directories it affects both instances of EP, even if I have both open at the time I change it.

      I have moved C:\Setting and Documents\<user name>\Application Data\EditPlus 3 so that it cannot use the files located there.

      It appears that the values from Tools > Set Directories is stored in the registry, at HKEY_CURRENT_USER\Software\ES-Computing\EditPlus 3\Install\ in the keys STX ACP CTL and INI directory. It is unfortunate it isn't stored in an ini file! And it appears the command line option
      -i directory
      is not overriding the registry entry.

      If I rename the registry entries, then open EP and change the Set Directories entries, the registry entries are recreated. Thus, it appears there is no way around this problem.

      Additionally, it is evident that EP isn't reading editplus_u.ini from the command line -i path, because in order to open a second instance I have to allow multiple instances in the first one I open. (The setting for multiple instances is in editplus_u.ini)

      Any help would be appreciated.

      Frederick Mc
    • frederickmc
      ... Further information: If I have opened C: Program Files EditPlus editplus.exe -d G: shared proj1 code -i G: shared EditPlus proj1 and verify that Tool
      Message 2 of 3 , Jul 3 4:10 PM
      • 0 Attachment
        --- In editplus@yahoogroups.com, "frederickmc" <fr@...> wrote:
        >
        > I need two different sets of ini and syntax directories for different projects (primarily because of the templates). I have two shortcuts to start Edit Plus:
        >
        > "C:\Program Files\EditPlus\editplus.exe" -d G:\shared\proj1\code -i G:\shared\EditPlus\proj1
        >
        > "C:\Program Files\EditPlus\editplus.exe" -d G:\shared\proj2\code -i G:\shared\EditPlus\proj2
        >
        > (Note: I changed the default install location from "EditPlus 3" to "EditPlus"
        >
        > The problem is, when I open EP and use Tools > Set Directories it affects both instances of EP, even if I have both open at the time I change it.
        >
        > I have moved C:\Setting and Documents\<user name>\Application Data\EditPlus 3 so that it cannot use the files located there.
        >
        > It appears that the values from Tools > Set Directories is stored in the registry, at HKEY_CURRENT_USER\Software\ES-Computing\EditPlus 3\Install\ in the keys STX ACP CTL and INI directory. It is unfortunate it isn't stored in an ini file! And it appears the command line option
        > -i directory
        > is not overriding the registry entry.
        >
        > If I rename the registry entries, then open EP and change the Set Directories entries, the registry entries are recreated. Thus, it appears there is no way around this problem.
        >
        > Additionally, it is evident that EP isn't reading editplus_u.ini from the command line -i path, because in order to open a second instance I have to allow multiple instances in the first one I open. (The setting for multiple instances is in editplus_u.ini)
        >
        > Any help would be appreciated.
        >
        > Frederick Mc
        >

        Further information:
        If I have opened

        "C:\Program Files\EditPlus\editplus.exe" -d G:\shared\proj1\code -i G:\shared\EditPlus\proj1

        and verify that Tool > Set Directories > INI File Directory is G:/shared\EditPlus\proj1 then open

        "C:\Program Files\EditPlus\editplus.exe" -d G:\shared\proj2\code -i G:\shared\EditPlus\proj2

        the INI File Directory in Set Directories in the first instance is changed to
        G:\shared\EditPlus\proj2

        So, in a way the -i command line option does override the registry setting - but it rewrites the registry setting, affecting all instances of EditPlus. And changes to Set Directories in any instance affect all instances. Therefore, it is impossible to have separate stx, ctl, acp, and template directories.

        I believe this worked correctly in the previous version!
      • Michael L. Jones
        ... A question: In the scenario you just described, does the first instance of EP continue to actually use the path that was specified on the command line
        Message 3 of 3 , Jul 5 8:41 AM
        • 0 Attachment
          --- In editplus@yahoogroups.com, "frederickmc" <fr@...> wrote:
          >
          > --- In editplus@yahoogroups.com, "frederickmc" <fr@> wrote:
          > >
          > > I need two different sets of ini and syntax directories for different projects (primarily because of the templates). I have two shortcuts to start Edit Plus:
          > >
          > > "C:\Program Files\EditPlus\editplus.exe" -d G:\shared\proj1\code -i G:\shared\EditPlus\proj1
          > >
          > > "C:\Program Files\EditPlus\editplus.exe" -d G:\shared\proj2\code -i G:\shared\EditPlus\proj2
          > >
          > > (Note: I changed the default install location from "EditPlus 3" to "EditPlus"
          > >
          > > The problem is, when I open EP and use Tools > Set Directories it affects both instances of EP, even if I have both open at the time I change it.
          > >
          > > I have moved C:\Setting and Documents\<user name>\Application Data\EditPlus 3 so that it cannot use the files located there.
          > >
          > > It appears that the values from Tools > Set Directories is stored in the registry, at HKEY_CURRENT_USER\Software\ES-Computing\EditPlus 3\Install\ in the keys STX ACP CTL and INI directory. It is unfortunate it isn't stored in an ini file! And it appears the command line option
          > > -i directory
          > > is not overriding the registry entry.
          > >
          > > If I rename the registry entries, then open EP and change the Set Directories entries, the registry entries are recreated. Thus, it appears there is no way around this problem.
          > >
          > > Additionally, it is evident that EP isn't reading editplus_u.ini from the command line -i path, because in order to open a second instance I have to allow multiple instances in the first one I open. (The setting for multiple instances is in editplus_u.ini)
          > >
          > > Any help would be appreciated.
          > >
          > > Frederick Mc
          > >
          >
          > Further information:
          > If I have opened
          >
          > "C:\Program Files\EditPlus\editplus.exe" -d G:\shared\proj1\code -i G:\shared\EditPlus\proj1
          >
          > and verify that Tool > Set Directories > INI File Directory is G:/shared\EditPlus\proj1 then open
          >
          > "C:\Program Files\EditPlus\editplus.exe" -d G:\shared\proj2\code -i G:\shared\EditPlus\proj2
          >
          > the INI File Directory in Set Directories in the first instance is changed to
          > G:\shared\EditPlus\proj2
          >
          > So, in a way the -i command line option does override the registry setting - but it rewrites the registry setting, affecting all instances of EditPlus. And changes to Set Directories in any instance affect all instances. Therefore, it is impossible to have separate stx, ctl, acp, and template directories.
          >
          > I believe this worked correctly in the previous version!

          A question:

          In the scenario you just described, does the first instance of EP continue to actually use the path that was specified on the command line while you are coding, even though the registry settings changed? (Ignore what the Set Directories dialog box says.)

          Normally, when I develop a program, I read the persistent settings into memory when the program loads, replacing them with any command line arguments, and only change them when the user does so through the program's configuration dialog box. I don't keep re-reading them every time I need to use a setting. Otherwise, I'd be constantly reading from the persistent source, which strikes me as inefficient. In this case, the first instance of the program would continue to use the original settings even though a second instance changed them, assuming that I allowed multiple instances.

          Have you actually checked what stx, ctl, acp and template directories the first instance of EP is using while writing code? Maybe each instance of EP is persisting the command line settings, so that the last instance opened "wins," but each open instance uses the command line settings it was originally given.

          If that's the case, then I'm not sure that I like what EP is doing. IMO, the persistent settings should only be changed through the Set Directories dialog box and temporarily overridden by the command line.
        Your message has been successfully submitted and would be delivered to recipients shortly.