aboutsummaryrefslogtreecommitdiffhomepage
path: root/TODO
AgeCommit message (Collapse)AuthorFilesLines
12 daysupdated all links to the new "Knowledge Base" and mention mailing listsRobin Haberkorn1-1/+1
* The Knowledge Base replaces the Github wiki. * The mailing lists replace the Github bug tracker, discussions and pull requests.
2025-09-14ncurses: avoid the middle mouse button workaround in newer ncurses versionsRobin Haberkorn1-9/+8
My patch has been merged, so there is no need to keep the workaround in newer versions. See https://lists.gnu.org/archive/html/bug-ncurses/2025-09/msg00027.html
2025-09-09work around ncurses mouse handling bugsRobin Haberkorn1-0/+11
* We have to process several mouse events for every KEY_MOUSE. * The order of events is sort of arbitrary after clicking the middle mouse button in some terminal emulators like st and Xterm. Therefore BUTTON2_PRESSED is now ignored and resynthesized when receiving BUTTON2_RELEASED. This fixes loosing middle click events. fnkeys.tes only processes the RELEASED event anyway. I am still looking for a fix to contribute to the ncurses project. * In GNOME Terminal and Xterm with the SGR mouse protocol, you can receive bogus BUTTON3_PRESSED events when left scrolling. There is an upstream fix. As a workaround -- we will have to live with outdated ncurses versions anyway -- we prevent resetting the mouse mask unnecessarily. This limits the effects to a single bogus BUTTON3_PRESSED event. Unfortunately, it's not easily possible to force ncurses into using the X10 mouse protocol even if the terminfo entry claims SGR compatibility. See also https://lists.gnu.org/archive/html/bug-ncurses/2025-09/msg00016.html
2025-08-31README: mention OBS release and nightly buildsRobin Haberkorn1-9/+3
2025-08-31support <:O>: if a label is not found, continue execution after the go-to ↵Robin Haberkorn1-3/+0
statement * this is a SciTECO extension - it's not in TECO-11 * Allows for select-case-like constructs with default-clauses as in :Os.^EQa$ !* default *! !s.foo! !* ... *! !s.bar! !* ... *! * Consistent with nOlabel0,label1,...$ if <n> is out of range. Unfortunately this form of computed goto is not applicable when "selecting" by strings or non-consecutive integers. * In order to continue after the <:O> statement, we must keep the program counter along with the label we were looking for. At the end of the macro, the PC is restored instead of throwing an error. * Since that would be very inefficient in loops - where potentially all iterations would result in rescanning till the end of the macro - we now store a completed-flag in the goto table. If it is set while trying to :O to an unknown label, we can just continue execution.
2025-08-26bumped minimum GCC version to v8.1Robin Haberkorn1-0/+8
Scintilla v5.5.7 officially requires at least GCC v9, but if it's only the charconv header that's required from newer releases, v8.1 will probably do as well. We assume so until proven wrong.
2025-08-21fully support NetBSD with its native libcursesRobin Haberkorn1-0/+6
* It requires a forced refresh on startup (even though that should be the default). Otherwise, it wouldn't print the info line correctly. * Redirect stdin and pass it to newterm() to fix key queuing. Probably necessary for supporting ncurses on NetBSD as well. * Avoid doupdate() if screen is too small: fixes crashes for very small windows. * Updated Scintilla: There were some implicit typing assumptions, that are broken by this platform.
2025-08-16updated README, NEWS and TODORobin Haberkorn1-33/+69
Esp. mention the new OBS repositories.
2025-07-26support :=/:==/:=== commands: print number without trailing linefeedRobin Haberkorn1-1/+0
2025-07-26implemented the <^A> command for printing arbitrary stringsRobin Haberkorn1-1/+1
* Greatly improved usability as a scripting language. * The command is in DEC TECO, but in contrast to DEC TECO, we also support string building constructs in ^A. * Required some refactoring: As we want it to write everything verbatim to stdout, the per-interface method is now teco_interface_msg_literal() and it has to deal with unprintable characters. When displaying in the UI, we use teco_curses_format_str() and TecoGtkLabel functions/widgets to deal with possible control codes. * Numbers printed with `=` have to be written with a trailing linefeed, which would also be visible as a reverse "LF" in the UI. Not sure whether this is acceptable - the alternative would be to strip the strings before displaying them. * Messages written to stdout are also auto-flushed at the moment. In the future we might want to put flushing under control of the language. Perhaps :^A could inhibit the flushing.
2025-07-23ncurses: support the window title on XTerm-like emulatorsRobin Haberkorn1-4/+0
* Many terminal emulators won't have the status-line terminfo capabilities but still support OSC-0 escape sequences for setting the window title. This affects the real XTerm, rxvt-based and many emulators that claim to be XTerm via $TERM (e.g. GNOME Console). * It seems we can safely assume that any emulator with $TERM beginning with "xterm" or "rxvt" does in fact have OSC-0 or at least ignores it. The number of whitelisted emulators might be extended later on. This way, we don't have to add another ED flag. * We still give precendence to the to_status_line/from_status_line capabilities if they are in terminfo.
2025-07-21support <==> and <===> for printing octal and hexadecimal numbersRobin Haberkorn1-0/+1
* These are famously in DEC TECO-11, but also in Video TECO. * The implementation is tricky. They need to use lookahead states, but this would be inacceptable during interactive execution. Therefore only if executing from the end of the command line `==` and `===` are allowed to print multiple values. The number is therefore also not popped form the stack immediately but only peeked. It's popped only when it has been decided that the command has ended. * This may break existing macros that use multiple `=` in a row to print multiple values from the stack. You will now e.g. have to insert whitespace to separate such `=` commands.
2025-07-20document bug: you cannot currently use `{` and `}` to insert anything after ↵Robin Haberkorn1-0/+2
$$ into the commandline
2025-07-19<EW> now accepts a numeric argument to specify the buffer to saveRobin Haberkorn1-4/+5
* In this case we always save the given buffer and never the current Q-Register. * The current Q-Register is only saved without any numeric argument. The same semantics make sense for <EF> so that Q*EF closes the current buffer even when editing a Q-Register. * This variant is present in Video TECO.
2025-07-18<nEL> (set EOL mode) now sets the buffer's dirty flagRobin Haberkorn1-4/+0
* While it doesn't directly change the buffer's contents in bytes, a subsequent write would result in a different file on disk, so it is consequent to remind the user of saving or discarding changes. * Will also fix :EX after changing the EOL mode.
2025-07-13implemented <ER> command for reading a file into the current bufferRobin Haberkorn1-3/+1
* This command exists in Video TECO. In Video TECO it also supports reading multiple files with a glob pattern -- we do not support that as I am not convinced of its usefulness. * teco_view_load() has been extended, so it can read into dot without discarding the existing document.
2025-07-11<EF> supports a numeric buffer id nowRobin Haberkorn1-1/+3
* ED hooks are not executed in this case * <EF> is now allowed even when editing a Q-Reg, unless you try to close the current buffer
2025-07-04implemented <^B> for returning the current dateRobin Haberkorn1-1/+0
* It is encoded with the same formula as on VAX/VMS on TECO-11, on TECOC and TECO-64. * As an extension, when colon-modified it returns the number of seconds since the epoch. It might be even more useful to return the microseconds since the epoch, but that would require 64-bit integers, which can theoretically be disabled at build time.
2025-07-03implemented ^E<code> string building constructs for embedding bytes and ↵Robin Haberkorn1-10/+0
codepoints in a strtoul()-like manner
2025-06-15require and adapted to PDCurses v4.5.1Robin Haberkorn1-3/+0
* PDCurses is practically used only for Windows builds, which only I build presumably, so it should be okay to bump the version. * Older PDCurses versions had serious problems like not detecting BUTTONX_RELEASED events. This was worked around and is fixed now. Even the Wincon version behaves like ncurses now with regard to mouse events. * We no longer have to support processing BUTTONX_CLICKED events. On the downside the mouse mask had to be adapted. * See also https://github.com/Bill-Gray/PDCursesMod/issues/330 * We also no longer have to call resize_term(0,0).
2025-06-08^S/^Y calculates the glyph offsets earlierRobin Haberkorn1-1/+0
* Previously, deleting text after a text match or insertion could result in wrong ^S/^Y results. In particular, the amount of characters deleted by <FD> at the end of a buffer couldn't be queried. * This also fixes the M#rf (reflow paragraph) macro.
2025-06-07updated README and TODORobin Haberkorn1-19/+31
2025-05-03updated TODORobin Haberkorn1-1/+43
2025-04-19updated ChangeLog and TODO for v2.4.0 releasev2.4.0Robin Haberkorn1-26/+77
* ChangeLogs now contain the dates of all releases. * The FreeBSD package must practically be updated after uploading the release tarball.
2025-03-29bumped target release to v2.4.0 and updated README and TODORobin Haberkorn1-30/+86
* Added a test case for the known bug of out-of-place modifiers. Well, this is a syntactic shortcoming rather than a true bug. But I did run into it more than once.
2025-03-03rename sample.teco_ini to fallback.teco_ini and mung it by defaultRobin Haberkorn1-7/+4
* After installation, SciTECO will therefore start into a more userfriendly mode even if the user does not create a custom ~/.teco_ini. It is hoped that this will scare away less of new users, who are not willing to read through all of the documentation. Still, users are warned in the absence of ~/.teco_ini. This warning however, might not be immediately visible, especially not when running gsciteco without an attached console. (This will change once I redo the UI and allow a number of messages to be queued in the message area.) * Theoretically, you could also just extend fallback.teco_ini from ~/.teco_ini, but that would require installing it into $SCITECOPATH. * Since the fallback profile will now be munged automatically on a wide range of systems, we set up xclip only when detecting X11 ($DISPLAY is non-empty). E.g. when running under Wayland or the Linux console, you still won't get the clipboard registers, which is probably better than having the clipboard operations fail once you try to use them. * xclip is now "suggested" on Debian/Ubuntu. Unfortunately we cannot pull it in only in the presence of X11.
2025-03-02GTK: always scroll caret when window size changesRobin Haberkorn1-3/+0
* The old implementation would scroll only once for the file first opened and too early. As a result, opening via `sciteco file:number` did not always scroll to the correct position. Also, `?` would usually not scroll the topic into view. * Instead, we now always scroll in all views, but only if the size allocation changed. This ensures, we can still scroll with the mouse wheel. * Therefore, we have to store the current size allocation per view. Instead of allocating a separate heap object, I decided to subclass the Scintilla GTK class. * Some explicit casts are still necessary since teco_view_t is typedefed to `struct teco_view_t`, but we cannot easily rename the GObject instance structure.
2025-03-02GTK: set the mouse cursor on the Scintilla view to signal business and on ↵Robin Haberkorn1-3/+1
the popup entries * By default, use the "text" cursor - this is the default Scintilla cursor, but inhibited by the GtkEventBox I used to catch all input events. * When processing input events, the cursor is changed to "wait". This is done with a small delay in order to avoid flickering during normal typing. The cursor is only changed after 100ms of activity, i.e. only when executing long loops or external programs. * We use the raw GSource API since it's tricky to work with source ids if the source could be removed in the meantime. * The popup entries' cursor is also changed to "pointer" (hand) to give a hint that it can be clicked.
2025-02-27implemented ncurses clipboard support via external processesRobin Haberkorn1-5/+0
* As an alternative to OSC-52, which is rarely supported by terminal emulators. * Makes the new mouse support much more useful since you rely on good builtin clipboard support. You can no longer e.g. just double-click a word to copy it into the "primary" selection as terminal emulators do by default. * Set $SCITECO_CLIPBOARD_SET/GET e.g. to xclip, way-copy, pbcopy or some wrapper script. * This is currently using POSIX-specific popen() API, so it behaves a bit different to command execution via EC/EG. I am not sure if it's worth rewriting with the GSpawn-API, since it will be used only on POSIX anyway and a GSpawn-based implementation is likely to be a bit larger. * Should there be some small command-line utility for interacting (esp. pasting) via OSC-52, built-in OSC-52 support could well be removed from SciTECO. Currently, I know only of https://github.com/theimpostor/osc/ and it requires very recent Go compilers. (I still haven't tested it. Quite possibly, pasting when run as a piped command is impossible.)
2025-02-24fixed rubbing out `?` (help) after editing a Q-RegisterRobin Haberkorn1-2/+3
* Test case: @EQa// @?/EX/ -- Rubout should return you to the Q-Register view. * The test suite has been extended. Unfortunately we cannot currently directly check whether we're editing a Q-Register. But we add a magic number of characters to the Q-Register, that we can check afterwards.
2025-02-23updated TODORobin Haberkorn1-11/+49
2025-01-19support :EF for saving a file before closing itRobin Haberkorn1-1/+0
Analoguous to :EX, but always saves the file like EW$, not only if it's dirty.
2025-01-13mention the Alpine package and updated TODORobin Haberkorn1-1/+11
2024-12-30support +line[,column] and filename:line:column syntaxes when opening filesRobin Haberkorn1-8/+0
* 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 <:L;R 0X.f [* @EB/^EN.f/ ]* L> in ~/.teco_ini to completely disable the special syntax.
2024-12-27nightly builds now include 64-bit Windows builds (MINGW64)Robin Haberkorn1-2/+0
* 32-bit binaries have been dropped, even though we could build both. But there is virtually no demand for 64-bit binaries left. * I continue to build 32-bit versions during CI, so that at least something still builds and tests under 32-bit.
2024-12-25prepared v2.3.0 releasev2.3.0Robin Haberkorn1-4/+1
2024-12-24added AX_WITH_CURSES for more robust ncurses checksRobin Haberkorn1-0/+4
* Turns out that on SunOS/OmniOS the ncurses port does not ship with a ncursesw pkg-config file, but the ncurses file is for a version, that does contain widechar support as well. * Instead of adding yet another recursive PKG_CHECK_MODULES() call, we now use the AX_WITH_CURSES() macro, which is probably more robust. This should at least fix ./configure on OmniOS. * It also adds a number of feature C macros, that could be useful to check in the future. * At the moment, we strive to support all X/Open-compatible Curses libraries, but both enhanced and color functions are required. Therefore plain SVr4 Curses is not supported. * source: https://www.gnu.org/software/autoconf-archive/ax_with_curses.html
2024-12-24introduced true block and EOL commentsRobin Haberkorn1-4/+0
* 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.
2024-12-23Curses: don't install PNG iconsRobin Haberkorn1-5/+0
* They are used at runtime only by the GTK port. * Their existence can cause problems if OS-specific build systems have to clean these files from the staging directory afterwards. This was the case on FreeBSD where the committer refused to remove these files after installation. In the official FreeBSD port, we therefore currently ship the PNG icons unnecessarily. * They are now installed and shipped only on GTK builds.
2024-12-22updated TODORobin Haberkorn1-17/+26
2024-12-13document the FK...$^SR idiomRobin Haberkorn1-1/+0
* We don't actually have to negate ^S results after FK. For deleting the matched pattern, you can use ^YD or -^SD.
2024-12-13implemented Scintilla lexer for SciTECO code, i.e. TECO syntax highlightingRobin Haberkorn1-5/+9
* this works by embedding the SciTECO parser and driving it always (exclusively) in parse-only mode. * A new teco_state_t::style determines the Scintilla style for any character accepted in the given state. * Therefore, the SciTECO lexer is always 100% exact and corresponds to the current SciTECO grammer - it does not have to be maintained separately. There are a few exceptions and tweaks, though. * The contents of curly-brace escapes (`@^Uq{...}`) are rendered as ordinary code using a separate parser instance. This can be disabled with the lexer.sciteco.macrodef property. Unfortunately, SciTECO does not currently allow setting lexer properties (FIXME). * Labels and comments are currently styled the same. This could change in the future once we introduce real comments. * Lexers are usually implemented in C++, but I did not want to draw in C++. Especially not since we'd have to include parser.h and other SciTECO headers, that really do not want to keep C++-compatible. Instead, the lexer is implemented "in the container". @ES/SCI_SETILEXER/sciteco/ is internally translated to SCI_SETILEXER(NULL) and we get Scintilla notifications when styling the view becomes necessary. This is then centrally forwarded to the teco_lexer_style() which uses the ordinary teco_view_ssm() API for styling. * Once the command line becomes a Scintilla view even on Curses, we can enabled syntax highlighting of the command line macro.
2024-12-09prepared v2.2.0 releasev2.2.0Robin Haberkorn1-30/+58
This release is mainly for the upcoming FreeBSD package.
2024-11-24added special Q-Register ":" for accessing dotRobin Haberkorn1-6/+2
* 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.
2024-11-23the search mode and current radix are mapped to __local__ Q-Registers ^X and ↵Robin Haberkorn1-11/+10
^R now (refs #17) * This way the search mode and radix are local to the current macro frame, unless the macro was invoked with :Mq. If colon-modified, you can reproduce the same effect by calling [.^X 0^X ... ].^X * The radix register is cached in the Q-Reg table as an optimization. This could be done with the other "special" registers as well, but at the cost of larger stack frames. * In order to allow constructs like [.^X typed with upcarets, the Q-Register specification syntax has been extended: ^c is the corresponding control code instead of the register "^".
2024-11-23implemented search mode flag (^X): allow case-sensitive searches (closes #17)Robin Haberkorn1-4/+1
* Usually you will only want -^X for enabling case sensitive searches and 0^X for case-insensitive searches (which is also the default). * An open question is what happens if the user sets -^X and then calls a macro. The search mode flag should probably be stacked away along with the search-string. This means we'd need a ^X special Q-Reg as well, so you can write [^X[_ 0^X S...$ ]_]^X. Alternatively, the search mode flag should be a property of the macro frame, along with the radix.
2024-11-17updated TODO and ChangeLog for v2.1.1 releasev2.1.1Robin Haberkorn1-1/+9
2024-11-11session.tes: store the current tab style (width and hard-tabs); fixed for ↵Robin Haberkorn1-0/+5
filenames containing ASCII 27 * 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.
2024-11-10Win32: fixed Unicode commandlines with newer MinGW runtimesRobin Haberkorn1-4/+0
* should also fix Win32 nightly builds * Even though we weren't using main's argv, but were using glib API for retrieving the command line in UTF-8, newer MinGW runtimes would fail when converting the Unicode command line into the system codepage would be lossy. * Most people seem to compile in a "manifest" to work around this issue. But this requires newer Windows versions and using some Microsoft tool which isn't even in $PATH. Instead, we now link with -municode and define wmain() instead, even though we still ignore argv. wmain() proabably get's the command line in UTF-16 and we'd have to convert it anyway. * See https://github.com/msys2/MINGW-packages/issues/22462
2024-11-10updated grosciteco.tes(1): mention new macros, changed command lines and ↵Robin Haberkorn1-0/+4
restrictions