[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[StrongED] Re: ModeWhen - News



In article <f33f60a656.fjgraute@xxxxxxxxx>,
   Fred Graute <fjgraute@xxxxxxxxx> wrote:
> In message <56a631c3aeLists@xxxxxxxxxxx>
>           "Richard Torrens (lists)" <Lists@xxxxxxxxxxx> wrote:

[Snip]

> If they have a "From:" line then I'd guess that they are not text files.
> In that case you'd have to add the filetype to the ModeWhen file.

They are all most certainly text files. 

I've put some examples at
http://diy.torrens.org/temp/

> > They usually open in BaseMode.
> > 
> > The News Modewhen includes the lines
> > -------------
> > #	Use newsmode if there is a line starting with "From:"
> > 
> > Match
> > 	_newstest	** ( < "From:")
> > End
> > -------------
> > 
> > Long ago I put in an extra bit
> > 
> > 	_newstest	** ( < "#! rmail")

> I'm a little confused by this. Are you saying that you have 2 _newstest
> expressions in the same ModeWhen file?

Yes. In 
!StrED_cfg.UserPrefs.Modes.News.ModeWhen
I have exactly that:

Match
	_newstest	** ( < "From:")
	_newstest	** ( < "#! rmail")
End

this causes Hewmes spooled incoming mail to open in News Mode but does
nothing for the server-saves emails as they don't contain the start flag.

> Each expression in the Match section has to have a unique name otherwise
> things won't work correctly.

I put the second line in way, way back it's in a file dated 2011. A search
of the archives reveals I asked about News ModeWhen then. 

That 2011 file also has 
	_newstest	** ( < "Envelope-to")

So the #! rmail test works even with 3 tests here. 

> If the files are in specific directories on the server then you can set
> up rules that match to those exact directories.

That was my other thought - but I thought first to enquire why the
supplied test did not work.

<All the saved files get downloaded to
Transient$TodayDir>.Spam.mail

Buy of course if I look at a file not today, ideally it should open
properly as News too. 


I presume ModeWhen files are searched first and if no match occurs,
BaseMode is used?

-- 
Richard Torrens.
http://www.Torrens.org for genealogy, natural history, wild food, walks, cats
and more!

-- 
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives at http://www.Torrens.org/RO/StrongED/index.html