<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/lib/session.tes, branch lsp</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>LSP: save $SCITECO_LSP and $SCITECO_LSP_ROOT as part of buffer sessions</title>
<updated>2026-08-11T19:26:38+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-11T19:20:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=9b904f5b7e9ea45b8ea5991f6eeb19c2f3949874'/>
<id>9b904f5b7e9ea45b8ea5991f6eeb19c2f3949874</id>
<content type='text'>
If you have projects in different languages you can set different LSPs.
The default will still come from ~/.teco_ini if you decide to set one.
The default for $SCITECO_LSP_ROOT is set by session.tes' VCS integration
based on the VCS root, but you could still overwrite it per session.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If you have projects in different languages you can set different LSPs.
The default will still come from ~/.teco_ini if you decide to set one.
The default for $SCITECO_LSP_ROOT is set by session.tes' VCS integration
based on the VCS root, but you could still overwrite it per session.
</pre>
</div>
</content>
</entry>
<entry>
<title>support lookups via language servers (LSP)</title>
<updated>2026-08-10T22:38:31+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-02T13:24:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=44f5bf677282308b959411c416da2b5b08db2062'/>
<id>44f5bf677282308b959411c416da2b5b08db2062</id>
<content type='text'>
* The main interface is the `FT` command.
  `FT` was an undocumented Video TECO command for etags/ctags lookups.
  I don't want to exactly copy its interface, though.
* `FT` allows looking up symbol names,
  definitions and references.
* ctags will be supported via ctags-lsp.
  LSP support is more powerful though and works without
  regenerating TAGS files all the time.
  The LSP will also allow you to customize auto-completions
  using SciTECO itself (i.e. by writing a language server
  in SciTECO).
* For multiple results, `FT$` can be used to cycle through
  results - this should mimic repeated `S$` or `N$`.
* `:FT...$` does a fuzzy search. IMHO it's not important
  to return a status integer instead. `FT` will only
  really be used in interactive mode.
* Document synchronization is supported via hooks from
  ring.c and via Scintilla notifications.
* Currently, the LSP communication is based on blocking
  GIOChannels. This means that a misbehaving hanging
  server could "lock up" the entire editor (FIXME).
  Only on ncurses you can always kill the subprocess by
  pressing CTRL+C.
  We need helper functions in spawn.c to read and write
  with interruptions.
* The textDocument/didChange notification transmits
  not only all edits, but all files' contents as well
  during initial synchronization.
  Therefore it is optimized to write and JSON-escape
  data without copying them around in memory and without
  destroying the buffer gap.
* Use $SCITECO_LSP to configure the language server.
  You can also use `tee` to capture stdin and stdout.
  Perhaps $SCITECO_LSP should be saved in .teco_session,
  so you can change it between projects?
* $SCITECO_LSP_ROOT is used to point to the project's
  root directory. session.tes will set it up automatically.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The main interface is the `FT` command.
  `FT` was an undocumented Video TECO command for etags/ctags lookups.
  I don't want to exactly copy its interface, though.
* `FT` allows looking up symbol names,
  definitions and references.
* ctags will be supported via ctags-lsp.
  LSP support is more powerful though and works without
  regenerating TAGS files all the time.
  The LSP will also allow you to customize auto-completions
  using SciTECO itself (i.e. by writing a language server
  in SciTECO).
* For multiple results, `FT$` can be used to cycle through
  results - this should mimic repeated `S$` or `N$`.
* `:FT...$` does a fuzzy search. IMHO it's not important
  to return a status integer instead. `FT` will only
  really be used in interactive mode.
* Document synchronization is supported via hooks from
  ring.c and via Scintilla notifications.
* Currently, the LSP communication is based on blocking
  GIOChannels. This means that a misbehaving hanging
  server could "lock up" the entire editor (FIXME).
  Only on ncurses you can always kill the subprocess by
  pressing CTRL+C.
  We need helper functions in spawn.c to read and write
  with interruptions.
* The textDocument/didChange notification transmits
  not only all edits, but all files' contents as well
  during initial synchronization.
  Therefore it is optimized to write and JSON-escape
  data without copying them around in memory and without
  destroying the buffer gap.
* Use $SCITECO_LSP to configure the language server.
  You can also use `tee` to capture stdin and stdout.
  Perhaps $SCITECO_LSP should be saved in .teco_session,
  so you can change it between projects?
* $SCITECO_LSP_ROOT is used to point to the project's
  root directory. session.tes will set it up automatically.
</pre>
</div>
</content>
</entry>
<entry>
<title>&lt;EI&gt; has been repurposed and is the macro file inclusion (indirect file) command now</title>
<updated>2025-05-24T14:22:52+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-05-24T13:24:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=6e3da17a2fae11af9ae00d9b59bd0d752022e16b'/>
<id>6e3da17a2fae11af9ae00d9b59bd0d752022e16b</id>
<content type='text'>
* Improves DEC TECO-11 compatibility.
* &lt;EM&gt; is still supported as a synonym, but considered deprecated and is no longer documented.
  A warning is printed when invoked.
  It can be repurposed at any time in the future.
* `EI$` is not yet supported.
  I am unsure whether this makes any sense.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Improves DEC TECO-11 compatibility.
* &lt;EM&gt; is still supported as a synonym, but considered deprecated and is no longer documented.
  A warning is printed when invoked.
  It can be repurposed at any time in the future.
* `EI$` is not yet supported.
  I am unsure whether this makes any sense.
</pre>
</div>
</content>
</entry>
<entry>
<title>added tutorial document, which is automatically loaded on the first invocation</title>
<updated>2025-03-31T00:23:06+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-03-31T00:23:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=6afa02a161493c646e64fb6afca13de7d33fd699'/>
<id>6afa02a161493c646e64fb6afca13de7d33fd699</id>
<content type='text'>
* This is rendered with ms, so we now need the entire groff on Debian.
  This is not a big deal as it just adds a few kilobytes of build-time dependencies.
  Most platforms do not allow installation of some "groff-base" package anyway
  and always draw in the entire package.
* sciteco.tmac has been extended to disable page breaks on ms.
* The tutorial is installed like any other woman page and can be invoked
  interactively with ?tutorial$.
* It is optimized to be still usable on a plain 80x24 terminal.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This is rendered with ms, so we now need the entire groff on Debian.
  This is not a big deal as it just adds a few kilobytes of build-time dependencies.
  Most platforms do not allow installation of some "groff-base" package anyway
  and always draw in the entire package.
* sciteco.tmac has been extended to disable page breaks on ms.
* The tutorial is installed like any other woman page and can be invoked
  interactively with ?tutorial$.
* It is optimized to be still usable on a plain 80x24 terminal.
</pre>
</div>
</content>
</entry>
<entry>
<title>added session.fossil for setting up buffer sessions per Fossil repository</title>
<updated>2024-12-24T14:20:55+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-12-24T14:20:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=38d1f4c93849ab64b72a1bc7516e41d7ae99695d'/>
<id>38d1f4c93849ab64b72a1bc7516e41d7ae99695d</id>
<content type='text'>
* This goes into session.vcs as well.
* `fossil info` does not allow printing only the local-root property, so we have to do
  some parsing afterwards.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This goes into session.vcs as well.
* `fossil info` does not allow printing only the local-root property, so we have to do
  some parsing afterwards.
</pre>
</div>
</content>
</entry>
<entry>
<title>simplified session.svn: no need to mess around with XML</title>
<updated>2024-12-24T14:01:55+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-12-24T14:01:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=be23c9dbf7f7ff833c1801399a28570a87521acf'/>
<id>be23c9dbf7f7ff833c1801399a28570a87521acf</id>
<content type='text'>
* In fact, since SVN has --no-newline, this is even simpler than on Git and Mercurial.
* This requires at least Subversion v1.9 (2015, so should be safe).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* In fact, since SVN has --no-newline, this is even simpler than on Git and Mercurial.
* This requires at least Subversion v1.9 (2015, so should be safe).
</pre>
</div>
</content>
</entry>
<entry>
<title>introduced true block and EOL comments</title>
<updated>2024-12-24T10:29:32+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-12-24T10:29:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=ef897b418a4487196e1dbc18a97046f8f0aea2e8'/>
<id>ef897b418a4487196e1dbc18a97046f8f0aea2e8</id>
<content type='text'>
* The previous convention of !* ... *! are now true block comments,
  i.e. they are parsed faster, don't spam the goto table and allow
  embedding of exclamation marks - only "*!" terminates the comment.
* It is therefore now forbidden to have goto labels beginning with "*".
* Also support "!!" to introduce EOL comments (like C++'s //).
  This disallows empty labels, but they weren't useful anyway.
  This is the shortest way to begin a comment.
* All comment labels have been converted to true comments, to ensure
  that syntax highlighting works correctly.
  EOL comments are used for single line commented-out code, since it's
  easiest to uncomment - you don't have to jump to the line end.
  This is a pure convention / coding style.
  Other people might do it differently.
* It's of course still possible to abuse goto labels as comments
  as TECO did for ages.
* In lexing / syntax highlighting, labels and comments are highlighted differently.
* When syntax highlighting, a single "!" will first be highlighted as a label
  since it's not yet unambiguous. Once you type the second character (* or !),
  the first character is retroactively styled as a comment as well.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The previous convention of !* ... *! are now true block comments,
  i.e. they are parsed faster, don't spam the goto table and allow
  embedding of exclamation marks - only "*!" terminates the comment.
* It is therefore now forbidden to have goto labels beginning with "*".
* Also support "!!" to introduce EOL comments (like C++'s //).
  This disallows empty labels, but they weren't useful anyway.
  This is the shortest way to begin a comment.
* All comment labels have been converted to true comments, to ensure
  that syntax highlighting works correctly.
  EOL comments are used for single line commented-out code, since it's
  easiest to uncomment - you don't have to jump to the line end.
  This is a pure convention / coding style.
  Other people might do it differently.
* It's of course still possible to abuse goto labels as comments
  as TECO did for ages.
* In lexing / syntax highlighting, labels and comments are highlighted differently.
* When syntax highlighting, a single "!" will first be highlighted as a label
  since it's not yet unambiguous. Once you type the second character (* or !),
  the first character is retroactively styled as a comment as well.
</pre>
</div>
</content>
</entry>
<entry>
<title>session.tes: store the current tab style (width and hard-tabs); fixed for filenames containing ASCII 27</title>
<updated>2024-11-11T15:33:07+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-11T15:33:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=eff72334e1896062de24a4eb60c2d5899bba11cd'/>
<id>eff72334e1896062de24a4eb60c2d5899bba11cd</id>
<content type='text'>
* You can now set a per-file tab style, that differs from the defaults established
  in the ED hook.
  This is important especially since we do not yet support per-project .teco_ini
  scripts where you could establish differing policies depending on the VCS repository.
  (The latter would be easy to implement, but we cannot currently easily extend the
  existing ED hooks.)
* It's unlikely that files contain an ASCII 27, but not impossible.
  Therefore we now use ASCII 0 (^@) as a terminator.
  This indeed be safe under UNIX.
  Even better would be a string building construct for escaping ASCII 27 ($), though,
  as that would work with arbitrary bytes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* You can now set a per-file tab style, that differs from the defaults established
  in the ED hook.
  This is important especially since we do not yet support per-project .teco_ini
  scripts where you could establish differing policies depending on the VCS repository.
  (The latter would be easy to implement, but we cannot currently easily extend the
  existing ED hooks.)
* It's unlikely that files contain an ASCII 27, but not impossible.
  Therefore we now use ASCII 0 (^@) as a terminator.
  This indeed be safe under UNIX.
  Even better would be a string building construct for escaping ASCII 27 ($), though,
  as that would work with arbitrary bytes.
</pre>
</div>
</content>
</entry>
<entry>
<title>globbing supports character classes now and ^EN string building construct to escape glob patterns</title>
<updated>2016-11-01T06:23:49+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2016-11-01T05:58:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=9f6cba5c0370aee2f9803abbc35ab7e67f57ee84'/>
<id>9f6cba5c0370aee2f9803abbc35ab7e67f57ee84</id>
<content type='text'>
 * globbing is fnmatch(3) compatible, now on every supported platform.
 * which means that escaping of glob patterns is possible now.
   ^ENq has been introduced to ease this task.
 * This finally allows you to pass unmodified filenames to EB.
   Previously it was impossible to open file names containing glob wildcards.
 * this was achieved by moving from GPattern to GRegex as the underlying
   implementation.
 * The glob pattern is converted to a regular expression before being
   compiled to a GRegex.
   This turned out to be trickier than anticipated (~140 lines of code)
   and has a runtime penalty of course (complexity is O(2*n) over the
   pattern length).
   It is IMHO still better than the alternatives, like importing
   external code from libiberty, which is potentially non-cross-platform.
 * Using GRegex also opens the potential of supporting brace "expansions"
   later in the form of glob pattern constructs
   (they won't actually expand but match alternatives).
 * is_glob_pattern() has been simplified and moved to Globber::is_pattern().
   It makes sense to reuse the Globber class namespace instead of using
   plain functions for functions working on glob patterns.
 * The documentation has a new subsection on glob patterns now.
 * Testsuite extended with glob pattern test cases
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 * globbing is fnmatch(3) compatible, now on every supported platform.
 * which means that escaping of glob patterns is possible now.
   ^ENq has been introduced to ease this task.
 * This finally allows you to pass unmodified filenames to EB.
   Previously it was impossible to open file names containing glob wildcards.
 * this was achieved by moving from GPattern to GRegex as the underlying
   implementation.
 * The glob pattern is converted to a regular expression before being
   compiled to a GRegex.
   This turned out to be trickier than anticipated (~140 lines of code)
   and has a runtime penalty of course (complexity is O(2*n) over the
   pattern length).
   It is IMHO still better than the alternatives, like importing
   external code from libiberty, which is potentially non-cross-platform.
 * Using GRegex also opens the potential of supporting brace "expansions"
   later in the form of glob pattern constructs
   (they won't actually expand but match alternatives).
 * is_glob_pattern() has been simplified and moved to Globber::is_pattern().
   It makes sense to reuse the Globber class namespace instead of using
   plain functions for functions working on glob patterns.
 * The documentation has a new subsection on glob patterns now.
 * Testsuite extended with glob pattern test cases
</pre>
</div>
</content>
</entry>
<entry>
<title>session.tes: save and restore the working directory as part of the session</title>
<updated>2016-04-05T15:34:53+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2016-04-05T15:05:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=9e97b5820975cb44775f62805dc6366d7eec3411'/>
<id>9e97b5820975cb44775f62805dc6366d7eec3411</id>
<content type='text'>
 * turned out to be a very handy feature
 * can be turned off by setting register `session.savedir` to false
 * also fixed the line endings in .teco_session files to line-feed (ie. native)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 * turned out to be a very handy feature
 * can be turned off by setting register `session.savedir` to false
 * also fixed the line endings in .teco_session files to line-feed (ie. native)
</pre>
</div>
</content>
</entry>
</feed>
