Re: ~/.qe/config detected as Qscript
Charlie Gordon <[email protected]> Sun, 21 Aug 2022 20:30:34 +0200
| Newsgroups | gmane.editors.qemacs.devel |
|---|---|
| Message-ID | <[email protected]> |
On 21 Aug 2022, at 19:48, Piscium <[email protected]> wrote: >=20 > I wonder why my ~/.qe/config is detected as being of type Qscript > instead of Text? I googled and apparently Qscript is an obscure script > language for the Q language, the latter being a proprietary language > for data analytics. Qscript is a toy scripting language I wrote a long time ago. I never = published it because it never reached production stage. The syntax is close to the C syntax, except there is no preprocessing = and fewer types and keywords. > The disadvantage of it being detected as Qscript is that sometimes I > press return and it indents the next line which is something I don't > want. The only thing I have in that file besides the settings for two > variables are comment lines starting with //. The reason RET causes indentation is you forgot the `;` at the end of = the line. It is optional, but the indenter is not smart enough to distinguish = continuation lines and single line expressions. Just end your lines with semicolumns and you will be fine. > I know that there is a command to change to text mode, however I am > puzzled why it is detected as Qscript, since it is such an obscure > language. Trying to stabilise a syntax for extending qemacs is along story. The configuration file parser started as a very primitive string = function handling a single line at a time, then I used my toy language Qscript, which is much more elaborate, = supports function and variable definitions but was not appropriate for = the tiny build. I was unhappy with the integration and unsure about how to handle the = tricky emacs object model, so I stopped this development and reverted to = a simple parser, yet capable of handling a full expression syntax and = `if` / `else` statements. You can evaluate expressions with = =E2=80=9Ceval-expression=E2=80=9D, bound to "M-:=E2=80=9D. I explored using Javascript as an extension language, and joined with = Fabrice Bellard, to write QuickJS, a full featured javascript = interpreter, but Javascript is way too complex and not well suited for = the task, so this issue is still open. Thanks for your feedback, Cheers Chqrlie.=