GNU bug report logs - #60012
30.0.50; bug-reference-prog-mode: Error during redisplay with tree-sitter modes

Previous Next

Package: emacs;

Reported by: Aleksandr Vityazev <avityazev <at> posteo.org>

Date: Mon, 12 Dec 2022 16:39:02 UTC

Severity: normal

Found in version 30.0.50

Done: Aleksandr Vityazev <avityazev <at> posteo.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Aleksandr Vityazev <avityazev <at> posteo.org>
Cc: 60012 <at> debbugs.gnu.org
Subject: bug#60012: 30.0.50; bug-reference-prog-mode: Error during redisplay with tree-sitter modes
Date: Mon, 12 Dec 2022 18:54:28 +0200
> From: Aleksandr Vityazev <avityazev <at> posteo.org>
> Date: Mon, 12 Dec 2022 16:38:10 +0000
> 
> The error was discovered when I was watching
> https://github.com/zevlg/telega.el. I will add copies of the necessary
> files from there to reproduce the behavior.
> 
> 1. mkidr ~/test-project
> 2. mv test-project
> 2. Add a .dir-locals.el file with the following content:
> 
> --8<---------------cut here---------------start------------->8---
> ;;; Directory Local Variables
> ;;; For more information see (info "(emacs) Directory Variables")
> 
> ((nil . ((bug-reference-url-format . "https://github.com/zevlg/telega.el/issues/%s")
>          (bug-reference-bug-regexp
>           . "<https?://\\(github)\\.com/zevlg/telega.el/issues/\\([0-9]+\\)>"))))
> --8<---------------cut here---------------end--------------->8---
> 
> 3. Add Dockerfile file with the following content:
> 
> --8<---------------cut here---------------start------------->8---
> FROM alpine:latest AS builder
> ARG tdlib_branch=master
> ARG telega_branch=master
> CMD ["/bin/bash"]
> --8<---------------cut here---------------end--------------->8---
> 
> 4. with emacs -Q (add-hook 'prog-mode-hook 'bug-reference-prog-mode)
> 5. C-x C-f ~/test-project/Dockerfile
> 6. The file will be opened with dockerfile-ts-mode
> 7. See that syntax highlighting does not work
> 
> At this time the following should be in the *Messages* buffer:
> Error during redisplay: (jit-lock-function 1) signaled (invalid-regexp
> "Unmatched ( or \\(")
> 
> You can get the same if you add some C file and open it with c-ts-mode.
> If you open the file in normal c-mode. There are no such errors.
> 
> I do not see any errors in the regular expression - 
> "<https?://\\(github)\\.com/zevlg/telega.el/issues/\\([0-9]+\\)>".

The error is that the \( part before github is not matches by \).




This bug report was last modified 2 years and 217 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.