blakemcbride / TECOC

TECOC - TECO text editor
161 stars 18 forks source link

Case folding ^EQq string building constructs #3

Closed rhaberkorn closed 2 months ago

rhaberkorn commented 2 months ago

Trying to improve SciTECO, I wanted to compare how the ^W^W and ^V^V string build constructs behave in tecoc.

Turns out that they work with regular input characters, but not with the results of ^EQq expansions. So for instance S^W^Wxxx$ is equivalent to SXXX$, but ^Uaxxx$ S^W^W^EQa$ does not search for the upper cased XXX. SciTECO currently has the same restriction.

I think it would make sense to case fold everything after ^W^W/^V^V, as the construct is otherwise pretty useless on modern systems with caps lock and the like. On SciTECO with its additional commands, supporting string building, this would also add an idiom for case folding registers (EUq^W^W^EQq$ would case fold register q for instance).

The TECO manual is unfortunately not clear on these questions. The manual btw. also mentions ^W and ^V commands that enable case folding for all subsequent string arguments.

rhaberkorn commented 2 months ago

On SciTECO with its additional commands, supporting string building, this would also add an idiom for case folding registers (EUq^W^W^EQq$ would case fold register q for instance).

And that's what it does now. I don't follow the behavior of legacy TECO implementations slavishly.

blakemcbride commented 2 months ago

Greetings,

  1. Although I am pretty old, I am not old enough to have used TECO professionally. I merely have a love for it. I do not know it well.

  2. I do not maintain TECOC. I just don't have the time. I mainly keep it here because I saw it was disappearing from the Internet, and I wanted to preserve it.

  3. As you are aware, TECOC is not "TECO." It is a re-implementation of the real TECO in C. I believe the original TECO was written in assembler for some old machines and was in constant flux.

  4. I know someone who has a great deal more experience and knowledge about TECO than I. It would be best to speak with him about any TECO particulars. He created his own copy called "TECO64." It's at https://github.com/fpjohnston/TECO-64. You can probably get more information from him.

Best to you!

Blake