Vassil Nikolov | Васил Николов
mastodon 4.7.3Radio specialist;
mathematician;
interpreter;
software engineer;
and jack of other trades.
«what would "more structured" mean?»
Very roughly, a mode in which commands are syntactically S-expressions, say, or something of a similar nature. Obviously, a better answer can be given after some actual design effort. For example, there ought to be a way to compose at least some editing operations, but there has to be a syntax that is more economical than the full-fledged syntax of a general-purpose programming language (such as Emacs Lisp).
I suppose another first approximation might be an editing language with the semantics of TECO, but a sparser syntax (so "not every user's name does something as a command").
There is just a little bit of something of such a nature in the language of sed' (grouping commands with braces and conditional commands), but I forget if ed' acquired anything like that and I'll leave consulting the documentation for later.
I am thinking of having at least two command modes, one of which keeps the well-known ed' (ex') syntax.
Perhaps a third mode would fall back to the full underlying implementation language as a "last resort" for rare complex cases.
This will also need some experimentation to avoid a bad design.
Emacs does have a "hierarchy" roughly like that:
(i) simple interactive editing commands, most bound to keys, but some invoked only with M-x; invoked one by one, no syntax, no composition;
(ii) "C-x k" (F3/F4) macros (I think they are keyboard macros, but my memory of the terminology fails a little here); they can be edited, not just recorded, and they allow some limited kinds of processing beyond simple sequences of operations;
(iii) eval-expression' (M-:) for full-fledged Emacs Lisp forms. The "user Interaction experience" is completely different from ed', though, of course.
Perhaps "occasionally" is better than "rarely" regarding the long-line case. Unfortunately, I don't keep a record of the frequency, but it feels like in my experience I hit that once or twice a month on average.
@dougmerritt@mathstodon.xyz @AmenZwa@mathstodon.xyz @ed1conf@bsd.network



