<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/src, branch v2.2.0</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>fixed rubbing out file open with glob patterns</title>
<updated>2024-12-08T13:41:34+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-12-08T13:41:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=3f6572c5b46254002cb1b3fd1001bc28ecc2bb10'/>
<id>3f6572c5b46254002cb1b3fd1001bc28ecc2bb10</id>
<content type='text'>
* This would crash if &lt;EB&gt; opened more than one file, e.g. EB*.c$.
  The reason is that teco_current_doc_undo_edit() must be called before every teco_ring_edit().
* Unfortunately, this is not reproduceable with
  sciteco --no-profile --fake-cmdline '@EB"foo*.txt"{HK}'
  since the crashes actually happen when printing messages in interactive mode.
  That's why no test case has been added.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This would crash if &lt;EB&gt; opened more than one file, e.g. EB*.c$.
  The reason is that teco_current_doc_undo_edit() must be called before every teco_ring_edit().
* Unfortunately, this is not reproduceable with
  sciteco --no-profile --fake-cmdline '@EB"foo*.txt"{HK}'
  since the crashes actually happen when printing messages in interactive mode.
  That's why no test case has been added.
</pre>
</div>
</content>
</entry>
<entry>
<title>implemented the ^Q command for converting between line and glyph positions</title>
<updated>2024-12-08T13:10:29+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-12-08T02:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=bd87ff40e73929e761e1233aa812a6736cacbed1'/>
<id>bd87ff40e73929e761e1233aa812a6736cacbed1</id>
<content type='text'>
* As known from DEC TECO, but extended to convert absolute positions to line numbers as well.
  :^Q returns the current line.
* Especially useful in macros that accept line arguments,
  as it is much shorter than something like
  ^E@ES/LINEFROMPOSITION//+Q.l@ES/POSITIONFROMLINE//:^E-.
* On the other hand, the fact that ^Q checks the line range means we cannot
  easily replace lexer.checkheader with something like
  [:J 0,^Q::S...$ ]:
  Using SCI_POSITIONFROMLINE still has the advantage that it returns `Z` for out-of-bounds ranges
  which would be cumbersome to write with the current ^Q.
* Perhaps there should be a separate command for converting between absolute lines and positions
  and :^Q should be repurposed to return a failure boolean for out-of-range values?
* fnkeys.tes could be simplified.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* As known from DEC TECO, but extended to convert absolute positions to line numbers as well.
  :^Q returns the current line.
* Especially useful in macros that accept line arguments,
  as it is much shorter than something like
  ^E@ES/LINEFROMPOSITION//+Q.l@ES/POSITIONFROMLINE//:^E-.
* On the other hand, the fact that ^Q checks the line range means we cannot
  easily replace lexer.checkheader with something like
  [:J 0,^Q::S...$ ]:
  Using SCI_POSITIONFROMLINE still has the advantage that it returns `Z` for out-of-bounds ranges
  which would be cumbersome to write with the current ^Q.
* Perhaps there should be a separate command for converting between absolute lines and positions
  and :^Q should be repurposed to return a failure boolean for out-of-range values?
* fnkeys.tes could be simplified.
</pre>
</div>
</content>
</entry>
<entry>
<title>support the ::S anchored search (string comparison) command (and ::FD, ::FR, ::FS as well)</title>
<updated>2024-12-06T14:20:52+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-12-06T14:20:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=e5884ab2166ab5a03294baa54601b8785e6d9727'/>
<id>e5884ab2166ab5a03294baa54601b8785e6d9727</id>
<content type='text'>
* The colon modifier can now occur 2 times.
  Specifying `@` more than once or `:` more than twice is an error now.
* Commands do not check for excess colon modifiers - almost every command would have
  to check it. Instead, a double colon will simply behave like a single colon on most
  commands.
* All search commands inherit the anchored semantics, but it's not very useful in some combinations
  like -::S, ::N or ::FK.
  That's why the `::` variants are not documented everywhere.
* The lexer.checkheader macro could be simplified and should also be faster now,
  speeding up startup.
  Eventually this macro can be made superfluous, e.g. by using 1:FB or 0,1^Q::S.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The colon modifier can now occur 2 times.
  Specifying `@` more than once or `:` more than twice is an error now.
* Commands do not check for excess colon modifiers - almost every command would have
  to check it. Instead, a double colon will simply behave like a single colon on most
  commands.
* All search commands inherit the anchored semantics, but it's not very useful in some combinations
  like -::S, ::N or ::FK.
  That's why the `::` variants are not documented everywhere.
* The lexer.checkheader macro could be simplified and should also be faster now,
  speeding up startup.
  Eventually this macro can be made superfluous, e.g. by using 1:FB or 0,1^Q::S.
</pre>
</div>
</content>
</entry>
<entry>
<title>the &lt;Xq&gt; command now supports the @ modifier for cutting into the register</title>
<updated>2024-12-04T13:43:51+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-12-04T13:43:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=48308687979f26a3498e7af94eacc8fe34307a78'/>
<id>48308687979f26a3498e7af94eacc8fe34307a78</id>
<content type='text'>
* Can be freely combined with the colon-modifier as well.
  :@Xq cut-appends to register q.
* This simply deletes the given buffer range after the copy or append operation
  as if followed by another &lt;K&gt; command.
* This has indeed been a very annoying missing feature, as you often have to retype the
  range for a K or D command.
  At the same time, this cannot be reasonably solved with a macro since macros
  do not accept Q-Register arguments -- so we would have to restrict ourselves to one or a few
  selected registers.
  I was also considering to solve this with a special stack operation that duplicates the
  top values, so that Xq leaves arguments for K, but this couldn't work for cutting lines
  and would also be longer to type.
* It's the first non-string command that accepts @.
  Others may follow in the future.
  We're approaching ITS TECO madness levels.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Can be freely combined with the colon-modifier as well.
  :@Xq cut-appends to register q.
* This simply deletes the given buffer range after the copy or append operation
  as if followed by another &lt;K&gt; command.
* This has indeed been a very annoying missing feature, as you often have to retype the
  range for a K or D command.
  At the same time, this cannot be reasonably solved with a macro since macros
  do not accept Q-Register arguments -- so we would have to restrict ourselves to one or a few
  selected registers.
  I was also considering to solve this with a special stack operation that duplicates the
  top values, so that Xq leaves arguments for K, but this couldn't work for cutting lines
  and would also be longer to type.
* It's the first non-string command that accepts @.
  Others may follow in the future.
  We're approaching ITS TECO madness levels.
</pre>
</div>
</content>
</entry>
<entry>
<title>implemented ^Y/^S commands for receiving pattern match/insertion ranges and lengths (refs #27)</title>
<updated>2024-12-04T08:43:18+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-12-03T23:22:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=3a823fb43ba0abe52f3152d337675e9ed9a3f175'/>
<id>3a823fb43ba0abe52f3152d337675e9ed9a3f175</id>
<content type='text'>
* Allows storing pattern matches into Q-Registers (^YXq).
* You can also refer to subpatterns marked by ^E[...] by passing a number &gt; 0.
  This is equivalent to \0-9 references in many programming languages.
* It's especially useful for supporting TECO's equivalent of structural regular expressions.
  This will be done with additional macros.
* You can also simply back up to the beginning of an insertion or search.
  So I...$^SC leaves dot at the beginning of the insertion.
  S...$^SC leaves dot before the found pattern.
  This has been previously requested by users.
* Perhaps there should be ^Y string building characters as well to backreference
  in search-replacement commands (TODO).
  This means that the search commands would have to store the matched text itself
  in teco_range_t structures since FR deletes the matched text before
  processing the replacement string.
  It could also be made into a FR/FS-specific construct,
  so we don't fetch the substrings unnecessarily.
* This differs from DEC TECO in always returning the same range even after dot movements,
  since we are storing start/end byte positions instead of only the length.
  Also DEC TECO does not support fetching subpattern ranges.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Allows storing pattern matches into Q-Registers (^YXq).
* You can also refer to subpatterns marked by ^E[...] by passing a number &gt; 0.
  This is equivalent to \0-9 references in many programming languages.
* It's especially useful for supporting TECO's equivalent of structural regular expressions.
  This will be done with additional macros.
* You can also simply back up to the beginning of an insertion or search.
  So I...$^SC leaves dot at the beginning of the insertion.
  S...$^SC leaves dot before the found pattern.
  This has been previously requested by users.
* Perhaps there should be ^Y string building characters as well to backreference
  in search-replacement commands (TODO).
  This means that the search commands would have to store the matched text itself
  in teco_range_t structures since FR deletes the matched text before
  processing the replacement string.
  It could also be made into a FR/FS-specific construct,
  so we don't fetch the substrings unnecessarily.
* This differs from DEC TECO in always returning the same range even after dot movements,
  since we are storing start/end byte positions instead of only the length.
  Also DEC TECO does not support fetching subpattern ranges.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed operator precedence application (fixup 5597bc72671d0128e6f0dba446c4dc8d47bf37d0)</title>
<updated>2024-11-25T20:15:43+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-25T20:15:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=8490013e558386d5584cbaba610268adad4ddd89'/>
<id>8490013e558386d5584cbaba610268adad4ddd89</id>
<content type='text'>
* Using teco_expressions_eval() is wrong since it does not pay attention to precedences.
  If you have multiple higher precedence operators in a row, as in 2+3*4*5,
  the lower precedence operators would be resolved prematurely.
* Instead we now call teco_expressions_calc() repeatedly but only for lower precedence
  operators on the stack top.
  This makes sure that as much of the expression as possible is evaluated at any given moment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Using teco_expressions_eval() is wrong since it does not pay attention to precedences.
  If you have multiple higher precedence operators in a row, as in 2+3*4*5,
  the lower precedence operators would be resolved prematurely.
* Instead we now call teco_expressions_calc() repeatedly but only for lower precedence
  operators on the stack top.
  This makes sure that as much of the expression as possible is evaluated at any given moment.
</pre>
</div>
</content>
</entry>
<entry>
<title>avoid dynamic stack allocation in teco_expressions_brace_return()</title>
<updated>2024-11-25T16:11:49+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-25T16:11:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=88d65fb8b736a8b3aa2b4c85e5517095a1134a49'/>
<id>88d65fb8b736a8b3aa2b4c85e5517095a1134a49</id>
<content type='text'>
* This is not safe since the size of the stack object comes from the "outside" world,
  so stack overflows can theoretically be provoked by macros.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This is not safe since the size of the stack object comes from the "outside" world,
  so stack overflows can theoretically be provoked by macros.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed subtle operator precedence bug</title>
<updated>2024-11-25T15:58:53+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-25T15:58:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=5597bc72671d0128e6f0dba446c4dc8d47bf37d0'/>
<id>5597bc72671d0128e6f0dba446c4dc8d47bf37d0</id>
<content type='text'>
* It was possible to provoke operator right-associativity when placing a high-precedence
  operator between two low-precedence operators.
  1-6*5-1 evaluated to -28 instead of the expected -30.
* The reason is that SciTECO relies on operators to be resolved from left-to-right as soon as possible.
  The higher precedence operator prevents that and pushing the 2nd "-" only evaluated 6*5.
  At the end 1-30-1 would be left on the stack.
  teco_expressions_eval() however evaluates from right-to-left which is wrong in this case.
* Instead, we now do a full eval on every operator with a lower precedence, making sure that 1-30 is
  evaluated first.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* It was possible to provoke operator right-associativity when placing a high-precedence
  operator between two low-precedence operators.
  1-6*5-1 evaluated to -28 instead of the expected -30.
* The reason is that SciTECO relies on operators to be resolved from left-to-right as soon as possible.
  The higher precedence operator prevents that and pushing the 2nd "-" only evaluated 6*5.
  At the end 1-30-1 would be left on the stack.
  teco_expressions_eval() however evaluates from right-to-left which is wrong in this case.
* Instead, we now do a full eval on every operator with a lower precedence, making sure that 1-30 is
  evaluated first.
</pre>
</div>
</content>
</entry>
<entry>
<title>added special Q-Register ":" for accessing dot</title>
<updated>2024-11-24T01:51:34+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-24T01:38:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=23c90e37ff48707c4aabdb8b1460df382a600d7a'/>
<id>23c90e37ff48707c4aabdb8b1460df382a600d7a</id>
<content type='text'>
* We cannot call it "." since that introduces a local register
  and we don't want to add an unnecessary syntactic exception.
* Allows the idiom [: ... ]: to temporarily move around.
  Also, you can now write ^E\: without having to store dot in a register first.
* In the future we might add an ^E register as well for byte offsets.
  However, there are much fewer useful applications.
* Of course, you can now also write nU: instead of nJ, Q: instead of "." and
  n%: instead of "nC.". However it's all not really useful.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* We cannot call it "." since that introduces a local register
  and we don't want to add an unnecessary syntactic exception.
* Allows the idiom [: ... ]: to temporarily move around.
  Also, you can now write ^E\: without having to store dot in a register first.
* In the future we might add an ^E register as well for byte offsets.
  However, there are much fewer useful applications.
* Of course, you can now also write nU: instead of nJ, Q: instead of "." and
  n%: instead of "nC.". However it's all not really useful.
</pre>
</div>
</content>
</entry>
<entry>
<title>minor documentation changes: use typographic quotes instead of "</title>
<updated>2024-11-24T01:11:52+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-24T01:11:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=26e54b9248ca8be07530fb19422082827ee1fead'/>
<id>26e54b9248ca8be07530fb19422082827ee1fead</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
