New TSE available: 4.50 rc13

88 views
Skip to first unread message

S.E. Mitchell

unread,
Nov 11, 2023, 2:28:58 PM11/11/23
to TSEPro Support
Windows version:
https://semware.com/files/tse-pro-install/tse-setup-4.50-rc13.zip
Linux version:
https://semware.com/files/tse-pro-install/tse-linux-4.50-rc13.tgz

---------------------------------------------------------------------------------
New in this release:
Windows:
All known crashing issues with the Where macro and the -s option
of EditFile() have been fixed.

Compiling the following macro causes sc32 to crash:
---------------------------------------------------------
string MACRO_NAME [MAXSTRINGLEN] = ''

menu config_menu()
title = MACRO_NAME
'&Enable world peace ...', Warn('World peace enabled!')
end config_menu

proc Main()
MACRO_NAME = SplitPath(CurrMacroFilename(), _NAME_)
config_menu()
PurgeMacro(CurrMacroFilename())
end Main
---------------------------------------------------------

This has been fixed. Macro added to sanity test. Thanks to Carlo
Hogeveen for reporting this.

grep.s updated - chr(0) added after filenames, to be in sync with the internal
ViewFinds command.

Enable filename completion in where.s prompt.

Updated ldflist macro - thanks to Carlo Hogveen for the improvements.

Allow zero line list windows to have header/footers. Bug reported by
Carlo Hogeveen.

Linux:
Support for 256 Ansi color mode.
-color command line option changed to -ansicolor
AnsiColor variable replaced with CurrAnsiColor and StartupAnsiColor

See the section "Color Test" for a simple script to show if your
terminal supports
so-called 24-bit or truecolor.

There are 4 Ansi video drivers:

8 - uses the 8 standard colors
16 - uses the 8 standard plus bright versions of the sam
256 - uses the 256 colors
rgb - uses the 24-bit color mode. 16,777,216 possible colors.

CurrAnsiColor sets which Ansi video driver is currently being
used.

Valid values for the above are 1 for rgb/24-bit, 8, 16, 256.

Startup Ansi color driver determination:

CurrAnsiColor = 8

if the command_line contains "-ansicolor",
the next arg is taken as the ansi driver to use,
e.g., 1, 8, 16, 256.
Set CurrAnsiColor to that arg.

elseif StartupAnsiColor is set,
Set CurrAnsiColor to that value

else
get the values for the COLORTERM and TERM environment values
if COLORTERM contains "truecolor", "24bit", "24-bit",
Set CurrAnsiColor to 1 (rgb)
elseif TERM contains "truecolor", "24bit", "iterm",
Set CurrAnsiColor to 1 (rgb)
elseif TERM contains "256color",
Set CurrAnsiColor to 256
elseif TERM contains "16color",
Set CurrAnsiColor to 16
elseif TERM contains "xterm",
Set CurrAnsiColor to 16
endif
endif

Carlo Hogeveen

unread,
Nov 11, 2023, 5:17:41 PM11/11/23
to sem...@googlegroups.com

> Windows:
> All known crashing issues with the Where macro and the -s option
> of EditFile() have been fixed.

Ha!
This fix makes me happy.
I am very glad to have this capability again.
I can confirm EditFile's no-longer-crashing part.
I do yet have to test how it handles directories and files it cannot access.


> Linux:
> Startup Ansi color driver determination:

Unfortunately this does not work as described and desired.
Unlike its description states, the "-ansicolor" command line parameter cannot correctly overrule CurrAnsiColor if StartupAnsiColor is not 0 ( = editor default).

For example:
I configured Linux TSE to use RGB colors and saved that setting.
Then I start TSE with "e -AnsiColor 8".
The editor's menu starts with 8 colors.
I open file "mac\Test.s file" (see below).
When I go to TSE's configuration menu Options, Full Configuration, Display/Color Options, Set Colors, Select Editing Colors, Text Normal, then I see that the 8th column is grey and the 16th column is white, which requires at least the 16 color ANSI driver.
Further tests indicate that using that configuration menu or using the Macro Compile menu changes CurrAnsiColor.
Compiling and running the Test macro shows "1 1" despite the "-AnsiColor 8" startup.
This might be disastrous if our Linux environment does not support the "higher" ANSI color driver and mangles our screen.
Immediately after startup running the Test macro without recompiling it correctly shows "1 8".

Conclusions:
If the user configured an ANSI color driver other than 8, then:
1.
The TSE variable CurrAnsiColor is unreliable and cannot be used in macros.
2.
There are TSE functions which overrule the "-AnsiColor 8", including the configuration menus which we need access to to change our potentially badly configured choice.

Test.s:
proc Main()
Warn(Query(StartupAnsiColor); Query(CurrAnsiColor))
PurgeMacro(CurrMacroFilename())
end Main

Carlo



S.E. Mitchell

unread,
Nov 13, 2023, 6:34:19 AM11/13/23
to sem...@googlegroups.com
Oh man!
I was sure I had that working, and that I tested it, and it worked.
But now when I try it, it does not work :(

I will take a look and see what I messed up.
Thanks for the report!
--
Sammy Mitchell
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/semware/000701da14ec%24e0d761e0%24a28625a0%24%40ecarlo.nl.

zhong zhao

unread,
Nov 14, 2023, 8:24:13 PM11/14/23
to SemWare TSE Pro text editor
I found that 450rc13 and  450rc12 will automatically turn the blue font in the current line of the marker block to green, resulting in poor visual effect.
I hope this double-edged sword function is optional.

S.E. Mitchell

unread,
Nov 14, 2023, 9:33:06 PM11/14/23
to sem...@googlegroups.com
I have been unable to reproduce this.
I load a tse.cfg.
I set StartupAnsiColor = 1 in my tse.cfg.
I compile it.
Restart the editor via: e -ansicolor 8 foo.bar
It appears the editor is only using 8 colors.
I go to TSE's configuration menu Options, Full Configuration,
Display/Color Options, Set Colors, Select Editing Colors, Text Normal,
and I see only 8 colors.
I run your macro, and it displays: 1 8

Oops: I found the difference. And I can reproduce the problem.
You're using -AnsiColor, whereas I used -ansicolor
The former fails, the latter works. But _both_ should work.

And here is the kicker. In processing the command line arguments, I
use stricmp() which should do a case insensitive compare.
And it does in a tiny test program. But it doesn't in the editor.
What gives? I don't know. I must have an error somewhere, but
nothing stands out.

Thanks for the report! Hopefully a fix soon!

On Sat, Nov 11, 2023 at 5:17 PM Carlo Hogeveen <t...@ecarlo.nl> wrote:
>
>

S.E. Mitchell

unread,
Nov 14, 2023, 9:47:54 PM11/14/23
to sem...@googlegroups.com
Please send me your tse.cfg file, so that I can try and reproduce the problem.

S.E. Mitchell

unread,
Nov 14, 2023, 9:49:38 PM11/14/23
to sem...@googlegroups.com
So it works when I add debugging information, and does not work when I
remove the debugging code :(
I'll eventually find the problem, but it is taking much longer than I
would like!
--

Carlo Hogeveen

unread,
Nov 15, 2023, 4:18:18 AM11/15/23
to sem...@googlegroups.com

Sammy,

For what it is worth, here are some test points from my user perspective, and a new related bug.

I cannot reproduce the upper/lower case of the command line parameter "AnsiColor" making a difference.

I do not modify the editor's configured StartupAnsiColor by modifying the file tse.cfg, but by using the undocumented menu option Full Configuration -> Display/Color Options -> ANSI Color Options, and then saving TSE's settings and restarting TSE.

My use of the color scheme "Dark by Carlo" is really helpful in immediately noticing when an already started TSE session unbiddenly switches from 8-color mode to RGB mode.

One such case is the following:
TSE is configured for RGB colors and with color scheme "Dark by Carlo".
I start TSE with "e -AnsiColor 8" and then open "tse/mac/adjust.s".
TSE correctly does not show any grey colors.
Then I use the menu Macro -> Compile.
From the completion pop-up onwards TSE starts showing grey colors in pop-ups and menus: TSE has switched it ANSI color driver!

I found a new, related, easily testable bug!
If I start "e tse/mac/adjust.s", then it opens the file as expected.
If I start "e -AnsiColor 8 tse/mac/adjust.s", then TSE opens an empty file where "adjust.s" has an extra character behind its name.
Inspecting the character in tsehist.dat with PotPourri's ShowCurr tool reveals that it is character 25, aka 19h, aka 0x19.

Carlo



Carlo Hogeveen

unread,
Nov 15, 2023, 4:40:32 AM11/15/23
to sem...@googlegroups.com

P.S.
I am reconsidering, that compiling a macro from within the editor might be the only way to make the editor start ignoring the "-AnsiColor 8" command line option. It could be the root cause.
Carlo



S.E. Mitchell

unread,
Nov 15, 2023, 5:27:07 AM11/15/23
to sem...@googlegroups.com
It is calling an external process that causes the problem.
When you call an external process, the editor resets the console settings.
When you come back from the external process, the editor resets, using
the startup_ansi_color - Oops :(
Ciphering on the best fix.
--
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/semware/001101da17a7%24c340c4b0%2449c24e10%24%40ecarlo.nl.

S.E. Mitchell

unread,
Nov 15, 2023, 5:37:43 AM11/15/23
to sem...@googlegroups.com
I found this last night also. I was hoping no one would see it before
I got a fix out :(
It is caused by the command line processing removing the -ansicolor
switch, so the rest of the editor does not see it.
It is fixed in my in-house version.

S.E. Mitchell

unread,
Nov 15, 2023, 6:28:21 AM11/15/23
to TSEPro Support
Found and fixed.
But now another issue:

What if you set CurrAnsiColor in your ui WhenLoaded()?
Which one takes precedence, the -AnsiColor 8 from the command line, or
what gets set in the ui WhenLoaded()

I lean towards the command line setting, but I'm just not sure.

Note that once the ui WhenLoaded has been processed, setting
CurrAnsiColor anywhere else will always override the command line
setting. But, whatever you set in the ui WhenLoaded somehow seems
different to me, e.g., it is part of startup processing.

Feedback appreciated!
--
On Wed, Nov 15, 2023 at 4:18 AM Carlo Hogeveen <t...@ecarlo.nl> wrote:
>
>
> Sammy,
>
> For what it is worth, here are some test points from my user perspective, and a new related bug.
>
> I cannot reproduce the upper/lower case of the command line parameter "AnsiColor" making a difference.
>
> I do not modify the editor's configured StartupAnsiColor by modifying the file tse.cfg, but by using the undocumented menu option Full Configuration -> Display/Color Options -> ANSI Color Options, and then saving TSE's settings and restarting TSE.
>
> My use of the color scheme "Dark by Carlo" is really helpful in immediately noticing when an already started TSE session unbiddenly switches from 8-color mode to RGB mode.
>
> One such case is the following:
> TSE is configured for RGB colors and with color scheme "Dark by Carlo".
> I start TSE with "e -AnsiColor 8" and then open "tse/mac/adjust.s".
> TSE correctly does not show any grey colors.
> Then I use the menu Macro -> Compile.
> From the completion pop-up onwards TSE starts showing grey colors in pop-ups and menus: TSE has switched it ANSI color driver!
>
> Carlo
>

Carlo Hogeveen

unread,
Nov 15, 2023, 7:23:57 AM11/15/23
to sem...@googlegroups.com

From my perspective the main function of "-AnsiColor" as a command line option is (being able) to offer the user an easy way out of trouble, if their (default or self) configured ANSI color driver is an incorrect one for their Linux environment, possibly making their newly started TSE screen scrambled and thereby unusable and unreconfigurable.

So now giving users with misconfigurations an out is great.
Also wanting to give that out to users who modified CurrAnsiColor in their .ui file or in their autoloaded macros is understandable.
But likewise there are users who *execute* macros on TSE's start-up to set settings.

My advice is to either leave it as is, or to go all the way.
All the way means making CurrAnsiColor immutable if it was set by the command line option.
The immutability functionality would make TSE the easiest to support.

IMHO,
Carlo



-----Original Message-----
From: sem...@googlegroups.com <sem...@googlegroups.com> On Behalf Of S.E. Mitchell
Sent: Wednesday, November 15, 2023 12:28 PM
To: TSEPro Support <sem...@googlegroups.com>
Subject: AnsiColor bug was: [TSE] New TSE available: 4.50 rc13

Found and fixed.
But now another issue:

What if you set CurrAnsiColor in your ui WhenLoaded()?
Which one takes precedence, the -AnsiColor 8 from the command line, or
what gets set in the ui WhenLoaded()

I lean towards the command line setting, but I'm just not sure.

Note that once the ui WhenLoaded has been processed, setting
CurrAnsiColor anywhere else will always override the command line
setting. But, whatever you set in the ui WhenLoaded somehow seems
different to me, e.g., it is part of startup processing.

Feedback appreciated!
--

[ ... irrelevant history deleted ...]



H P

unread,
Nov 15, 2023, 7:39:49 PM11/15/23
to sem...@googlegroups.com
Sammy,

I found a discrepency between sc32 in windows and linux.
In Windows I found some macros (not developed by you) having a proc with a reserved name beeing IsTypeableKey, IsCharDevice, LongestLineBuffer and QuotePath which compile without a problem but in Linux give an error.
Of course using those reserved words is wrong but either in both systems it should give an error or in both it should be accepted.
The names of these macros are bfind.s, compat.si, csv2flv.s and viewgrep.s.
Also the macro indentresize.s gives no error in windows but in linux gives a syntax error on line 146.


Met vriendelijke groet,
With kind regards,
Muy atentamente,
Mit Freundliche Gruß,
Sinceramente,


H. Pikaar

Henri...@gmail.com



Op wo 15 nov 2023 om 11:37 schreef S.E. Mitchell <sammy.m...@gmail.com>:
--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.

S.E. Mitchell

unread,
Nov 15, 2023, 8:07:24 PM11/15/23
to sem...@googlegroups.com
Can you zip those up and email them to me?
Thanks!
--
> To view this discussion on the web visit https://groups.google.com/d/msgid/semware/CAAR3jqGoooskh6iWVS8LvF8WpcxKCYieGj0NZ7GWEtAyZ9rD_Q%40mail.gmail.com.

Carlo Hogeveen

unread,
Nov 16, 2023, 4:00:45 AM11/16/23
to sem...@googlegroups.com

 

HP,

 

In reaction to the IndentResize part of your remarks:

 

Given the error line you reported you must have an old version.

 

I do not want to blast this mailing list with emails for every minor update and bugfix of my tools and extensions, so if you find an issue with one of them, then my advice is to first check my website to see whether there is an update. My tools and extensions are sorted from the last modified one downwards to facilitate this.

 

That said, I just made IndentResize compatible with Linux TSE.

https://ecarlo.nl/tse/ToolsAndExtensions.html#IndentResize

 

Carlo

 

 

H P

unread,
Nov 16, 2023, 6:05:34 AM11/16/23
to sem...@googlegroups.com
The version I used was 2.1.1 but it wasn't about the macro but about the fact that sc32 in windows different compiles as the sc32 in linux.

Met vriendelijke groet,
With kind regards,
Muy atentamente,
Mit Freundliche Gruß,
Sinceramente,


H. Pikaar

Henri...@gmail.com



Op do 16 nov 2023 om 10:00 schreef Carlo Hogeveen <t...@ecarlo.nl>:
--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.

Carlo Hogeveen

unread,
Nov 17, 2023, 8:11:59 AM11/17/23
to sem...@googlegroups.com

> Windows:
> All known crashing issues with the Where macro and the -s option of EditFile() have been fixed.

Using
https://ecarlo.nl/tse/DemosAndTests.html#make_dir_file_test
and
https://ecarlo.nl/tse/ToolsAndExtensions.html#EditFileList
I tested how the fixed "-s" option handles directories and files it cannot access.
My tests say it handles them the same as the previous TSE version.
I am satisfied with that.

That said, for information's sake, there were and are inconsistencies between what directories and files TSE's EditFile() command lists with and without the "-s" option.
1.
Browsing shows a too long deep directory that the "-s" option does not show.
2.
Browsing shows directory "Greek α dir" as "Greek a dir", while the "-s" option does not show it at all.
3.
Browsing shows a too long root file (that even Windows Explorer has trouble with), while the "-s" option does not show it.

Carlo



S.E. Mitchell

unread,
Dec 8, 2023, 5:50:12 PM12/8/23
to sem...@googlegroups.com
>>Browsing shows directory "Greek α dir" as "Greek a dir", while the "-s" option does not show it at all.

In a very strange twist, this actually works in e32:

I can even go in that directory and create a file!:

No good idea why it works from e32 but not from g32 :(

If you use "where" or the EditFile -s option, that directory, and
files in it show up!
But g32 can't go in there.
Help! :)
--
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/semware/002001da1957%24a3223c70%24e966b550%24%40ecarlo.nl.
image.png
image.png

Carlo Hogeveen

unread,
Dec 8, 2023, 8:20:47 PM12/8/23
to sem...@googlegroups.com

Sammy,

You want twists?
It works with your e32.exe because you are an American!

g32.exe default uses the ANSI character set, which does not have the Greek character "α" (alpha).
e32.exe uses its console's code page.
For me, like a lot of non-Americans, the default code page is 850, the character set of which does not support an "α".
For Americans (I am assuming and generalizing) the default code page is 437, the character set of which does support an "α".

Windows knows its file system's character set (UTF-16LE) and your code page's character set, and can sometimes automatically convert one's characters to the other if both support the character.

For me, doing "chcp 437" in a Console before starting "e32.exe" was a necessary step, but not enough.
One extra step was necessary to convince Windows (at a lower/file system level?) to make code page 437 its default.
I needed to change Windows' "system locale" to "English (United States)".
I found this setting in Windows 10 in Settings, Region, Additional date time & regional settings, Region, Administrative, Change system locale.

After applying both these steps I could reproduce your results.

Carlo



-----Original Message-----
From: sem...@googlegroups.com <sem...@googlegroups.com> On Behalf Of S.E. Mitchell
To view this discussion on the web visit https://groups.google.com/d/msgid/semware/CA%2BgEvkb3cL47%2BRsmaqFeM82r7ip7pzxTbMOiutH7ZjZ3EwbgKA%40mail.gmail.com.

Carlo Hogeveen

unread,
Dec 9, 2023, 8:36:08 AM12/9/23
to sem...@googlegroups.com

Sammy,

The terminology around this topic is even more ambiguous than I was aware of.

I wrote:
> g32.exe default uses the ANSI character set, which does not have the Greek character "α" (alpha).

According to
https://en.wikipedia.org/wiki/ANSI_character_set
"the ANSI character set" most often means the Windows-1252 character set,
http://www.alanwood.net/demos/ansi.html
which was the meaning I intended.
However, ANSI can also refer to any code page.

On this Microsoft page about its "system locale"
https://learn.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-international-core-systemlocale
it uses the term "ANSI" to refer to any non-Unicode character sets, stating these are implemented by code pages.
On a hunch I typed "chcp 1252" in a console and with e32.exe's (horribly misnamed) "ASCII Chart" menu I checked its character set against the Windows-1252 character set: They were identical.

Well, these mistakes can easily be rectified:

I should have written:
"g32.exe default uses the Windows-1252 character set, which does not have the Greek character "α" (alpha)."

The wrongly named TSE menu "ASCII Chart" can be renamed to an ambiguous "ANSI Chart" or better to a correct and neutral "Char Chart" or "Char Set" or Char Map. For those who rely on finger memory the lower-case "a" can become the shortcut letter.

Carlo



Reply all
Reply to author
Forward
0 new messages