Nedit session
A.V.Kuznetsov
kuzn at umps.mephi.ru
Mon May 28 14:45:36 CEST 2007
Hi,
> * A.V.Kuznetsov wrote (2007-05-21 14:11):
> >The package can be downloaded from Niki's Macro Collection or
> >directly from
> >ftp://194.67.66.164/nedit/nesession_1.tar.gz
>
> Why don't you put the macros on Niki? That way people could contribute
> a lot easier if they want to.
Tarball contains five files, I put them together to simplify downloading
and added link to Niki's Macro Collection.
> >I found incompleteness of NEdit macro language.
> >
> >There is the $read_only system variable.
> >It state can not be changed using a macro, as a result,
> >read-only status of buffers is lost when you open saved sessions.
> >Seems the macro set_read_only() must be added to the
> >Window Preferences Actions.
>
> I think $read_only is for files that are actually read-only, so this
> is not supposed to work from within NEdit. May you are looking for
> $locked and set_locked().
You are right, $read_only value must not be changed from within NEdit:
$read_only is for checking of file status,
$locked is for checking of window status.
Try simple macro
set_locked(!$locked)
dialog("read_only="$read_only " locked="$locked, "Close")
set_locked() changes values of both $read_only and $locked.
Seems, that is incorrect.
If file is actually read-only, both $read_only and $locked
are equal to unity and can not be changed till then you "SaveAs" window.
When file is not actually read-only and window is locked,
zero value of $read_only must not be changed(?).
> >There is the $match_syntax_based system variable which is
> >undefined in general case. If one try to check it value,
> >error breaks macro execution, as result, the value can not
> >be saved. At the same time, action set_match_syntax_based()
> >exists. Seems that $match_syntax_based must be defined in
> >any case, but it value can be 0 or 1 or "undefined".
> >
> >Should I make a bug report?
>
> Please do, $match_syntax_based is only mentioned in the help.
Well, I do that soon.
Alexey
More information about the Discuss
mailing list