[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Strange SA/NV behavior--BK is culprit



Reply to note from Paul Lagasse  Thu, 15 Oct
2009 19:18:55 -0400

> Harry Binswanger wrote:
>> Yes! The BK=1 is it.

Interesting. I had no idea there was any problem with BK=1, because
I've never used it. I don't like having all those .BAK files
scattered everywhere.

> I ended up writing SA.PM to mimic "SA with bk=1" when bk is in
> fact set to 0.

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.

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5sa}} SAve current file and make backup copy in {<}VADR{>}
 [CLD][cr|lf]{002}{<}IF{<}VA$WS{>}==1{>}{<}SX01,0{>}[GT_]{<}S
V02,{>}{<}GT02{>}{<}SX02,{<}VA$FI{>}{>}{<}SV03,{>}{<}IF"["{23
8}{<}IS02{>}==0{>}{<}SX02,{<}VA@02[;2{>}{>}{<}SV03,!{>}{<}EI{
{062}}{<}IF{<}IS02{>}{240}"]"{>}{<}SX02,{<}VA@02]1{>}{>}{<}SV03,!
{>}{<}EI{>}{<}IF{<}IS02{>}=="UNTITLED"{>}{<}SX02,{<}VA$WN{>}{
{062}}{<}SX02,"UNTITLED."+{<}IS02{>}{>}{<}EI{>}{<}SX02,{<}VADR{>}
+{<}IS02{>}{>}{<}IF{<}VA|50{>}>0!{<}VA|03{>}<1{>}[BX_]sa{<}IF
{<}VA|50{>}>0{>} {<}PV50{>}{<}EI{>}[Q2_]{<}IF{<}ER{>}{>}{<}SX
01,{<}VA$ER{>}{>}{<}EI{>}[BX_]wt[Q2_]{<}EI{>}{<}SX03,{<}VABK{
{062}}{>}{<}IF{<}PV03{>}>0{>}[BX_]d bk=0[Q2_]{<}EI{>}{<}IF{<}IS02
{>}<>{<}VA$FP{>}{>}[BX_]sa/nv {<}PV02{>}[Q2_]{<}IF{<}ER{>}&{<
}PV01{>}<1{>}{<}SX01,{<}VA$ER{>}{>}{<}EI{>}[BX_]wt[Q2_]{<}EI{
{062}}{<}IF{<}PV03{>}>0{>}[BX_]d bk=1[Q2_]{<}EI{>}{<}IF{<}PV01{>}
{062}0{>}{<}PR\@01{>}{<}EX{>}{<}EI{>}{<}PRSaved{>}{<}EX{>}{<}EI{>
}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE

--
Carl Distefano
cld@xxxxxxxx