SWI-Prolog / packages-pengines

Pengines: Prolog engines
11 stars 13 forks source link

Xpce Emacs does not automatically cross-reference pengines.pl #51

Closed xpxaxsxi closed 4 years ago

xpxaxsxi commented 4 years ago

First I thought this was some error in code, then I figured that the cross-referencer does not work. After I press F5 I get proper colors and stuff.

I have been accepting that those scandinavian characters are being rendered badly, but now I noticed that the Github file doesn't have those bad characters. So this could be an issue with my Swi-Prolog settings.

Now that I payed serious attention to those bad chars, I found out that Firefox and Notepad open pengines.pl properly, but WordPad has those bad chars.

kuva

problem is being caused by UTF-8 bytes being interpreted as Windows-1252 (or ISO 8859-1) byte

kuva

xpxaxsxi commented 4 years ago

This is what my Emacs says about properties kuva

JanWielemaker commented 4 years ago

This has nothing to do with Pengines. In the PceEmacs code we find

class_variable(auto_colourise_size_limit, int, 100000,
               "Auto-colourise if buffer is smaller then this").

Which you can override in the xpce/Defaults file using for example

 emacs_prolog_mode.auto_colourise_size_limit: 1000000

As is though, xpce isn't multi-threaded and putting some limit on it avoids the editor being blocked for a long time while cross-referencing and colouring a buffer.

xpxaxsxi commented 4 years ago

Ok. I was learning about Pengines by reading the Swi-Prolog site and doing some own programming, as in learning by doing.

Maybe the bad characters could be fixed in the library(pengines) prolog file? I was making mistakes and began to think that the pengines-library could have problems, no, I had problems.

Also the url at this page, should refer to https://www.swi-prolog.org/pldoc/doc_for?object=section(%27packages/pengines.html%27) Now it refers to same page. kuva