Topic: Question about the STARTUP.VDM file. (1 of 21), Read 97 times
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Tuesday, October 15, 2002 07:57 PM

Hi,

Do I understand it correctly: ...startup.vdm optionally loads the ustartup.vdm file....

I need some help in doing that.

Thanks,

-peter.

 


Topic: Re: Question about the STARTUP.VDM file. (2 of 21), Read 103 times
Conf: VEDIT Macro Language Support
From: Ted Green
Date: Tuesday, October 15, 2002 08:56 PM

At 07:58 PM 10/15/2002, you wrote:
>Do I understand it correctly: ...startup.vdm optionally loads the ustartup.vdm file....
>I need some help in doing that.

Assuming you have an unmodified startup.vdm, you only need to
enable {CONFIG, Misc, Enable Ustartup.vdm}.

 


Topic: Re: Question about the STARTUP.VDM file. (3 of 21), Read 105 times
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Tuesday, October 15, 2002 10:41 PM

On 10/15/2002 8:56:56 PM, Ted Green wrote:
>Assuming you have an
>unmodified startup.vdm, you
>only need to
>enable {CONFIG, Misc, Enable
>Ustartup.vdm}.

Thanks Ted,

Yes, I do have an unmodified startup.vdm.
So, as per your suggestion I shall do the
enabling. Also, as per your previous suggestion
I shall edit the ustartup.vdm file.

Incidentally, I also have a modified startup.vdm
file. However, I have renamed it. I like the syntax highlighting feature very much! In fact, I have a wishlist item as well: I would like to load a user menu according to the file extension. I just do not know whether this would require a major enhancement or a straightforward adaptation?

Thanks again,

-peter.

 


Topic: Re: Question about the STARTUP.VDM file. (4 of 21), Read 101 times
Conf: VEDIT Macro Language Support
From: Ted Green
Date: Tuesday, October 15, 2002 11:21 PM

At 10:42 PM 10/15/2002, you wrote:
>In fact, I have a wishlist item as well: I would like to load a user menu according to the file extension. I just do not know whether this would require a major enhancement or a straightforward adaptation?

This could be done with the Buffer-switch event macro. In other words, as you switch from file to file, the most appropriate User or Tools menu would be loaded. We have not implemented it and do not have sample code.

Also, 6.03 did not run the Buffer-switch event macro if you switched files by clicking in windows; this has been fixed for 6.04.

Ted.

 


Topic: Re: Question about the STARTUP.VDM file. (5 of 21), Read 103 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Wednesday, October 16, 2002 01:59 PM

On Tue, 15 Oct 2002 22:42:31 -0400, Peter Rejto wrote:

>I like the syntax highlighting feature very much! In fact, I have a
>wishlist item as well: I would like to load a user menu according
>to the file extension. I just do not know whether this would require
>a major enhancement or a straightforward adaptation?

Peter:

in the discussion 'vedit-macros' in the
topic: 'LOADMNU.VDM: Easy maintaining + loading MNU files'
(Date: Fri, 22 Mar 2002)

we already talked about that. Wouldn't that help?

O.k. it doesn't load another mnu file when you switch to another
already loaded buffer/file that way. But it's a beginning.

So you only have to adapt similar code into the Buffer-switch event
macro (as Ted wrote yesterday) to add this feature too.


Christian

 


Topic: Re: Question about the STARTUP.VDM file. (6 of 21), Read 101 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Wednesday, October 16, 2002 04:06 PM

Peter, here a simple(r) solution.

You can use it as prototype.
Of course you have to adapt it to your needs.


Just add someting like that to the appropriate .cft file
(e.g. java.cft):

if ( File_Exist("|(HOME)/java-sdk.mnu",NOERR) ) {
Reg_Load(124,"|(HOME)/java-sdk.mnu",EXTRA)
Config_String(USER_MENU,"Java&Tools")
}


Then use a macro like the following (perhaps executed via
USTARTUP.VDM) to fill the Buffer-switch event macro:

Reg_Set(114,`//Buffer Switch event macro
Reg_Set(120,EXT_ONLY)
if ( Reg_Compare(120, "vdm") == 0) {
if ( File_Exist("|(HOME)/vedit.mnu",NOERR) ) {
Reg_Load(124,"|(HOME)/vedit.mnu",EXTRA)
Config_String(USER_MENU,"Vedit&Tools")
}
} else {
if ( Reg_Compare(120, "java") == 0) {
if ( File_Exist("|(HOME)/java-sdk.mnu",NOERR) ) {
Reg_Load(124,"|(HOME)/java-sdk.mnu",EXTRA)
Config_String(USER_MENU,"Java&Tools")
}
}}
`) //End of the Reg_Set(114,... command above



That should do the trick.

Christian

 


Topic: Re: Question about the STARTUP.VDM file. (7 of 21), Read 106 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Wednesday, October 16, 2002 04:27 PM

PS:

The only disadvantage of using the cft file(s) here is:

A Vedit update installation and every {Config, File-open-config, Save
filename extension config} would delete your manual modification out
of the cft file.
That has been the reason for my more difficult version from March.
Both versions are not perfect and require some manual actions but they
are working.

So you can decide by yourself...

And perhaps you or someone else will have ideas for a better
implementation.


Christian

 


Topic: Re: Question about the STARTUP.VDM file. (8 of 21), Read 111 times
Conf: VEDIT Macro Language Support
From: Ian Binnie
Date: Thursday, October 17, 2002 12:14 AM

On 10/16/2002 4:27:17 PM, Christian Ziemski wrote:
>PS:
>
>A Vedit update installation
>would delete your manual
>modification out
>of the cft file.

I have been using customised CFT since they were introduced, and have never lost one.

Unless I am much mistaken cft are only created/updated at user request.

(syn files, on the other hand, are updated)

 


Topic: Re: Question about the STARTUP.VDM file. (9 of 21), Read 111 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Thursday, October 17, 2002 07:14 AM

On 10/17/2002 12:14:39 AM, Ian Binnie wrote:
>
>I have been using customised CFT since they were
>introduced, and have never lost one.
>
>Unless I am much mistaken cft are only
>created/updated at user request.


A VEDIT update preserves the cft files usually.
But there are two conditions where VEDIT overwrites them:

1.) If you answer with NO to:
'Transfer the configuration from a previous VEDIT?'

2.) If you have deleted C.CFT from that directory.

Quote from the installw.vdm:

if (#87=='N' || !File_Exist("file-cfg\c.cft",NOERR)) {
Message("\nExpanding the File-open configuration files...")
Chdir("|@(2)\file-cfg")
Cab_Extract("|@(1)\vp-cft.cab",OK) //Expand VP-CFT.CAB
}

Christian

 


Topic: Re: Question about the STARTUP.VDM file. (11 of 21), Read 107 times
Conf: VEDIT Macro Language Support
From: Ted Green
Date: Thursday, October 17, 2002 03:24 PM

At 07:14 AM 10/17/2002, you wrote:
>Quote from the installw.vdm:
>

>if (#87=='N' || !File_Exist("file-cfg\c.cft",NOERR)) {
> Message("\nExpanding the File-open configuration files...")
> Chdir("|@(2)\file-cfg")
> Cab_Extract("|@(1)\vp-cft.cab",OK) //Expand VP-CFT.CAB
>}


Christian's comments are correct.

If you transfer your configuration, VEDIT does not overwrite your existing .CFT file. The test for c.cft is needed when updating from a very old version of VEDIT.

In general, any questions about how the installation works can be resolved by examining the installw.vdm macro. It is a lengthy macro, but it is not overly difficult to understand.

Ted.

 


Topic: Re: Question about the STARTUP.VDM file. (12 of 21), Read 91 times
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Saturday, October 19, 2002 01:13 PM

On 10/16/2002 4:06:51 PM, Christian Ziemski wrote:
>Peter, here a simple(r)
>solution.
>
>You can use it as prototype.
..>
>Just add something like that to
>the appropriate .cft file
...>
>
>Then use a macro like the
>following (perhaps executed
>via
>USTARTUP.VDM) to fill the
>Buffer-switch event macro:
>
>Reg_Set(114,`//Buffer Switch
>event macro
>Reg_Set(120,EXT_ONLY)
>if ( Reg_Compare(120, "vdm")
>== 0) {
>if (
>File_Exist("|(HOME)/vedit.mnu"
>,NOERR) ) {
>Reg_Load(124,"|(HOME)/vedit.mn
>u",EXTRA)
>Config_String(USER_MENU,"Vedit
>&Tools")
> }
>} else {
>if ( Reg_Compare(120, "java")
>== 0) {
>if (
>File_Exist("|(HOME)/java-sdk.m
>nu",NOERR) ) {
>Reg_Load(124,"|(HOME)/java-sdk
>.mnu",EXTRA)
>Config_String(USER_MENU,"Java&
>Tools")
> }
>}}
>`) //End of the
>Reg_Set(114,... command above
>
>
>
>That should do the trick.
>
Thanks Chrtistian,

It sure does the trick!
Since you sent me a prototype, let me tell you and other vedit users, how I filled in the details:

1. I have replaced your Text Register 114 by 115. Note that at present I am not ready to change buffers.

2. I am running your "file open event macro" from STARTUP.VDM
instead of the suggested USTRATUP.VDM file. More specifically, I have commented out Ted's macro and replaced it with yours. Then, I have renamed the file to PR_TEST.VDM and created a new Vedit icon with this name. I am running vedit from this icon with the -iPR_TEST.VDM invocation option.

3. I also did the editing of my tex.cft file, however this had no affect on the end result. So, I went back to the original version.

4. Now that I have "isolated" your "file open event macro"
I would like to combine it with Ted's. In other words, opening a .tex file I would like to have both the automatic syntax highlighting and the automatic menu loading.
I know that this is a very simple question to ask, but I thought to do it anyway. Just to convince other users that the automatic menu loading is a simple and useful question.

Thanks again,

-peter.

 


Topic: Re: Question about the STARTUP.VDM file. (13 of 21), Read 84 times
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Saturday, October 19, 2002 03:13 PM

PS:

Christian,

I did some more experiments. I could combine Ted's file open event macro with yours. So, now I have both automatic syntax highlighting and automatic menu loading for my .tex files.

Here are the details: Before closing Ted's macro, I ahve deleted your Set_Reg(115,' ) and added Reg_Empty(120).
This seems to work for me. It certainly is remarkably simple.

Now I would like to come back to the question USTARTUP.VDM versus STARTUP.VDM. This is a minor point, but I spent a lot of time with experimentation. In the meantime I learned to respect the vedit configuration files! This is why I would prefer to do all my vedit configurations in the USTARTUP.VDM file, as per Ted's suggestion. However, I could not load a user menu from this file. I would like to know, whether there is an intrinsic reason for this, or simply I could not do it.

Looking forward to hearing from other vedit users.

Thanks again,

-peter.

 


Topic: Re: Question about the STARTUP.VDM file. (14 of 21), Read 68 times
Conf: VEDIT Macro Language Support
From: Ted Green
Date: Tuesday, October 22, 2002 11:29 AM

At 03:13 PM 10/19/2002, you wrote:
>This is why I would prefer to do all my vedit configurations in the USTARTUP.VDM file, as per Ted's suggestion. However, I could not load a user menu from this file. I would like to know, whether there is an intrinsic reason for this, or simply I could not do it.

You should be able to load the .MNU files from the USTARTUP.VDM file.

You can debug the startup process by placing commands such as the following into the startup.vdm, ustartup.vdm and vedit.cfg files:

Get_Key("Now in ustartup.vdm file...")
Get_Key("Now loading the User menu...")
Get_Key("Now in vedit.cfg file...")

This should help you debug your problem.
You could even place a "?" as the first line of the startup.vdm file and then single-step through the entire startup process.

Ted.

 


Topic: Re: Question about the STARTUP.VDM file. (15 of 21), Read 68 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Tuesday, October 22, 2002 03:02 PM

On Tue, 22 Oct 2002 11:31:04 -0400, Ted wrote:

>At 03:13 PM 10/19/2002, Peter wrote:
>>This is why I would prefer to do all my vedit configurations in the =USTARTUP.VDM file, as per Ted's suggestion. However, I could not load a =user menu from this file. I would like to know, whether there is an =intrinsic reason for this, or simply I could not do it.
>
>You should be able to load the .MNU files from the USTARTUP.VDM file.
>[...]

Yes, that's possible. But:

The problem is that STARTUP.VDM executes the USTARTUP.VDM _before_ it
loads the User and Tools menus itself (dependent on name and
configuration, o.k.). And the latter wins...

So sometimes the user can think, his menu-loading in USTARTUP.VDM
fails.


Christian

 


Topic: Re: Question about the STARTUP.VDM file. (16 of 21), Read 70 times
Conf: VEDIT Macro Language Support
From: Ted Green
Date: Wednesday, October 23, 2002 07:24 PM

At 03:02 PM 10/22/2002, you wrote:
>The problem is that STARTUP.VDM executes the USTARTUP.VDM _before_ it
>loads the User and Tools menus itself (dependent on name and
>configuration, o.k.). And the latter wins...

Good point; you are correct. It would be necessary to modify the STARTUP.VDM file and I highly discourage that because it will be overwritten by updates.

A possible solution would be to set the default name of the USER.MNU and TOOLS.MNU in text registers at the beginning of STARTUP.VDM. Then USTARTUP.VDM could change them as needed. Or if USTARTUP.VDM loads them directly, it could empty the text registers.

Ted.

 


Topic: Re: Question about the STARTUP.VDM file. (17 of 21), Read 72 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Thursday, October 24, 2002 02:46 PM

On Wed, 23 Oct 2002 19:27:08 -0400, you wrote:

>At 03:02 PM 10/22/2002, you wrote:
>>The problem is that STARTUP.VDM executes the USTARTUP.VDM _before_ it
>>loads the User and Tools menus itself (dependent on name and
>>configuration, o.k.). And the latter wins...
>
>Good point; you are correct. It would be necessary to modify the =STARTUP.VDM file and I highly discourage that because it will be =overwritten by updates.
>
>A possible solution would be to set the default name of the USER.MNU and= TOOLS.MNU in text registers at the beginning of STARTUP.VDM. Then =USTARTUP.VDM could change them as needed. Or if USTARTUP.VDM loads them =directly, it could empty the text registers.


What about that:

Change the sequence in STARTUP.VDM from

1.) Execute USTARTUP.VDM
2.) Load USER.MNU
3.) Load TOOLS.MNU (dependent on Config(U_TOOLS_MENU,..) from USTARTUP)

to

1.) Load USER.MNU (as default)
2.) Execute USTARTUP.VDM
3.) Load TOOLS.MNU (dependent on Config(U_TOOLS_MENU,..) from USTARTUP)

This way the user can add a custom USER.MNU loading routine to
USTARTUP.VDM which will overwrite the already loaded default.

And the user can add a custom TOOLS.MNU loading also.
Additionally the entry
// Config(U_TOOLS_MENU,2) //Load {TOOLS} menu with Compiler support
has to be activated and changed to Config(U_TOOLS_MENU,0) which
disables the later following TOOLS.MNU routine from STARTUP.VDM.


Christian

 


Topic: Re: Question about the STARTUP.VDM file. (18 of 21), Read 48 times
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Tuesday, February 04, 2003 10:41 AM

>
>What about that:
>
>Change the sequence in STARTUP.VDM from
>
>1.) Execute USTARTUP.VDM
>2.) Load USER.MNU
>3.) Load TOOLS.MNU (dependent on
>Config(U_TOOLS_MENU,..) from USTARTUP)
>
>to
>
>1.) Load USER.MNU (as default)
>2.) Execute USTARTUP.VDM
>3.) Load TOOLS.MNU (dependent on
>Config(U_TOOLS_MENU,..) from USTARTUP)
>
>This way the user can add a custom
>USER.MNU loading routine to
>USTARTUP.VDM which will overwrite the
>already loaded default.
>
>And the user can add a custom TOOLS.MNU
>loading also.
>Additionally the entry
>// Config(U_TOOLS_MENU,2) //Load {TOOLS}
>menu with Compiler support
>has to be activated and changed to
>Config(U_TOOLS_MENU,0) which
>disables the later following TOOLS.MNU
>routine from STARTUP.VDM.
>
>
>Christian
>

Thanks Christian,

I took up your suggestion and did edit my STARTUP.VDM file. Specifically I have re ordered the 3 items that you have mentioned. It turned out that I followed your suggestion essentially, but not exactly. Here are the details:

1. Load {user} menu as per STARTUP.VDM file.
2. Load {tools} menu as per STARTUP.VDM file.
3. Execute USTARTUP.VDM as per STARTUP.VDM file.

This seems to work like a charm for me!

Since Ted has emphasized that the installation program overwrites the STARTUP.VDM file in the Vedit Home Directory, I have moved my edited version of this file to the user-macro directory.

Now let me give you a more detailed progress report: I have edited my USTARTUP.VD file and used it to load my {utility} menu instead of the original {user} menu. I left the {tools} menu untouched. I ended up with Vedit's original {tools} menu
and with my {utility} menu.

Of course, what kills you, is the infinite number of possibilities. I do have an uneasy feeling that I am overlooking something. So, Professors Ted and Christian I would really appreciate your verifying that what I did was OK.
(Contingent on the fact that it makes sense.)

-peter.

 


Topic: Re: Question about the STARTUP.VDM file. (19 of 21), Read 45 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Tuesday, February 04, 2003 04:26 PM

Peter:

The part you quoted from my message has been a reply to Ted with a
suggestion for the standard STARTUP.VDM.

It wasn't intended for individual use due to the upgrade problem.

But it's nice that it works for you.


Christian

 


Topic: Re: Question about the STARTUP.VDM file. (20 of 21), Read 44 times
Conf: VEDIT Macro Language Support
From: Ted Green
Date: Tuesday, February 04, 2003 04:43 PM

At 10:41 AM 2/4/2003, you wrote:
>>Change the sequence in STARTUP.VDM from
>>
>>1.) Execute USTARTUP.VDM
>>2.) Load USER.MNU
>>3.) Load TOOLS.MNU (dependent on
>>Config(U_TOOLS_MENU,..) from USTARTUP)
>>
>>to
>>
>>1.) Load USER.MNU (as default)
>>2.) Execute USTARTUP.VDM
>>3.) Load TOOLS.MNU (dependent on
>>Config(U_TOOLS_MENU,..) from USTARTUP)

I don't like the idea of loading the {USER} menu twice.

Therefore, I just now designed a method by which the files and names
for the {USER} and {TOOLS} menus can be specified in the USTARTUP.VDM
file. It will be in the VEDIT 6.1 release.

Thank you for reminding me, just in time for 6.1.

Ted.

 


Topic: Re: Question about the STARTUP.VDM file. (21 of 21), Read 35 times
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Friday, February 14, 2003 10:25 AM

On 2/4/2003 4:43:12 PM, Ted Green wrote:
>At 10:41 AM 2/4/2003, you
>wrote:
>
>Therefore, I just now designed
>a method by which the files
>and names
>for the {USER} and {TOOLS}
>menus can be specified in the
>USTARTUP.VDM
>file. It will be in the VEDIT
>6.1 release.
>
>Thank you for reminding me,
>just in time for 6.1.
>


Thanks Ted,

I tried it and it works very nicely for me! In other words the Version 6.10.1 USTARTUP.VDM macro allows me to load my customized {User} and {Toll} menus by editing this file.

I also find the concept behind this macro very simple: Text Register. Since one of the special features of Vedit is the 100 or so Text registers, it is natural that Vedit uses Text registers to do this task. Well, I spoke too soon. I did not study that many word processors. All that I was doing was to look for text registers in XEMACS and could not find any.

I hope that other Vedit users will find the {User} and {Tools}menu sections of the 6.10.1 USTART.VDM macro useful.

-peter.

 


Topic: Re: Question about the STARTUP.VDM file. (10 of 21), Read 95 times
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Thursday, October 17, 2002 12:56 PM

On 10/16/2002 1:59:17 PM, Christian Ziemski wrote:

>Peter:
>
>in the discussion 'vedit-macros' in the
>topic: 'LOADMNU.VDM: Easy maintaining +
>loading MNU files'
>(Date: Fri, 22 Mar 2002)
>
>we already talked about that. Wouldn't
>that help?
>

Yes, it does help, in fact, it answers my question!
I do have that file in my "yellow vedit directory", that is to say in the directory before the changeover. This is one of the files which got lost during the changeover.

Since it is a wonderful tutorial on .FCT files could you post it again for the benefit of other Vedit users?

Well, now I have to go back and do some some Home Work on your LOADMN.VDM.


>O.k. it doesn't load another mnu file
>when you switch to another
>already loaded buffer/file that way. But
>it's a beginning.

In fact, at present, I am only interested in the special case of not switching between files.
>
>So you only have to adapt similar code
>into the Buffer-switch event
>macro (as Ted wrote yesterday) to add
>this feature too.
>
I thought to wait with the Buffer-switch event macro until Ted puts out Vedit 6.04.

Thanks again, and I am really looking forward to your
.FCT tutorial.

-peter.