[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Strange SA/NV behavior--BK is culprit
- Subject: Re: Strange SA/NV behavior--BK is culprit
- From: Paul Lagasse pglagasse@xxxxxxxx
- Date: Fri, 16 Oct 2009 07:22:31 -0400
Carl Distefano wrote:
So, the program saves a second copy of the file with a .BAK extension?
That's a workaround. It would be even better, IMO, if it saved all
.BAK files to a single directory.
What I do in my personal Save command is to make a second copy of
the file -- with an intact filename, not mangled with the .BAK
extension -- in a dedicated backup directory. Here's a U2 routine
that makes the backup copy in the temp file directory. Of
course, it can be modified to make the backup in any directory. This
works around all the bugs and limitations you mention, including
BK=1. It handles Untitled files, too.
I wrote SA.PM because I wanted BAKs in a bk=0 environment -- as I worked
in Dosemu in Linux, I realized that bk=0 plus a SA.PM would be better
than using bk=1 because of a number of issues with XY4's "SA plus bk=1."
SA.PM's limitations aren't really issues for me, though they might be
for someone else. When SA.PM chokes on an untitled file, that's usually
fine -- I need to name something before I save it; I have had occasional
data loss, but I'm much more likely to lose data by aborting an existing
file I've modified. I have multiple files with the same name, in
different directories, so forcing backups to one directory could
eradicate other backups -- in other circumstances this would be an
excellent approach. And the BAK extension isn't a significant issue,
since my file extensions are fairly uniform, and when they are not, the
filenames are often pretty unique. there is indeed clutter at times, but
then you haven't seen my office.
FWIW, my workaround --
XPLeNCODE v2.0←
b-gin [UNTITLED]←
{<}IF{<}VA$MO{>}==0{>}{<}PRUnmodified, not saved{>}{<}EX{>}{<←
}EI{>}{<}SX01,{<}VA$FP{>}{>}[BX_]exist {<}PV01{>}[Q2_]{<}IF@N←
OT({<}ER{>}){>}{<}GLb{>}{<}EI{>}{<}LBa{>}[BX_]sa[Q2_]{<}IF{<}←
ER{>}{>}{<}EX{>}{<}EI{>}{<}PRFile saved{>}{<}EX{>}{<}LBb{>}{<←
}SX02,{<}VA$FI{>}{>}{<}SV03,.{>}{<}XS01,02,04,,05{>}{<}IF{<}I←
S03{>}{238}{<}IS02{>}==-1{>}{<}SX06,{<}VA$FI{>}{>}{<}GLc{>}{<←
}EI{>}{<}XS02,03,06,,05{>}{<}LBc{>}[BX_]copy/nv {<}PV01{>} {<←
}PV04{>}{<}PV06{>}.bak[Q2_]{<}EI{>}{<}GLa{>}[cr|lf][cr|lf]SA.←
PM[cr|lf][cr|lf]For use with Dosemu in Linux. Emulates Xy4 "s←
ave" under bk=1 while preserving bk=0 as the system setting b←
y copying the open file to filename.bak. Will not save an unm←
odified file (which "save" will do by default under Dosemu).{032}←
Long filenames are preserved in the save (orig. file only, no←
t backup copy). Checks to see if the file exists before savin←
g and does not create a backup copy if it doesn't exist. Then←
checks to see if the file has an extension, and handles the{032}←
file differently depending.[cr|lf][cr|lf]01 Filename and path←
of file open in current window[cr|lf]02 Filename only (no pa←
th)[cr|lf]03 Period (.), marker for filename extension[cr|lf]←
04 Path minus filename[cr|lf]05 XS trash[cr|lf]06 Filename mi←
nus extension[cr|lf]←
-nd←
XPLeNCODE←
pl