PreviousNextTracker indexSee it online !

(18/231) 1540576 - Don't take invalid BLPs into account

The process of reading and evaluating buffer local
properties should only take these into account, that
are valid (all, and only these, that are mentioned
in "Chapter 7 -> Buffer-Local Properties") and ignore
all remaining, or maybe even better show a warning
message to the user which properties are ignored. e.
g. the encoding property which is in no means a valid
BLP is read and the encoding of the buffer is set to
that encoding for next save operation. But it is not
(and cannot) used for opening a document in the
mentioned encoding. This confused me in the beginning
and it confuses many other users too, that it "seems"
to be evaluated but in fact is only used partly how
you expect it. It is better if it is ignored and so
causes less confusion and it is even better if the
user gets a warning dialog that tells him, that the
BLP is not valid, maybe with a link to the
documentation of BLPs, so the user can instantly see
that he is fatally wrong. This validity check could
e. g. be made when opening a document AND right
before saving a document.

Sorry if this is a dupe, but I have many bugs to post
and am too lazy to check them all for dupes
currently. :-)

OS: Windows XP
Java Version: Sun Java 1.5.0_06-b05
jEdit Version: SVN Revision 6684

Submitted vampire0 - 2006-08-15 - 11:55:44z Assigned k_satoda
Priority 5 Category editor core
Status Open Group normal bug
Resolution None Visibility No


2011-12-04 - 19:44:41z
I think this is fixed in jEdit 5.0pre1.
2011-12-08 - 17:10:50z
r20375 fixed another bug #1643580, which only complains acceptance of
encoding property. The fix was merged into 4.5.x.

This one seems to be saying slightly wider (design?) problem. The
suggestion overlaps in some part with my suggestion in comments for
patch #3434651.

Vampire, what do you think?
2011-12-12 - 12:09:48z
Kazutoshi is right. What was fixed was simply that the encoding BLP is ignored and a BLP encoding-detector was added. What I propose here is a warning if a BLP is found that is not valid to show the user that he maybe mistyped a BLPs name. Also a warning if the BLPs value is invalid could be helpful, e. g. if tabSize is set to a non-integer.