Macro Variable Syntax Problem

Dumin, Nels nels.dumin at ti.com
Sat Aug 28 16:23:05 CEST 2004


> -----Original Message-----
> From: discuss-bounces at nedit.org 
> [mailto:discuss-bounces at nedit.org] On Behalf Of Thorsten Haude
> Sent: Saturday, August 28, 2004 01:09
> To: discuss at nedit.org
> Subject: Re: Macro Variable Syntax Problem
> 
> 
> Hi,
> 
> * Dumin, Nels wrote (2004-08-28 04:22):
> >  Error reading macro file Variable syntax
> >  /home/ndumin/share/nedit/expander/macros/system.nm: No 
> such file or 
> >directory
> >
> >Through experimentation, I found that hard-coding the full 
> path of the 
> >file in the load_macro_file statement works:
> >
> >  load_macro_file 
> > ("/home/ndumin/share/nedit/expander/macros/system.nm")
> 
> So the following would only work half?
>     
>
load_macro_file("/home/ndumin/share/nedit/expander/macros/system.nm")
>     load_macro_file($EXPANDER_MACRO_DIR "system.nm")

Correct.  Only the first line works.

> 
> What about this:
>     file = "/home/ndumin/share/nedit/expander/macros/system.nm"
>     load_macro_file(file)

It worked.

> 
> What is the result of this?
>     t_print("--" $EXPANDER_MACRO_DIR "system.nm" "--")

Aha!  The output is

  --Variable syntax
  /home/ndumin/share/nedit/expander/macros/system.nm--

I solved my problem by setting $HOME with the getenv function:

  #$HOME               = shell_command ("echo -n $HOME", "")
  $HOME               = getenv ("HOME")

Although my problem is solved, my underlying question remains the same:
Why did the old way suddenly stop working?  AFAIK, nothing changed -- it
just decided to stop working.

Thanks for you help!!!

> 
> 
> Thorsten
> -- 
> Scully: Do you have a theory?
> Mulder: I have plenty of theories.
> 



More information about the Discuss mailing list