Topic: config(cm_e_undo,n) (1 of 16), Read 44 times
Conf: VEDIT Macro Library
From: Randy Kolb
Date: Friday, January 30, 2004 11:51 AM

I have a macro in a vdm file where I need to disable the undo feature. According to the manual (or my interpretation) if I place the command config(cm_e_undo,0)in my vdm file this should disable the warning message: Cannot Undo this operation! Proceed Anyway?

Still, after using this command, the macro will stop after the buffer gets filled and warn the user. I need this macro to operate without stopping for user interaction.

What am I doing wrong and/or is there another way to disable the Undo feature.

Thanks!

Randy

 


Topic: Re: config(cm_e_undo,n) (2 of 16), Read 34 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Friday, January 30, 2004 01:21 PM

At 06:52 AM 1/30/2004, you wrote:
>I have a macro in a vdm file where I need to disable the undo feature. According to the manual (or my interpretation) if I place the command config(cm_e_undo,0)in my vdm file this should disable the warning message: Cannot Undo this operation! Proceed Anyway?
>
>Still, after using this command, the macro will stop after the buffer gets filled and warn the user. I need this macro to operate without stopping for user interaction.

Randy:

If you run a macro from Visual Mode, e.g. with {MISC, Load/Execute macro}, Undo is normally enabled. However, I don't know why the Config() command is not having any effect.

However, if you run a macro while invoking VEDIT or from the COMMAND: prompt, the act of running a .VDM file or a Call() command automatically turns off the Undo.

Since a few other users have reported it, I will check it more carefully this weekend.

Ted.

 


Topic: Re: config(cm_e_undo,n) (3 of 16), Read 30 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Friday, February 13, 2004 05:42 PM

At 08:21 AM 1/30/2004, you wrote:
>I have a macro in a vdm file where I need to disable the undo feature. According to the manual (or my interpretation) if I place the command config(cm_e_undo,0)in my vdm file this should disable the warning message: Cannot Undo this operation! Proceed Anyway?
>
>Still, after using this command, the macro will stop after the buffer gets filled and warn the user. I need this macro to operate without stopping for user interaction.

Although I recall seeing this myself a long time ago, I cannot replicate it today. Here is what I tested.

1. Open a 300K file in VEDIT.
2. Place the following macro into text register 9:

config(cm_e_undo,0)
del_block(0,filesize)

3. From visual mode select {MISC, Execute macro} and enter "9".

With the config() command it empties the buffer; without the command it requests confirmation.

How are you running your macro, when VEDIT is invoked, from the COMMAND:
prompt or from visual mode?

Ted.

 


Topic: config(cm_e_undo,n) (4 of 16), Read 19 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Monday, March 15, 2004 05:20 AM

On 1/30/2004 11:51:49 AM, Randy Kolb wrote:
>I have a macro in a vdm file where I need to disable the
>undo feature. According to the manual (or my
>interpretation) if I place the command config(cm_e_undo,0)
>in my vdm file this should disable the warning message:
>Cannot Undo this operation! Proceed Anyway?

>Still, after using this command, the macro will stop after >the buffer gets filled and warn the user.

I'm now having this problem too.
Unfortunately it's in a big macro (of course).
I'll try to find an easy way for replication.

Christian

 


Topic: config(cm_e_undo,n) (5 of 16), Read 20 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Randy Kolb
Date: Monday, March 15, 2004 09:21 AM

The problem has been fairly consistent, although right after I reported it the problem went away for a brief period. The macro is opened in command mode, so the config command should be unnecessary, yet I've tried it with and without. I've attached a file we processed this past weekend along with the macro. I tried it on several different workstations, one with Windows 98, the others with Windows XP, all with a minimum of 256 mb of ram. The command line would be vpw -x ccinfo.vdm ccinfo.dat

 
macro

 


Topic: config(cm_e_undo,n) (6 of 16), Read 21 times
Conf: VEDIT Macro Library
From: Randy Kolb
Date: Monday, March 15, 2004 09:35 AM

I apologize, the data file I tried to upload is 150kb, the limit of an attachment is 100kb. I deleted 1/3 of the file to adhere to the 100kb limit, but unfortunately (or fortunately) after retesting the new smaller file, the problem goes away.

I'd be happy to Email my 150kb test file to Ted or anybody else that would like to take a look.

 


Topic: Re: config(cm_e_undo,n) (7 of 16), Read 21 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Monday, March 15, 2004 11:37 AM

At 09:35 AM 3/15/2004, you wrote:
>I apologize, the data file I tried to upload is 150kb, the limit of an attachment is 100kb. I deleted 1/3 of the file to adhere to the 100kb limit, but unfortunately (or fortunately) after retesting the new smaller file, the problem goes away.
>
>I'd be happy to Email my 150kb test file to Ted or anybody else that would like to take a look.

If you have the steps and sample file to replicate the unwanted Undo confirmation message, that would be most appreciated. I will fix it ASAP.

It is best to "zip" files so that email systems don't alter them. You can then send it to me at: ted@.... (We accept attachments up to 100 megs.)

Ted.

 


Topic: Re: config(cm_e_undo,n) (8 of 16), Read 21 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Randy Kolb
Date: Monday, March 15, 2004 12:45 PM

Hi Ted:

Thanks! I've included my macro file and my data file.

From a command line: vpw -x path\ccinfo.vdm path\ccinfo.dat

The macro will run until I receive the undo warning.

 
CCINFO.EXE (43KB)

 


Topic: Re: config(cm_e_undo,n) (9 of 16), Read 20 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Monday, March 15, 2004 01:18 PM

On 3/15/2004 12:45:49 PM, Randy Kolb wrote:

>I've included my macro file and my data file.
>The macro will run until I receive the undo warning.

FYI: I can confirm the undo warning here.


Randy, please don't post files here that seem to be an executable (as the file extension say)!
In this case it is in fact a Zip file, I know, but please name it .zip then!

There are tooo many viruses and worms on the road these days!

Christian

 


Topic: Re: config(cm_e_undo,n) (10 of 16), Read 26 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Monday, March 15, 2004 09:11 PM

At 12:46 PM 3/15/2004, you wrote:
>Thanks! I've included my macro file and my data file.
>>From a command line: vpw -x path\ccinfo.vdm path\ccinfo.dat
>The macro will run until I receive the undo warning.

The macro contained Do_Visual("\EL\") statements which technically are Visual Mode operations which (almost **) always have undo enabled.

Replacing these with "Del_Line()" makes the macro work properly without the Undo prompts. (Be sure the Del_Line() is preceded with BOL.)

** The undocumented command config(cm_e_undo,255) will completely disable undo, even in command mode.

Therefore, I still do not have an example of where the config(cm_e_undo,0) command fails.

Ted.

 


Topic: Re: config(cm_e_undo,n) (11 of 16), Read 33 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Tuesday, March 16, 2004 05:51 AM

On 3/15/2004 9:11:43 PM, Ted Green wrote:
>
>The macro contained Do_Visual("\EL\") statements
>which technically are Visual Mode operations which (almost
>**) always have undo enabled.
>** The undocumented command config(cm_e_undo,255) will
>completely disable undo, even in command mode.

So we again learned something new about VEDIT.

BTW: config(cm_e_undo,255) also disables some screen updates (e.g. deleting of lines). Funny.

It's a bit irritating that in the PDF docu there is only a Config(CM_E_UNDO) and in the online help only a Config(U_E_UNDO). I tried it with both: no success.

>Therefore, I still do not have an example of where the
>config(cm_e_undo,0) command fails.

I have. It's still a bit bigger than Randy's example, but after spending much time to strip it to the current point it would be nice if you (Ted) could try to replicate it with my macro. Then we will see...

Due to the size of the data file (it seems to also have to do with size) I'll send it via mail directly to you.

Christian

 


Topic: Re: config(cm_e_undo,n) (16 of 16), Read 12 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Friday, April 23, 2004 01:13 AM

At 06:51 AM 3/16/2004, you wrote:
>>Therefore, I still do not have an example of where the
>>config(cm_e_undo,0) command fails.

OK, I figured it out. Any type of Update() turned the Undo back on; some updates are automatic when macros are run from Visual Mode. I have fixed this so that following a Config(U_E_UNDO,0), the Undo stays off until you fully re-enter Visual Mode.

Another change (fix) - Config(U_E_UNDO,0) now disables the Undo confirmation prompt for all command macros, even if they are run from Visual Mode.

Between this fix and this change, I am confident that the unwanted "Cannot Undo, Proceed?" prompt is now fixed - It is less likely to appear and can be completely disabled with Config(U_E_UNDO,0).

>BTW: config(cm_e_undo,255) also disables some screen updates (e.g. deleting of lines). Funny.

Yes, I now see that Visual Mode will not update correctly if Undo is disabled. Therefore, I should probably keep the 255 value "undocumented".

Thank you everyone for your assistance with this.

I should have a new 6.12 available soon.

Ted.


Ted.
-------------------------------------------------------------------------
Ted Green (ted@...) Greenview Data, Inc.
Web: www.... PO Box 1586, Ann Arbor, MI 48106
Tel: (734) 996-1300 Fax: (734) 996-1308 VEDIT - Text/Data/Binary Editor
-------------------------------------------------------------------------
Spam problems? www.SpamStopsHere.com blocks 99% of spam for businesses.

 


Topic: Re: config(cm_e_undo,n) (12 of 16), Read 23 times
Conf: VEDIT Macro Library
From: Randy Kolb
Date: Tuesday, March 16, 2004 08:48 AM

Thanks Ted! Used the delete_line() command and it works great. This helps a bunch.

 


Topic: Re: config(cm_e_undo,n) (13 of 16), Read 21 times
Conf: VEDIT Macro Library
From: Ian Binnie
Date: Tuesday, March 16, 2004 07:38 PM

On 3/15/2004 9:11:43 PM, Ted Green wrote:
>
>** The undocumented command
>config(cm_e_undo,255) will
>completely disable undo, even
>in command mode.
>
>Therefore, I still do not have
>an example of where the
>config(cm_e_undo,0) command
>fails.
>
>Ted.
>
Ted,

You mentioned the config(cm_e_undo,0) command.
I have searched all the Vedit documentation and files, and can find little information about this.

The VEDIT 6.0 Macro Language Reference Manual mentions this in "Undo in Command Macros" and later on it states 'Command macro operations can only be undone if Config(CM_E_UNDO) is set to "1" or "2".'

I can find no information on what these values mean.

Config(CM), described in the on-line help does not work, and I could find no reference in vedit.cfg.

I did find the following under CHANGES FROM 4.22 TO 5.00 in an old whatsnew "Config(CM_E_UNDO) - Renamed to Config(U_E_UNDO)".

Searching for Config(U_E_UNDO) made things clearer. I can now see where the value is set in vedit.cfg, but still can't find what "1" or "2" actually do. Config(U) does work.


Incidentally the Macro Language Reference Manual states "The only reason to disable the Undo is to gain a little speed, ...". This is untrue, I want to stop my macros pausing and prompting the user "Cannot Undo this operation! Proceed Anyway?", and have discovered that this is how to do so.

 


Topic: Re: config(cm_e_undo,n) (15 of 16), Read 9 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Tuesday, April 20, 2004 04:16 PM

At 08:38 PM 3/16/2004, you wrote:
>The VEDIT 6.0 Macro Language Reference Manual mentions this in "Undo in Command Macros" and later on it states 'Command macro operations can only be undone if Config(CM_E_UNDO) is set to "1" or "2".'
>
>I did find the following under CHANGES FROM 4.22 TO 5.00 in an old whatsnew "Config(CM_E_UNDO) - Renamed to Config(U_E_UNDO)".

I have updated the master files for the Reference Manual to mention the correct "Config(U_E_UNDO)" parameter. However, it may be a while until the .PDF files get updated. Sorry for the confusion.

I have also improved the doco in the on-line help for this parameter.

Ted.

 


Topic: Re: config(cm_e_undo,n) (14 of 16), Read 17 times
Conf: VEDIT Macro Library
From: Ian Binnie
Date: Thursday, March 18, 2004 12:33 AM

On 3/15/2004 9:11:43 PM, Ted Green wrote:
>At 12:46 PM 3/15/2004, you
>wrote:

>Therefore, I still do not have
>an example of where the
>config(cm_e_undo,0) command
>fails.
>
I have also found a situation when delete causes Vedit to prompt "Cannot Undo this operation! Proceed Anyway?"

I have a file of length 1,491,220 bytes, and use Del_Block(...) to delete the block from 5,088 to 753,261.
(These are MIME files saved from Outlook, I am deleting attachments.)
The file is loaded in a buffer, and I am executing a test macro containing these commands in another buffer.
(The same occurs if I run the macro using Load/exec user macro.)

The macro commences with:-
#20=Config(U_E_UNDO, 0, LOCAL)

In fact the following test macro also causes the problem.
#20=Config(U_E_UNDO, 0, LOCAL) // Disable undo
Del_Block(5088, 753261)
Config(U_E_UNDO, #20, LOCAL)