<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/src/interface-gtk/interface.c, branch v2.5.2</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>GTK: SIGTERM/SIGHUP always terminates the program and dumps recovery files</title>
<updated>2026-04-12T21:00:40+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-04-12T19:47:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=0a8770ac7d382df8976b2448fccc6cfe434cd4d1'/>
<id>0a8770ac7d382df8976b2448fccc6cfe434cd4d1</id>
<content type='text'>
* SIGTERM used to insert the ^KCLOSE key macro.
  However with the default ^KCLOSE macro, which inserts `EX`,
  this may fail to terminate the editor if buffers are modified.
  If the process is consequently killed by a non-ignorable signal,
  we may still loose data.
* SIGTERM is used to gracefully shut down, so we now always terminate.
  Since we have recovery files, they are now dumped before terminating.
  This makes sure that recovery files are more up-to-date during
  unexpected but gracefull terminations.
* The same functionality is planned on Curses, but requires more fundamental
  changes (TODO).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* SIGTERM used to insert the ^KCLOSE key macro.
  However with the default ^KCLOSE macro, which inserts `EX`,
  this may fail to terminate the editor if buffers are modified.
  If the process is consequently killed by a non-ignorable signal,
  we may still loose data.
* SIGTERM is used to gracefully shut down, so we now always terminate.
  Since we have recovery files, they are now dumped before terminating.
  This makes sure that recovery files are more up-to-date during
  unexpected but gracefull terminations.
* The same functionality is planned on Curses, but requires more fundamental
  changes (TODO).
</pre>
</div>
</content>
</entry>
<entry>
<title>Gtk: fixed interaction between `^T` and main input handling</title>
<updated>2026-04-05T20:58:47+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-04-05T08:01:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=0e3d6c84a52326a1069fe4f7adc2930b974dfa5f'/>
<id>0e3d6c84a52326a1069fe4f7adc2930b974dfa5f</id>
<content type='text'>
Between calls to `^T`, the original key-press-event handler might
enqueue events, that we must first process and report with `^T`.
Otherwise it would be easy to provoke apparent double-reporting of keys after
input loops like `&lt;^T:;&gt;`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Between calls to `^T`, the original key-press-event handler might
enqueue events, that we must first process and report with `^T`.
Otherwise it would be easy to provoke apparent double-reporting of keys after
input loops like `&lt;^T:;&gt;`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Curses: handle window resizes when blocking in `^T` and don't return function keys</title>
<updated>2026-04-04T12:04:48+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-04-04T11:48:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=0f39109d6bb4ed14b51164791621620cc6b5d461'/>
<id>0f39109d6bb4ed14b51164791621620cc6b5d461</id>
<content type='text'>
* There was a logic error in teco_interface_getch() that caused Curses function key
  codes to be returned directly. These codes however are useless to macro authors and
  can be confused with codepoints. You cannot report function keys in the same "namespace"
  along with Unicode codepoints.
  They are now filtered out.
* Also make sure that Backspace and Return are reported as 8 and 10 respectively
  in all Curses variants.
  All control codes reported by Curses are passed down unmodified - in contrast to
  the command-line input handling. I.e. 13 is not normalized to 10.
* PDCursesMod/WinGUI may return bogus key presses, that also have to be filtered out
  as we already did in the main input handling.
  A function teco_interface_check_key() has been introduced.
* NOTE: teco_interface_blocking_getch() already makes sure that recovery files are dumped
  even when blocking in `^T`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* There was a logic error in teco_interface_getch() that caused Curses function key
  codes to be returned directly. These codes however are useless to macro authors and
  can be confused with codepoints. You cannot report function keys in the same "namespace"
  along with Unicode codepoints.
  They are now filtered out.
* Also make sure that Backspace and Return are reported as 8 and 10 respectively
  in all Curses variants.
  All control codes reported by Curses are passed down unmodified - in contrast to
  the command-line input handling. I.e. 13 is not normalized to 10.
* PDCursesMod/WinGUI may return bogus key presses, that also have to be filtered out
  as we already did in the main input handling.
  A function teco_interface_check_key() has been introduced.
* NOTE: teco_interface_blocking_getch() already makes sure that recovery files are dumped
  even when blocking in `^T`.
</pre>
</div>
</content>
</entry>
<entry>
<title>GTK: fixed --detach and support stdout/stderr redirections</title>
<updated>2026-01-24T15:37:27+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-01-24T15:29:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=7ff541040edc3b3f8a25bb69e04ecb57cba12954'/>
<id>7ff541040edc3b3f8a25bb69e04ecb57cba12954</id>
<content type='text'>
* We fork after command line arguments have been parsed, which
  is after gtk_get_option_group() has been called.
  This means that GTK was already initialized and it wasn't safe
  to continue after forking.
* As a workaround, we now re-exec with the original argv array,
  so GTK can be properly reinitialized.
  Since we did not remove `--detach` from argv (and that would be
  nontrivial), it would fork again endlessly,
  so we use an environment variable
  $__SCITECO_DETACHED to guard against recursive forks.
* Also, do not close stdin/stdout/stderr if has been redirected
  to a file, so you can now e.g. call `gsciteco -d &gt;some-file`.
* This was broken since v2.5.0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* We fork after command line arguments have been parsed, which
  is after gtk_get_option_group() has been called.
  This means that GTK was already initialized and it wasn't safe
  to continue after forking.
* As a workaround, we now re-exec with the original argv array,
  so GTK can be properly reinitialized.
  Since we did not remove `--detach` from argv (and that would be
  nontrivial), it would fork again endlessly,
  so we use an environment variable
  $__SCITECO_DETACHED to guard against recursive forks.
* Also, do not close stdin/stdout/stderr if has been redirected
  to a file, so you can now e.g. call `gsciteco -d &gt;some-file`.
* This was broken since v2.5.0.
</pre>
</div>
</content>
</entry>
<entry>
<title>GTK: fixed bogus "(Unnamed)" strings in the message line</title>
<updated>2026-01-09T09:45:41+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-01-09T09:45:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=a10e3bb5da5d6e1ecfa726729b0d8aaf6320f3eb'/>
<id>a10e3bb5da5d6e1ecfa726729b0d8aaf6320f3eb</id>
<content type='text'>
* An empty message line would actually contain "(Unnamed)".
* Info popups must discern the "(Unnamed)" string (e.g. a file with that name)
  from the actual unnamed buffer since when clicking the unnamed buffer, you
  must insert nothing (`EB$`). Therefore, the unnamed buffer is represented
  as an empty string. "(Unnamed)" is just a placeholder for rendering.
  This was carried over into TecoGtkLabel which always rendered the empty string
  as "(Unnamed)".
  But TecoGtkLabels are used for the info and message lines as well.
* Therefore the fallback/placeholder string is now configurable per label.
* On the downside, this wastes one more machine word per TecoGtkLabel.
  The alternative would have been to use {NULL, 0} as the representation
  for unnamed buffers, so you can actually discern the empty string from the
  unnamed buffer representation.
  However it feels wrong to have this kind of info-popup-specific handling
  in a more generic label widget.
  Also, for consistency we'd have to touch the Curses UI as well where
  the unnamed buffer is also currently internally represented by empty
  strings (as opposed to NULL).
* Regression introduced by 0c89fb700957e411885e7e7835e15f441e8b5e84,
  so it was in v2.5.0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* An empty message line would actually contain "(Unnamed)".
* Info popups must discern the "(Unnamed)" string (e.g. a file with that name)
  from the actual unnamed buffer since when clicking the unnamed buffer, you
  must insert nothing (`EB$`). Therefore, the unnamed buffer is represented
  as an empty string. "(Unnamed)" is just a placeholder for rendering.
  This was carried over into TecoGtkLabel which always rendered the empty string
  as "(Unnamed)".
  But TecoGtkLabels are used for the info and message lines as well.
* Therefore the fallback/placeholder string is now configurable per label.
* On the downside, this wastes one more machine word per TecoGtkLabel.
  The alternative would have been to use {NULL, 0} as the representation
  for unnamed buffers, so you can actually discern the empty string from the
  unnamed buffer representation.
  However it feels wrong to have this kind of info-popup-specific handling
  in a more generic label widget.
  Also, for consistency we'd have to touch the Curses UI as well where
  the unnamed buffer is also currently internally represented by empty
  strings (as opposed to NULL).
* Regression introduced by 0c89fb700957e411885e7e7835e15f441e8b5e84,
  so it was in v2.5.0.
</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>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>fixed clicking the "(Unnamed)" buffer in 0EB popups</title>
<updated>2025-12-23T12:54:17+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-23T12:54:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=0c89fb700957e411885e7e7835e15f441e8b5e84'/>
<id>0c89fb700957e411885e7e7835e15f441e8b5e84</id>
<content type='text'>
* When constructing the list of popup items, the unnamed buffer is stored as the empty string
  instead of a prerendered "(Unnamed)".
  Using the empty string simplifies autocompletions, which will actually have to insert nothing
  at all (in addition to terminating the string).
* Since unnamed buffers are now special in the popup list, we can render them with special
  icons as well.
  Currently, only on Curses we use a file symbol with a question mark.
  There doesn't appear to be a fitting standard Freedesktop icon to use on GTK and there
  isn't even any fitting standard emblem to lay over the default file icon.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* When constructing the list of popup items, the unnamed buffer is stored as the empty string
  instead of a prerendered "(Unnamed)".
  Using the empty string simplifies autocompletions, which will actually have to insert nothing
  at all (in addition to terminating the string).
* Since unnamed buffers are now special in the popup list, we can render them with special
  icons as well.
  Currently, only on Curses we use a file symbol with a question mark.
  There doesn't appear to be a fitting standard Freedesktop icon to use on GTK and there
  isn't even any fitting standard emblem to lay over the default file icon.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixup: renamed "backups" to "recovery files"</title>
<updated>2025-12-19T22:25:48+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-19T22:25:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=2592ef74ab2eba57c32fe21993ce01e9698b106f'/>
<id>2592ef74ab2eba57c32fe21993ce01e9698b106f</id>
<content type='text'>
* Other editors call "backup files" previous copies of saved files.
  This role would be served by savepoint files in SciTECO.
* Likewise filename~ would point to such a backup file.
  It therefore makes sense that savepoint files also end in tildes (.teco-n-filename~).
* Security copies of modified buffers would be called "auto-saves" (Emacs) or
  "swap files" (Vim).
  Both of these terms is IMHO misleading, so SciTECO now uses the
  term "recovery file".
* "Recovery files" are now named #filename# just like in Emacs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Other editors call "backup files" previous copies of saved files.
  This role would be served by savepoint files in SciTECO.
* Likewise filename~ would point to such a backup file.
  It therefore makes sense that savepoint files also end in tildes (.teco-n-filename~).
* Security copies of modified buffers would be called "auto-saves" (Emacs) or
  "swap files" (Vim).
  Both of these terms is IMHO misleading, so SciTECO now uses the
  term "recovery file".
* "Recovery files" are now named #filename# just like in Emacs.
</pre>
</div>
</content>
</entry>
</feed>
