typst-mode.el
                                
                                
                                
                                    typst-mode.el copied to clipboard
                            
                            
                            
                        Installation error on typst-mode 20230425.337
When installing typst-mode from MELPA, I get the following error:
Compiling file /home/cguillon/.emacs.d/elpa/typst-mode-20230425.337/typst-mode.el at Mon May 22 12:45:16 2023
Entering directory ‘/home/cguillon/.emacs.d/elpa/typst-mode-20230425.337/’
typst-mode.el:299:1:Error: rx ‘not’ syntax error: (or
 <)
This correspond to the code below in typst-mode.el:
(defconst typst--markup-heading-1-regexp
  ;; don't include label                                                                                                                                                                                                                                                                                        
  (rx bol (* blank) "=" (1+ blank) (seq (? (not blank)) (* (not (or "\n" "<"))))))
Emacs version is: 26.3
polymode version: 20230317.1218
MELPA is installed with the following in .emacs:
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
                                    
                                    
                                    
                                
I doubt it's your emacs version that causes this problem. More specially, the built-in package rx of emacs 26.3 cannot handle expressions like (not (or x y)). In my test which uses emacs 29.1 there is no such problem.
Since I have busy school works to do recently, I may not be able to set aside time to provide back-capability for emacs 26.3 these days. However, I will focus on this problem later and also fix some existing issues when I have time.
After all, thank you for your contribution!
Ok, thanks. I may attempt to propose a fix for support of emacs 26+. The point then is to have some tests verifying the compatibility with these versions, is there some testing procedure or process optionally supported by a container which I could use?
Sorry for the late reply. It's very nice of you to do this job! There do exist some tests to verify the functionality of typst-mode (however they are very simple and you should use your eyes to confirm the correctness). You can use make general, make syntax and make empty commands to run these tests if you are working on a UNIX machine, and you may need to change the values of some variables defined in the Makefile if you cannot get the commands running.
I tried to install emacs26.3 from source using evm on my machine, but it fails build. I'm currently not able to do some testing on emacs 26.3. However, I think this problem can be dealt with simply replacing (not (or )) statement with (and (not ) (not )) statement, i.e. (not (or "\n" "<") -> (and (not "\n") (not "<"))