<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/lib/opener.tes, 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>`^A` now accepts an optional integer to specify the message severity</title>
<updated>2026-04-14T21:19:45+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-04-13T23:16:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=34af154e92383161666751ca69a288c98f5cca60'/>
<id>34af154e92383161666751ca69a288c98f5cca60</id>
<content type='text'>
* I.e. you can now log warnings and errors from SciTECO code as well.
* We do not need a version of ^A accepting code points, since this is
  supported by ^T already.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* I.e. you can now log warnings and errors from SciTECO code as well.
* We do not need a version of ^A accepting code points, since this is
  supported by ^T already.
</pre>
</div>
</content>
</entry>
<entry>
<title>opener.check-recovery now checks for and warns about the presence of recovery `#files#`</title>
<updated>2026-04-13T14:44:34+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-04-13T14:44:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=cd48ea8f00567f30d9685f96a12b8f123a121f62'/>
<id>cd48ea8f00567f30d9685f96a12b8f123a121f62</id>
<content type='text'>
* This could have been in ring.c, but in the future we may want to script
  the behavior in case recovery files are detected.
* The warnings are currently written as user messages, which looks
  ugly in interactive mode.
  Once n^A is supported, we can write them as regular warnings, though (FIXME).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This could have been in ring.c, but in the future we may want to script
  the behavior in case recovery files are detected.
* The warnings are currently written as user messages, which looks
  ugly in interactive mode.
  Once n^A is supported, we can write them as regular warnings, though (FIXME).
</pre>
</div>
</content>
</entry>
<entry>
<title>command-line arguments are no longer passed via the unnamed buffer, but via special Q-registers ^Ax</title>
<updated>2025-08-06T13:46:37+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-08-06T13:46:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=280cb9da39fc7b5357f6071926d511394f6d0152'/>
<id>280cb9da39fc7b5357f6071926d511394f6d0152</id>
<content type='text'>
* The unnamed buffer is also used for reading from --stdin, so you couldn't practically combine
  --stdin with passing command-line arguments to macros.
* The old approach of passing command-line arguments via lines in the
  unnamed buffer was flawed anyway as it wouldn't work with filenames containing LF.
  This is just a very ancient feature, written when there weren't even long Q-reg names in SciTECO.
* You can now e.g. pipe into SciTECO and edit what was read interactively, e.g. `dmesg | sciteco -i`.
  You can practically use SciTECO as a pager.
* htbl.tes is now a command-line filter (uses -qio).
* grosciteco.tes reads Troff intermediate code from stdin, so we no longer need
  "*.intermediate" temporary files.
* added a getopt.tes test case to the testsuite.
* This change unfortunately breaks most macros accepting command-line arguments,
  even if they used getopt.tes.
  It also requires updating ~/.teco_ini - see fallback.teco_ini.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The unnamed buffer is also used for reading from --stdin, so you couldn't practically combine
  --stdin with passing command-line arguments to macros.
* The old approach of passing command-line arguments via lines in the
  unnamed buffer was flawed anyway as it wouldn't work with filenames containing LF.
  This is just a very ancient feature, written when there weren't even long Q-reg names in SciTECO.
* You can now e.g. pipe into SciTECO and edit what was read interactively, e.g. `dmesg | sciteco -i`.
  You can practically use SciTECO as a pager.
* htbl.tes is now a command-line filter (uses -qio).
* grosciteco.tes reads Troff intermediate code from stdin, so we no longer need
  "*.intermediate" temporary files.
* added a getopt.tes test case to the testsuite.
* This change unfortunately breaks most macros accepting command-line arguments,
  even if they used getopt.tes.
  It also requires updating ~/.teco_ini - see fallback.teco_ini.
</pre>
</div>
</content>
</entry>
<entry>
<title>opener.tes: Fixed +line,column syntax</title>
<updated>2025-04-26T23:55:06+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-04-26T21:44:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=3a1eaff81196650214bcdbee3c98098ed02f77cb'/>
<id>3a1eaff81196650214bcdbee3c98098ed02f77cb</id>
<content type='text'>
* After detecting +line[,column] constructs, the next argument is not parsed as a potential
  filename:line[:column] construct.
* This code turned out to be tricky to get right, so I added a test case.
  Standard library modules can well be checked in the test suite since
  we have $SCITECOPATH pointing to the source tree's lib/ directory.
* Make sure that relevant variables from atlocal.in are really exported into the
  process environment.
  This was also broken for the Glib debug options.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* After detecting +line[,column] constructs, the next argument is not parsed as a potential
  filename:line[:column] construct.
* This code turned out to be tricky to get right, so I added a test case.
  Standard library modules can well be checked in the test suite since
  we have $SCITECOPATH pointing to the source tree's lib/ directory.
* Make sure that relevant variables from atlocal.in are really exported into the
  process environment.
  This was also broken for the Glib debug options.
</pre>
</div>
</content>
</entry>
<entry>
<title>opener.tes: fixed opening filename:line if filename has trailing digits</title>
<updated>2025-03-30T22:45:26+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-03-30T22:45:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=f700268228c20548dc7d3fb756ef6286931e396c'/>
<id>f700268228c20548dc7d3fb756ef6286931e396c</id>
<content type='text'>
The trailing digits where cut off the filename.
E.g. when trying `sciteco test.f77:100`, we would open test.f on line 100 instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The trailing digits where cut off the filename.
E.g. when trying `sciteco test.f77:100`, we would open test.f on line 100 instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>harmonized all word-movement and deletion commands: they move/delete until the beginning of words now</title>
<updated>2025-03-22T11:13:53+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-03-22T10:45:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=867d22e419afe769f05ad26b61c6ea5ea1432c3c'/>
<id>867d22e419afe769f05ad26b61c6ea5ea1432c3c</id>
<content type='text'>
* All commands and their documentations were inconsistent.
  * ^W rubbed out to the beginning of words.
  * Shift+Right (fnkeys.tes) moved to the beginning of the next word if
    invoked at the beginning of a word and to the end of the next word otherwise.
  * &lt;W&gt; (and &lt;V&gt; and &lt;Y&gt; by extension) moved to the end of the next word.
  * The cheat sheet would claim that &lt;W&gt; moves to the beginning of the next word.
* Video TECO's &lt;W&gt; command would differ again from everything else.
  With positive arguments, it moved to the beginning of words, while
  with negative it moved to end of words.
  I decided not to copy this behavior.
* It has been decided to adopt a consistent beginning-of-words policy.
  -W therefore differs from Video TECO in moving to the beginning of the
  current or previous word.
* teco_find_words() is now based on parsing the document pointer, instead
  of relying on SCI_WORDENDPOSITION, since the latter cannot actually be
  used to skip strictly non-word characters.
  This requires a constant amount of Scintilla messages but will require fewer
  messages only when moving for more than 3 words.
* The semantics of &lt;W&gt; are therefore now consistent with Vim and Emacs as well.
* Shift+Right/Left is still based on SCI_WORDENDPOSITION, so it's behavior
  differs slightly from &lt;W&gt; for instance at the end of lines, as it will
  stop at linebreaks.
* Unfortunately, these changes will break lots of macros, among others
  the M#rf, M#sp and git.blame macros ("Useful macros" from the wiki).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* All commands and their documentations were inconsistent.
  * ^W rubbed out to the beginning of words.
  * Shift+Right (fnkeys.tes) moved to the beginning of the next word if
    invoked at the beginning of a word and to the end of the next word otherwise.
  * &lt;W&gt; (and &lt;V&gt; and &lt;Y&gt; by extension) moved to the end of the next word.
  * The cheat sheet would claim that &lt;W&gt; moves to the beginning of the next word.
* Video TECO's &lt;W&gt; command would differ again from everything else.
  With positive arguments, it moved to the beginning of words, while
  with negative it moved to end of words.
  I decided not to copy this behavior.
* It has been decided to adopt a consistent beginning-of-words policy.
  -W therefore differs from Video TECO in moving to the beginning of the
  current or previous word.
* teco_find_words() is now based on parsing the document pointer, instead
  of relying on SCI_WORDENDPOSITION, since the latter cannot actually be
  used to skip strictly non-word characters.
  This requires a constant amount of Scintilla messages but will require fewer
  messages only when moving for more than 3 words.
* The semantics of &lt;W&gt; are therefore now consistent with Vim and Emacs as well.
* Shift+Right/Left is still based on SCI_WORDENDPOSITION, so it's behavior
  differs slightly from &lt;W&gt; for instance at the end of lines, as it will
  stop at linebreaks.
* Unfortunately, these changes will break lots of macros, among others
  the M#rf, M#sp and git.blame macros ("Useful macros" from the wiki).
</pre>
</div>
</content>
</entry>
<entry>
<title>support +line[,column] and filename:line:column syntaxes when opening files</title>
<updated>2024-12-30T02:00:44+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-12-30T02:00:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=e2eff00a9c0d89a196bb297b4958473a681ddfee'/>
<id>e2eff00a9c0d89a196bb297b4958473a681ddfee</id>
<content type='text'>
* This is done via the new opener.tes in the standard library.
* Some programs that use $EDITOR expect the +line syntax to work.
* You can copy filename:line:column directly from GCC error messages
  and filename:line from grep output.
* Since there may be safe file names beginning with "+" or containing colons,
  there needs to be a way to turn this off, especially for scripts that don't
  know anything about the filenames to open.
  This is done with "--".
  Unfortunately, the first "--", that stops parameter processing,
  is always removed from the command line and not passed down into TECO land.
  This is not a problem for stand-alone scripts,
  since the script filename is already stopping option processing, so "--"
  would get passed down.
  But when calling the profile via `sciteco -- ...`, you could prevent leading
  minus signs to cause problems but since the `--` is removed, opener.tes cannot
  use it as a hint.
  Therefore, we introduced `-S` as a new alternative to `--`, that's always passed
  down as `--` (i.e. it is equivalent to "-- --").
  In other words, `sciteco -S *` will always open exactly the specified files
  without any danger of misinterpreting certain file names.
  Should we ever switch to a custom option parsing algorithm, we might preserve
  "--" (unless after --mung) and thus get rid of "-S".
* This advanced behavior can be tweaked by the user relatively easily.
  In the easiest case, we could replace M[opener] with
  &lt;:L;R 0X.f [* @EB/^EN.f/ ]* L&gt;
  in ~/.teco_ini to completely disable the special syntax.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This is done via the new opener.tes in the standard library.
* Some programs that use $EDITOR expect the +line syntax to work.
* You can copy filename:line:column directly from GCC error messages
  and filename:line from grep output.
* Since there may be safe file names beginning with "+" or containing colons,
  there needs to be a way to turn this off, especially for scripts that don't
  know anything about the filenames to open.
  This is done with "--".
  Unfortunately, the first "--", that stops parameter processing,
  is always removed from the command line and not passed down into TECO land.
  This is not a problem for stand-alone scripts,
  since the script filename is already stopping option processing, so "--"
  would get passed down.
  But when calling the profile via `sciteco -- ...`, you could prevent leading
  minus signs to cause problems but since the `--` is removed, opener.tes cannot
  use it as a hint.
  Therefore, we introduced `-S` as a new alternative to `--`, that's always passed
  down as `--` (i.e. it is equivalent to "-- --").
  In other words, `sciteco -S *` will always open exactly the specified files
  without any danger of misinterpreting certain file names.
  Should we ever switch to a custom option parsing algorithm, we might preserve
  "--" (unless after --mung) and thus get rid of "-S".
* This advanced behavior can be tweaked by the user relatively easily.
  In the easiest case, we could replace M[opener] with
  &lt;:L;R 0X.f [* @EB/^EN.f/ ]* L&gt;
  in ~/.teco_ini to completely disable the special syntax.
</pre>
</div>
</content>
</entry>
</feed>
