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

Re: [jasspa] Backup files -- MEBACKUPSUB behavior vs docs

Expand Messages
  • Thomas Hundt
    Oh. Yes you re right, it does say that. You re doing s|:|/| (changing colons to slashes) which is harmless in Unix, but screws up Windows. I would avoid
    Message 1 of 9 , May 10 3:46 PM
    • 0 Attachment
      Oh. Yes you're right, it does say that. You're doing "s|:|/|"
      (changing colons to slashes) which is harmless in Unix, but screws up
      Windows. I would avoid the "." part too and just remove the colons
      altogether. That feels safer. (Of course under Unix, colons are a
      valid character so there's a possibility of namespace collision.)

      You're right, I forgot the trailing slash in the MEBACKUPPATH. This is
      very important. Also agreed that a relative backuppath is asking for
      big trouble: What if you edit a file in the backup directory??

      Also, another issue, the backup directories should be created with 700
      permissions under Unix (and perhaps the equivalent under Windows). This
      is in case an unwitting user loads your company file and your common
      profile file with backups enabled and settings as above; all his data
      might become world-readable by default in the backup dir. If he doesn't
      know backups are being written and the directories are created by ME
      automatically with 777 permission, he could leave himself wide open.

      Cheers

      -Th


      Steven Phillips wrote:

      > Funnily enough it does do exactly what the docs says it will do and thats the
      > problem. For example, set MEBACKUPPATH = "C:\Backup\Jasspa_backups\" (added a
      > trailing '\') and save "c:\foo\bar\somefile.txt", due to the MEBACKUPPATH
      > setting the back file will be:
      >
      > C:\Backup\Jasspa_backups\c:\foo\bar\somefile.txt
      >
      > And now do the ':' to '/' replacement and you end up with:
      >
      > C:/Backup/Jasspa_backups/c//foo/bar/somefile.txt
      >
      > And the double '//' in the middle breaks everything. So changing all ':' to
      > '/' was perhaps not the smartest thing to do. I have changed this to a '.',
      > i.e. the above becomes:
      >
      > C:/Backup/Jasspa_backups/c./foo/bar/somefile.txt
      >
      > Which on windows has another interesting side effect as the path "c./" is the
      > same as "c/" (windows ignores the trailing '.') so this leads to the same thing
      > as your SUB rule.
      >
      > I have found a nasty problem with a relative MEBACKUPPATH while looking at
      > this problem, so I would recommend avoiding using a relative (e.g. "backup/")
      > value until it is patched.
      >
      > Talking of which I am hoping to create a patch soon, will let you all know
      > when it becomes available (and why didn't you find these issues in the RC
      > versions!!! Would have saved me a lot of hassle),
      >
      > Steve


      --
      Thomas Hundt
    • Steven Phillips
      Going back to your original drive for using this (a very bad windows crash) I have had a similar experience but with a disk drive crash. The outcome of this
      Message 2 of 9 , May 11 12:36 PM
      • 0 Attachment
        Going back to your original drive for using this (a very bad windows crash) I
        have had a similar experience but with a disk drive crash. The outcome of this
        was more a desire for a mirror path rather than an different backup location as
        after the crash I wanted the latest version of all files, not the previous
        one.

        I was therefore thinking of introducing a new $MEMIRRORPATH and $MEMIRRORSUB,
        which have the same behavior as the BACKUP ones. When a file is saved it is
        backed up and written out as normal and then if $MEMIRRORPATH is set it is
        also written to the MIRROR path (with no backup).

        If there is a general consensus that this would be useful then I will try to
        implement this feature.

        > You're right, I forgot the trailing slash in the MEBACKUPPATH. This is
        > very important. Also agreed that a relative backuppath is asking for
        > big trouble: What if you edit a file in the backup directory??

        A relative path should work and can be useful (for example setting
        MEBACKUPPATH to ".backup/" on unix puts all the backup files into a hidden
        directory, editing /tmp/foo.txt will be backed up to /tmp/.backup/foo.txt and
        if this is edited it will be backed up to /tmp/.backup/.backup/foo.txt etc).
        I need to fix this bug!

        > Also, another issue, the backup directories should be created with 700
        > permissions under Unix (and perhaps the equivalent under Windows). This
        > is in case an unwitting user loads your company file and your common
        > profile file with backups enabled and settings as above; all his data
        > might become world-readable by default in the backup dir. If he doesn't
        > know backups are being written and the directories are created by ME
        > automatically with 777 permission, he could leave himself wide open.

        And somebody that unaware could copy my .zshrc file which sets the umask to
        002 leaving their original files wide open. I think the user has to take the
        main responsibility for security as does the ME administrator for a sensible
        company file (which should make use of either the $home or $user-path ME
        variables which would make it equally applicable to all).

        Also if using an absolute backup path this directory must already exist in
        which case the user must have created the directory and ME should not change the
        permissions of a directory it has not created.

        Steve

        > Steven Phillips wrote:

        >> Funnily enough it does do exactly what the docs says it will do and thats the
        >> problem. For example, set MEBACKUPPATH = "C:\Backup\Jasspa_backups\" (added a
        >> trailing '\') and save "c:\foo\bar\somefile.txt", due to the MEBACKUPPATH
        >> setting the back file will be:
        >>
        >> C:\Backup\Jasspa_backups\c:\foo\bar\somefile.txt
        >>
        >> And now do the ':' to '/' replacement and you end up with:
        >>
        >> C:/Backup/Jasspa_backups/c//foo/bar/somefile.txt
        >>
        >> And the double '//' in the middle breaks everything. So changing all ':' to
        >> '/' was perhaps not the smartest thing to do. I have changed this to a '.',
        >> i.e. the above becomes:
        >>
        >> C:/Backup/Jasspa_backups/c./foo/bar/somefile.txt
        >>
        >> Which on windows has another interesting side effect as the path "c./" is the
        >> same as "c/" (windows ignores the trailing '.') so this leads to the same thing
        >> as your SUB rule.
        >>
        >> I have found a nasty problem with a relative MEBACKUPPATH while looking at
        >> this problem, so I would recommend avoiding using a relative (e.g. "backup/")
        >> value until it is patched.
        >>
        >> Talking of which I am hoping to create a patch soon, will let you all know
        >> when it becomes available (and why didn't you find these issues in the RC
        >> versions!!! Would have saved me a lot of hassle),
        >>
        >> Steve
      • first last
        Hi everyone, I have been playing around with rebinding the keys to make them CUA compliant (just like win/os2/kde and so on) and it seems to work alright for
        Message 3 of 9 , May 12 1:29 AM
        • 0 Attachment
          Hi everyone,

          I have been playing around with rebinding the keys to make them CUA
          compliant (just like win/os2/kde and so on) and it seems to work
          alright for most things, but when I get to C-c and C-x I get error
          messages. Is it possible to reassing those keys using macros or would
          it have to be done via the source?

          I know it is a bit of a weird idea to "de-emacs" the keybidings but I
          am spending a lot of time in CUA environments and I keep on doing the
          wrong thing, so I'd like to try to set them up the same (and windows
          does not allow you to change most of the key bindings).

          Any info will be welcome.

          Thanks

          Gabriel





          ____________________________________________________________
          Yahoo! Messenger - Communicate instantly..."Ping"
          your friends today! Download Messenger Now
          http://uk.messenger.yahoo.com/download/index.html
        • Jon Green
          A very sad thing to do, however... See prefix(2) in the on-line help. It will certainly de-emacs the system. To do this properly then the key bindings should
          Message 4 of 9 , May 12 1:51 AM
          • 0 Attachment
            A very sad thing to do, however...

            See prefix(2) in the on-line help.
            It will certainly de-emacs the system.
            To do this properly then the key bindings should
            be set up as an emulation mode.
            You might have a few problems with some of
            the macros.

            If you succeed then I know that there will
            be a few other people that would be interested
            in your results. For myself I type Emacs
            commands into Windows apps with disasterous
            effects - wish Windows would support
            Emacs key bindings not the other way around.

            If you progress to a point that it is feasible
            then you may need a little more help in trying
            to remove bindings made in the macros. We will
            need to consider how to address this issue in
            some more depth.

            Regards
            Jon.

            first last wrote:

            > Hi everyone,
            >
            > I have been playing around with rebinding the keys to make them CUA
            > compliant (just like win/os2/kde and so on) and it seems to work
            > alright for most things, but when I get to C-c and C-x I get error
            > messages. Is it possible to reassing those keys using macros or would
            > it have to be done via the source?
            >
            > I know it is a bit of a weird idea to "de-emacs" the keybidings but I
            > am spending a lot of time in CUA environments and I keep on doing the
            > wrong thing, so I'd like to try to set them up the same (and windows
            > does not allow you to change most of the key bindings).
            >
            > Any info will be welcome.
            >
            > Thanks
            >
            > Gabriel
          • Phillips, Steven
            The best starting point for this is the NEdit emulation, to create another emulation you need to: 1) Edit userstp.emf and add your new emulation to
            Message 5 of 9 , May 12 2:30 AM
            • 0 Attachment
              The best starting point for this is the NEdit emulation, to create another emulation you need to:

              1) Edit userstp.emf and add your new emulation to %emulate-names & %emulate-value variables.
              2) Create an 'me<emulate-name>.emf' (e.g. menedit.emf) macro file which does all the key rebindings AND sets up the buffer specific key binding by setting the .buffer-bind-key.map-from & .buffer-bind-key.map-to variables (without setting these all the file hooks (like hkc.emf) will try to bind 'C-c C-c' to comment-line etc which will go very wrong, NEdit maps this to C-b, see menedit.emf)
              3) Create an 'osd<emulate-name>.emf' (e.g. osdnedit.emf) which modifies the main menu (this should not change the main top level menu (i.e. 'File Edit Search...' but can change the rest, one of the main purposes for this is to correct the key bindings given with the menu item (e.g. Edit -> Copy claims to be bound to 'esc w' etc).

              The advantage of using the emulate interface is that it should work across different versions, the macro files get called at the right part of the initialisation process etc. which should mean less work for you.

              But this can be fairly tricky to get right, if you encounter problems then I suggest you email me directly and we'll work through the problems. As Jon suggests, I think a few users would be interested in this so if we cen get this working I'll put it into the main release.

              Steve

              -----Original Message-----
              From: Jon Green [mailto:jon@...]
              Sent: Wed 5/12/2004 4:51 AM
              To: jasspa@yahoogroups.com
              Cc:
              Subject: Re: [jasspa] Modifying key bindings
              A very sad thing to do, however...

              See prefix(2) in the on-line help.
              It will certainly de-emacs the system.
              To do this properly then the key bindings should
              be set up as an emulation mode.
              You might have a few problems with some of
              the macros.

              If you succeed then I know that there will
              be a few other people that would be interested
              in your results. For myself I type Emacs
              commands into Windows apps with disasterous
              effects - wish Windows would support
              Emacs key bindings not the other way around.

              If you progress to a point that it is feasible
              then you may need a little more help in trying
              to remove bindings made in the macros. We will
              need to consider how to address this issue in
              some more depth.

              Regards
              Jon.

              first last wrote:

              > Hi everyone,
              >
              > I have been playing around with rebinding the keys to make them CUA
              > compliant (just like win/os2/kde and so on) and it seems to work
              > alright for most things, but when I get to C-c and C-x I get error
              > messages. Is it possible to reassing those keys using macros or would
              > it have to be done via the source?
              >
              > I know it is a bit of a weird idea to "de-emacs" the keybidings but I
              > am spending a lot of time in CUA environments and I keep on doing the
              > wrong thing, so I'd like to try to set them up the same (and windows
              > does not allow you to change most of the key bindings).
              >
              > Any info will be welcome.
              >
              > Thanks
              >
              > Gabriel
            • first last
              I know it is a sad thing, I keep on C-a and C-e everywhere with some disastrous results (C-e in mysqlcc is execute SQL ), but if you can t get Mohammed to
              Message 6 of 9 , May 12 2:35 AM
              • 0 Attachment
                I know it is a sad thing, I keep on C-a and C-e everywhere with some
                disastrous results (C-e in mysqlcc is "execute SQL"), but if you can't
                get Mohammed to come to the Mountain....


                --- Jon Green <jon@...> wrote:
                ---------------------------------
                A very sad thing to do, however...

                See prefix(2) in the on-line help.
                It will certainly de-emacs the system.
                To do this properly then the key bindings should
                be set up as an emulation mode.
                You might have a few problems with some of
                the macros.

                If you succeed then I know that there will
                be a few other people that would be interested
                in your results. For myself I type Emacs
                commands into Windows apps with disasterous
                effects - wish Windows would support
                Emacs key bindings not the other way around.

                If you progress to a point that it is feasible
                then you may need a little more help in trying
                to remove bindings made in the macros. We will
                need to consider how to address this issue in
                some more depth.

                Regards
                Jon.

                first last wrote:

                > Hi everyone,
                >
                > I have been playing around with rebinding the keys to make them CUA
                > compliant (just like win/os2/kde and so on) and it seems to work
                > alright for most things, but when I get to C-c and C-x I get error
                > messages. Is it possible to reassing those keys using macros or would
                > it have to be done via the source?
                >
                > I know it is a bit of a weird idea to "de-emacs" the keybidings but I
                > am spending a lot of time in CUA environments and I keep on doing the
                > wrong thing, so I'd like to try to set them up the same (and windows
                > does not allow you to change most of the key bindings).
                >
                > Any info will be welcome.
                >
                > Thanks
                >
                > Gabriel




                __________________________________________________________________________

                This is an unmoderated list. JASSPA is not responsible for the content
                of
                any material posted to this list.

                To unsubscribe, send a mail message to

                mailto:jasspa-unsubscribe@yahoogroups.com

                or visit http://groups.yahoo.com/group/jasspa and
                modify your account settings manually.





                Yahoo! Groups Sponsor ADVERTISEMENT


                ---------------------------------
                Yahoo! Groups Links

                To visit your group on the web, go to:
                http://groups.yahoo.com/group/jasspa/

                To unsubscribe from this group, send an email to:
                jasspa-unsubscribe@yahoogroups.com

                Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.






                ____________________________________________________________
                Yahoo! Messenger - Communicate instantly..."Ping"
                your friends today! Download Messenger Now
                http://uk.messenger.yahoo.com/download/index.html
              • Thomas Hundt
                I would not find this useful. IMO, ME is the wrong tool for this. I would use rsync and cron to set up a mirroring strategy, instead. In fact this is
                Message 7 of 9 , May 12 11:38 AM
                • 0 Attachment
                  I would not find this useful. IMO, ME is the wrong tool for this. I
                  would use 'rsync' and 'cron' to set up a mirroring strategy, instead.
                  In fact this is what I'm going to implement very shortly to prevent the
                  problem I had when my Windows hung and ME wrote my file with zero length
                  the other day. (N.b. I don't necessarily need my files saved
                  up-to-the-minute; it's enough to have them up-to-the-day.)

                  -Th

                  Steven Phillips wrote:

                  > Going back to your original drive for using this (a very bad windows crash) I
                  > have had a similar experience but with a disk drive crash. The outcome of this
                  > was more a desire for a mirror path rather than an different backup location as
                  > after the crash I wanted the latest version of all files, not the previous
                  > one.
                  >
                  > I was therefore thinking of introducing a new $MEMIRRORPATH and $MEMIRRORSUB,
                  > which have the same behavior as the BACKUP ones. When a file is saved it is
                  > backed up and written out as normal and then if $MEMIRRORPATH is set it is
                  > also written to the MIRROR path (with no backup).
                  >
                  > If there is a general consensus that this would be useful then I will try to
                  > implement this feature.
                  >

                  --
                  Thomas Hundt
                Your message has been successfully submitted and would be delivered to recipients shortly.