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

[StrongED] 4.69a3: ModeWhen ~filetypes not working?

Something I've been meaning to report for a while here - not sure if
it's a known bug, I've been doing something wrong or somehow nobody else
has noticed.

I tend to view a lot of binary files in Dump mode, and this has drawn to
my attention the fact that StrongED is really very bad indeed at
recognising them as such.  With the exceptions of executable files, it
is far more common for a non-textual file to open in BaseMode than in

The Dump ModeWhen I'm using here is as follows:

Rules Exclude
> dfe, ** ; _texttest
> ffd, ** ; _texttest
> fff, **.Messages; _dummy

Rules Include
  dfe, **
! ff8, **
! ffa, **
! ffc, **
> ~f7c f7d ff3 ff8 ffa ffc, ** ; _dumptest

	_dummy		Any
	_dumptest	** ((~'\x09\x0a\x0d') Ctrl)
	_texttest	~_dumptest

This is, to the best of my recollection, derived from the default
ModeWhen, with the exception of the fact that I deliberately loosened
the scope of the _dumptest check from "at least four consecutive control
characters" or whatever it was to "any control characters at all".

Unfortunately it seems to be being completely ignored.

I've tried everything, up to and including extreme measures like
replacing the match name in the Include section with "_dummy", which
should in theory cause most or all files to open in Dump mode.  I think
any question about the correctness of my expression can be discarded -
I've replaced it with all manner of things until the only sensible
conclusion to draw is that it isn't being evaluated at all.

What *did* work, on the other hand, was this:

> *, ** ; _dumptest

Experimentation confirmed that a list of filetypes preceded by a ~
character currently appears to be non-functional.  I can get it to
accept any list of filetypes with the ~, but asking for every filetype
except even one just results in the line being ignored.  I tested this
with _dummy and could get it to load Obey files into Dump mode by
substituting the * with "feb", but "~feb" resolutely refused to
recognise, say, sprite files.

So, any thoughts about this?

  __<^>__   === RISC OS is a work of art.  Some people adore it,  ===
 / _   _ \  === others can't see the point of it, and it's really ===
( ( |_| ) ) === expensive.                                        ===
 \_>   <_/  ======================= Martin Bazley ===================

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