TSE: Feature: Request: The file extension in mac\template.s can only be 3 characters long

6 views
Skip to first unread message

knud van eeden

unread,
Jan 7, 2023, 1:58:49 PM1/7/23
to SemWare TSE Pro Text Editor
Hello,

Current state:
The file extension in mac\template.s can only be 3 characters long.

e.g.

.sql is possible
but
.plsql is not possible, it will truncate it to .psq

Feature request:
Increase the total length of the possible file extension to more than 3 (e.g. 4 or 5 or 6 or ...).

Steps to reproduce:
1. Run latest TSE 4.49
2. Run the macro 'template.s' 
(located in the TSE ..\mac directory)
3. Mark any text
4. Press <CTRL><TAB> to see the template menu
5. Select 'Add Marked Text To Template'
6. Choose any 'Keyword:' (e.g. 'foobar')
7. Now when choosing any 'Extension' one can type only
a dot followed by maximally 3 characters.
Typing stops at the 4th character. If you should leave out the dot '.' in front then it still will truncate the 4 chaeracters to the first 3 characters.

Thanks
with friendly greetings
Knud van Eeden






knud van eeden

unread,
Jan 7, 2023, 2:00:13 PM1/7/23
to SemWare TSE Pro Text Editor
Hello,

Current state:
The file extension in mac\template.s can only be 3 characters long.

e.g.

.sql is possible
but
.plsql is not possible, it will truncate it to .pls

Carlo Hogeveen

unread,
Jan 8, 2023, 12:48:08 PM1/8/23
to sem...@googlegroups.com

Knud,

Just a suggestion for an option,
You could also contribute by making the change yourself, publish the new template.s macro on your website or github, and post a link to it for peer review and for Semware to copy (from).
You would have the solution immediately and could work with it in practice, and it would make it more likely that the change would more quickly become part of TSE and available to other template users.
I trust that the small change you requested is well within your capabilities.

Carlo



knud van eeden

unread,
Jan 8, 2023, 1:22:15 PM1/8/23
to sem...@googlegroups.com
Carlo,


In general it is preferred when users are proposing feature requests to let the manufacturer look for possible solutions, as they are typically
the original creators of the software, instead of coming up with all kind of ad hoc solutions.

So in the current state in the about 270 computer languages looked into now and for which a template has to be created as very bad workaround the file extensions of 4 or more characters (e.g. .java, .groovy, plsql, ...) have to be truncated to non-existing 3 character file extensions (like .jav, .gro, sqp, ...in the current design:


From template.s:

"
              Oct  6, 1999 SEM
                    Equate .html to .htm, and .java to .jav.
                    This is necessary since Template only supports
                    1..3 char extensions.

                    To equate other extensions to their 3 char counterparts,
                    see routine ExtensionType().
"

In general most of the TSE published software is badly documented, spaghettiand not really written structured (e.g. not using the KISS principle), not using isolation and centralized variables e.g. to control the file extension length, so it is not that easy. Also the length of the file extension influences the List of defined templates.

For example syncfg.s > Associate file extension has no such 3 character limit.

This 3 character file extension maximum length is a limitation and remnant from somewhere in the Windows 3.x or earlier days in the 1980s when one had the Microsoft 8.3 notation limitation for filenames and their extensions.

with friendly greetings
Knud van Eeden


On Sunday, January 8, 2023 at 06:48:12 PM GMT+1, Carlo Hogeveen <t...@ecarlo.nl> wrote:



Knud,

Just a suggestion for an option,
You could also contribute by making the change yourself, publish the new template.s macro on your website or github, and post a link to it for peer review and for Semware to copy (from).
You would have the solution immediately when .com/d/msgid/semware/000701d92389%245aae62d0%24100b2870%24%40ecarlo.nl.

Fred H Olson

unread,
Jan 8, 2023, 1:35:38 PM1/8/23
to sem...@googlegroups.com
On Sun, 8 Jan 2023, Carlo Hogeveen wrote:

>
> Knud,
>
> Just a suggestion for an option,
> You could also contribute by making the change yourself, publish the
>new template.s macro on your website or github, and post a link to it
>for peer review and for Semware to copy (from).

That is essentially the Open Source developement process. I think that
would be a good direction to go with TSE. Thanks Carlo.

Fred


--
Fred H. Olson Minneapolis,MN 55411 USA (near north Mpls)
Email: fholson at cohousing.org 612-588-9532
My Link Pg: http://fholson.cohousing.org

knud van eeden

unread,
Jan 8, 2023, 1:43:38 PM1/8/23
to sem...@googlegroups.com
That assumption is already a big step in the future.

In the current state this is not the case and clearly not applicable.

with friendly greetings
Knud van Eeden



--

---
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+unsub...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/semware/alpine.DEB.2.21.2301081232390.6442%40web15.tigertech.net.

knud van eeden

unread,
Jan 8, 2023, 2:17:23 PM1/8/23
to sem...@googlegroups.com
The current TSE model is still more a 'benevolent ruler for life' model (like that of 
-Guido van Rossum for the Python programming language, 
-Linux Thorvalds for the Linux operating system, 
-Larry Wall for the Perl programming language, 
-Jimmy Wales for the online database Wikipedia, ...)

That is just the way it is.

Further was my highest hourly payment $200 per hour for projects. so it is advised to stay realistic.

So it is not automatically obvious that I will start doing things for free, even though this has been applied ever since to giving advice or creating solutions for TSE, if so in the future then that would be completely voluntary from my end initiated, like
e.g. for future TSE open source development. 

That would be a first anyhow regarding open source, it is in general assumed left to others to do such (time consuming. complicated, ...) tasks.

If others would go ahead, that is of course their choice.


knud van eeden

unread,
Jan 8, 2023, 2:59:12 PM1/8/23
to sem...@googlegroups.com
In the case of template.s it looks like that this setting

// constant EXT_LEN        =   4
constant EXT_LEN        =   10

successfully changes the file extension length.
That will become 10-1 = 9 or similar instead of 4-1=3.

The big problem seems the 'List' option. 

Then with set to 10 suddenly all your template options are gone, only a few left.

In my case where I created and use around 2300 templates for different programming
languages that should thus clearly be avoided. 

So it is as usual and expected not that easy.


Carlo Hogeveen

unread,
Jan 8, 2023, 4:53:41 PM1/8/23
to sem...@googlegroups.com

>> Fred wrote:
>> That is essentially the Open Source developement process. I think that
>>would be a good direction to go with TSE.

> Knud replied
> That assumption is already a big step in the future.
> In the current state this is not the case and clearly not applicable.

Actually, just from memory I can recall three publicly available Semware macros I have in recent years supplied new versions of, which all have been accepted, most recently the syncfg macro in 4.49.

That said, I suggested an option, and your argument not to program for free is not necessary to restrict your contributions to sharing your many, many free thoughts.

To segue to a different and related topic, I am reminded that as of 24 December 2021 Sammy Mitchell is maintaining TSE for free.

Thanks, Sammy!

Carlo



knud van eeden

unread,
Jan 9, 2023, 6:53:19 AM1/9/23
to SemWare TSE Pro Text Editor
This 8.3 format maximum file extension maximum in template.s is thus a big bottleneck.

One wants to have the same file extension 

1. for a template for a given language, e.g. java (see e.g. template.s), e.g. .java, e.g. .scala, e.g. .groovy, ...

2. for a syntax highlight for a given language, e.g. java (see e.g. syncfg.s), e.g. .java, e.g. .scala, e.g. .groovy, ... 

3. for a compilation for a given language, e.g. java (see e.g. compile.s), e.g. .java, e.g. .scala, e.g. .groovy, ...

...

Because the template file extension should thus also determine the syntax highlight file extension, and also the compile file extension, 
these are thus dependent and should ideally be the same.

Note: Workarounds for template.s like abbreviating the current longer file extensions down to 3 characters is considered a very bad practice and a pure ad hoc solution, because it does not scale, is not a general solution, is not compatible, is a local workaround for 1 user only, ... as these new 3 character file extensions in general do not exist at all, so will have to be rolled back anyhow at some later point in time.

FYIO:

As I am currently looking into compiling some 

 270 computer languages or similar

from within TSE + syntax highlight + template + compile, 

So not having this 8.3 file format bottle neck restriction is important in that context.

See also:

TSE: Language: Computer: Popular: All


Thanks
with friendly greetings
Knud van Eeden

Reply all
Reply to author
Forward
0 new messages