<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/src, branch v2.5.0</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>fixup ea0a23645f03a42252ab1ce8df45ae4076ebae75: pass teco_string_t by value in Windows-only code as well</title>
<updated>2026-01-01T19:20:15+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-01-01T19:20:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=304c617a68c7c9dbc720a7d5c58ef4614898b915'/>
<id>304c617a68c7c9dbc720a7d5c58ef4614898b915</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>updated copyright to 2026</title>
<updated>2026-01-01T06:59:49+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-01-01T06:59:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=c2feb2a6f71fc9adb20226fb3c2260c236e974e0'/>
<id>c2feb2a6f71fc9adb20226fb3c2260c236e974e0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>GTK: implemented --detach|-d option for detaching from controlling terminal</title>
<updated>2025-12-29T23:42:34+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-29T11:01:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=a7202a1fb911f72c309380b42c0ff995c05ba94c'/>
<id>a7202a1fb911f72c309380b42c0ff995c05ba94c</id>
<content type='text'>
This is useful to launch from a terminal without "blocking" this terminal.
There are tools like nohup and daemonize (BSD) to do the same, but having it
builtin is shorter to write.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is useful to launch from a terminal without "blocking" this terminal.
There are tools like nohup and daemonize (BSD) to do the same, but having it
builtin is shorter to write.
</pre>
</div>
</content>
</entry>
<entry>
<title>avoid unnecessary cleanups of recovery files</title>
<updated>2025-12-28T23:42:41+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-28T23:31:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=713462dfdf3c46a998b43525cbbf5ae0ec8ea84b'/>
<id>713462dfdf3c46a998b43525cbbf5ae0ec8ea84b</id>
<content type='text'>
* After the last commit 0b593eb7d0e6907b19cdbb605caf1becae351004
  we tried to clean up (unlink) recovery files for all dirty buffers.
  This resulted in superfluous file deletions before any recovery
  file was dumped; after disabling file recovery and even in
  batch mode.
  It's not tolerable that SciTECO scripts try to unlink files
  as a side effect e.g. of EW.
  Also, sometimes you may have to clean up recovery dumps even
  in batch mode, e.g. in Quit hooks.
* Also, it was broken for dirty unnamed buffers, which would
  cause glib errors.
* That's why we had to add another buffer state for
  dirty files with outdated recovery dumps (TECO_BUFFER_DIRTY_OUTDATED_DUMP).
  Once a dump was written, a buffer never directly transitions
  into the TECO_BUFFER_DIRTY_NO_DUMP state again.
  We can now reliably unlink() only where we'd expect a
  recovery file to exist in the first place.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* After the last commit 0b593eb7d0e6907b19cdbb605caf1becae351004
  we tried to clean up (unlink) recovery files for all dirty buffers.
  This resulted in superfluous file deletions before any recovery
  file was dumped; after disabling file recovery and even in
  batch mode.
  It's not tolerable that SciTECO scripts try to unlink files
  as a side effect e.g. of EW.
  Also, sometimes you may have to clean up recovery dumps even
  in batch mode, e.g. in Quit hooks.
* Also, it was broken for dirty unnamed buffers, which would
  cause glib errors.
* That's why we had to add another buffer state for
  dirty files with outdated recovery dumps (TECO_BUFFER_DIRTY_OUTDATED_DUMP).
  Once a dump was written, a buffer never directly transitions
  into the TECO_BUFFER_DIRTY_NO_DUMP state again.
  We can now reliably unlink() only where we'd expect a
  recovery file to exist in the first place.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed left-over recovery files</title>
<updated>2025-12-28T20:22:46+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-28T20:22:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=0b593eb7d0e6907b19cdbb605caf1becae351004'/>
<id>0b593eb7d0e6907b19cdbb605caf1becae351004</id>
<content type='text'>
* It was possible to provoke left-over recovery files even if the editor does *not* crash:
  1. If you dirtified the buffer (state = TECO_BUFFER_DIRTY), it would be dumped to a
     recovery file (TECO_BUFFER_DIRTY_DUMPED).
  2. If you dirtify the buffer again, the state will become TECO_BUFFER_DIRTY again,
     so it's up for dumping in the next cycle.
  3. If you now save and exit (e.g. `:EX`) the recovery file is not deleted since
     the state is not TECO_BUFFER_DIRTY_DUMPED.
* A buffer can have a recovery file both for TECO_BUFFER_DIRTY and TECO_BUFFER_DIRTY_DUMPED,
  so we must clean up afterwards in both states.
* Of course, it may __not__ yet have a recovery file in the TECO_BUFFER_DIRTY state.
  The g_unlink() might therefore be superfluous on those files.
  Moreover, if you disable recovery files, SciTECO will now still try to unlink the
  recovery file.
  These operations could only be avoided by adding yet another state, e.g.
  TECO_BUFFER_DIRTY_OUTDATED_DUMP, so that after the first dump you will never switch
  back into TECO_BUFFER_DIRTY.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* It was possible to provoke left-over recovery files even if the editor does *not* crash:
  1. If you dirtified the buffer (state = TECO_BUFFER_DIRTY), it would be dumped to a
     recovery file (TECO_BUFFER_DIRTY_DUMPED).
  2. If you dirtify the buffer again, the state will become TECO_BUFFER_DIRTY again,
     so it's up for dumping in the next cycle.
  3. If you now save and exit (e.g. `:EX`) the recovery file is not deleted since
     the state is not TECO_BUFFER_DIRTY_DUMPED.
* A buffer can have a recovery file both for TECO_BUFFER_DIRTY and TECO_BUFFER_DIRTY_DUMPED,
  so we must clean up afterwards in both states.
* Of course, it may __not__ yet have a recovery file in the TECO_BUFFER_DIRTY state.
  The g_unlink() might therefore be superfluous on those files.
  Moreover, if you disable recovery files, SciTECO will now still try to unlink the
  recovery file.
  These operations could only be avoided by adding yet another state, e.g.
  TECO_BUFFER_DIRTY_OUTDATED_DUMP, so that after the first dump you will never switch
  back into TECO_BUFFER_DIRTY.
</pre>
</div>
</content>
</entry>
<entry>
<title>teco_string_t is now passed by value like a scalar if the callee isn't expected to modify it</title>
<updated>2025-12-28T19:57:31+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-28T15:23:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=ea0a23645f03a42252ab1ce8df45ae4076ebae75'/>
<id>ea0a23645f03a42252ab1ce8df45ae4076ebae75</id>
<content type='text'>
* When passing a struct that should not be modified, I usually use a const pointer.
* Strings however are small 2-word objects and they are often now already passed via separate
  `gchar*` and gsize parameters. So it is consistent to pass teco_string_t by value as well.
  A teco_string_t will usually fit into registers just like a pointer.
* It's now obvious which function just _uses_ and which function _modifies_ a string.
  There is also no chance to pass a NULL pointer to those functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* When passing a struct that should not be modified, I usually use a const pointer.
* Strings however are small 2-word objects and they are often now already passed via separate
  `gchar*` and gsize parameters. So it is consistent to pass teco_string_t by value as well.
  A teco_string_t will usually fit into registers just like a pointer.
* It's now obvious which function just _uses_ and which function _modifies_ a string.
  There is also no chance to pass a NULL pointer to those functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Curses: use INDIC_SQUIGGLE to render rubbed-out command lines</title>
<updated>2025-12-28T19:57:31+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-28T12:03:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=d94521fb5b5a5c3a6315c425dba5f1218f0dd323'/>
<id>d94521fb5b5a5c3a6315c425dba5f1218f0dd323</id>
<content type='text'>
* This is still rendered as underlined text.
* It uses a new Scinterm upstream feature, so we can
  switch back to the upstream repo.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This is still rendered as underlined text.
* It uses a new Scinterm upstream feature, so we can
  switch back to the upstream repo.
</pre>
</div>
</content>
</entry>
<entry>
<title>TECO_DEFINE_STATE() no longer constructs callback names for mandatory callbacks, but tries to use static assertions</title>
<updated>2025-12-26T17:10:42+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-26T17:10:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=c2114fa0af73b42bc1ef302f7511ef87690cc0b1'/>
<id>c2114fa0af73b42bc1ef302f7511ef87690cc0b1</id>
<content type='text'>
* Requiring state callbacks by generating their names (e.g. NAME##_input) has several disadvantages:
  * The callback is not explicitly referenced when the state is defined.
    So an unintroduced reader will see some static function, which is nowhere referenced and still
    doesn't cause "unused" warnings.
  * You cannot choose the name of function that implements the callback freely.
  * In "substates" you need to generate a callback function if you want to provide a default.
    You also need to provide dummy wrapper functions whenever you want to reuse some existing
    function as the implementation.
* Instead, we are now using static assertions to check whether certain callbacks have been
  implemented.
  Unfortunately, this does not work on all compilers. In particular GCC won't consider
  references to state objects fully constant (even though they are) and does not allow
  them in _Static_assert (G_STATIC_ASSERT). This could only be made to work in newer GCC
  with -std=c2x or -std=gnu23 in combination with constexpr.
  It does work on Clang, though.
  So I introduced TECO_ASSERT_SAFE() which also passes if the expression is *not* constant.
  These static assertions are not crucial - they do not check anything that can differ between
  systems. So we can always rely on the checks performed by FreeBSD CI for instance.
  Also, you will of course quickly notice missing callbacks at runtime - with and without
  additional runtime assertions.
* All mandatory callbacks must still be explicitly initialized in the TECO_DEFINE_STATE calls.
* After getting rid of generated callback implementations, the TECO_DEFINE_STATE macros
  can finally be qualified with `static`.
* The TECO_DECLARE_STATE() macro has been removed. It no longer abstracts anything
  and cannot be used to declare static teco_state_t anyway.
  Also TECO_DEFINE_UNDO_CALL() also doesn't have a DECLARE counterpart.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Requiring state callbacks by generating their names (e.g. NAME##_input) has several disadvantages:
  * The callback is not explicitly referenced when the state is defined.
    So an unintroduced reader will see some static function, which is nowhere referenced and still
    doesn't cause "unused" warnings.
  * You cannot choose the name of function that implements the callback freely.
  * In "substates" you need to generate a callback function if you want to provide a default.
    You also need to provide dummy wrapper functions whenever you want to reuse some existing
    function as the implementation.
* Instead, we are now using static assertions to check whether certain callbacks have been
  implemented.
  Unfortunately, this does not work on all compilers. In particular GCC won't consider
  references to state objects fully constant (even though they are) and does not allow
  them in _Static_assert (G_STATIC_ASSERT). This could only be made to work in newer GCC
  with -std=c2x or -std=gnu23 in combination with constexpr.
  It does work on Clang, though.
  So I introduced TECO_ASSERT_SAFE() which also passes if the expression is *not* constant.
  These static assertions are not crucial - they do not check anything that can differ between
  systems. So we can always rely on the checks performed by FreeBSD CI for instance.
  Also, you will of course quickly notice missing callbacks at runtime - with and without
  additional runtime assertions.
* All mandatory callbacks must still be explicitly initialized in the TECO_DEFINE_STATE calls.
* After getting rid of generated callback implementations, the TECO_DEFINE_STATE macros
  can finally be qualified with `static`.
* The TECO_DECLARE_STATE() macro has been removed. It no longer abstracts anything
  and cannot be used to declare static teco_state_t anyway.
  Also TECO_DEFINE_UNDO_CALL() also doesn't have a DECLARE counterpart.
</pre>
</div>
</content>
</entry>
<entry>
<title>TECO_DEFINE_STATE_INSERT() no longer generates a done_cb</title>
<updated>2025-12-26T00:04:11+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-26T00:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=d7330f252e6b0a1326eac6b5fc0b219a7b706eb7'/>
<id>d7330f252e6b0a1326eac6b5fc0b219a7b706eb7</id>
<content type='text'>
This made problems in teco_state_replace_default_insert, where we had to
override the done_cb.

Perhaps we should avoid all generated callback names (ie. mandatory
callback implementations)?
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This made problems in teco_state_replace_default_insert, where we had to
override the done_cb.

Perhaps we should avoid all generated callback names (ie. mandatory
callback implementations)?
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed ^S/^Y for search-replacement commands</title>
<updated>2025-12-25T21:55:32+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-25T21:55:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=44166f53d5923be4685a69b85166ada40dc1cc10'/>
<id>44166f53d5923be4685a69b85166ada40dc1cc10</id>
<content type='text'>
It was returning the range of the search, but not of the inserted text.
Since the searched text is deleted, the range of the insertion is more useful.
It's also what was documented and what DEC TECO does.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was returning the range of the search, but not of the inserted text.
Since the searched text is deleted, the range of the insertion is more useful.
It's also what was documented and what DEC TECO does.
</pre>
</div>
</content>
</entry>
</feed>
