From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augustin =?UTF-8?Q?Ch=C3=A9neau?= (BTuin) Newsgroups: gmane.emacs.bugs Subject: bug#65470: 29.1.50; js-ts-mode: regex pattern can cause incorrect parenthesis matching Date: Wed, 23 Aug 2023 11:05:17 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17117"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: 65470@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 23 13:16:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qYlqR-0004Hx-GS for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Aug 2023 13:16:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYlqF-0006rm-KZ; Wed, 23 Aug 2023 07:16:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qYlqA-0006lK-Lw for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 07:15:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYlqA-0004F2-E0 for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 07:15:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYlqD-0005iq-N7 for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 07:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Augustin =?UTF-8?Q?Ch=C3=A9neau?= (BTuin) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Aug 2023 11:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65470 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169278932121939 (code B ref -1); Wed, 23 Aug 2023 11:16:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Aug 2023 11:15:21 +0000 Original-Received: from localhost ([127.0.0.1]:33004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYlpW-0005hi-KX for submit@debbugs.gnu.org; Wed, 23 Aug 2023 07:15:21 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:44898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYjnx-00023c-LQ for submit@debbugs.gnu.org; Wed, 23 Aug 2023 05:05:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qYjno-0000xX-Mj for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 05:05:24 -0400 Original-Received: from msg-2.mailo.com ([213.182.54.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qYjnl-0002Od-48 for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 05:05:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1692781517; bh=hZTEfLHqvMLrqWvPFYxD4CseFYg5eEnHDMjm1ghfxrU=; h=X-EA-Auth:Message-ID:Date:MIME-Version:To:Subject:From: Content-Type:Content-Transfer-Encoding; b=oGLtYIShmCZIrFv509J1c4/aUvjm9yUO6oaWzIKxuTGF6iodD3CMFjFQamqRCMV7R GgMxCGnrfnNypwRkqiAeGW0PtVLanuZn83vplYjSEtbiPzdWRhe6cD2L7IjM5AUHsI 2nOEjFyvJ3bPMHSqpUdAdqLJkYaEODpdGPMwFIIE= Original-Received: by b221-3.in.mailobj.net [192.168.90.23] with ESMTP via ip-20.mailobj.net [213.182.54.20] Wed, 23 Aug 2023 11:05:17 +0200 (CEST) X-EA-Auth: t6ohUJYJWOpRT1Umgg6QS9FHBnrfouWBgmkcB3INN3UNQS0vam7ML8L6cu5aiBxf1Aj9cMl4iSzOgi6nMW0D6ifewE73uAal Content-Language: fr, en-US Received-SPF: pass client-ip=213.182.54.12; envelope-from=btuin@mailo.com; helo=msg-2.mailo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 23 Aug 2023 07:15:17 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:268224 Archived-At: With the mode js-ts-mode, matching tokens (such as '()', '[]') can be incorrectly paired by `show-paren-mode`. This is trivially reproducible with this simple example: (/foobar)/) The first parenthesis is matched with the second one, which is inside a regular expression pattern (between slashes), and the last one is not paired. The behavior should be the same as for string, the content of the regex pattern should have no influence on the structure of the code. The first parenthesis should match with the third one. Here, the first parenthesis is matched with the last one: ("foobar)") js-mode behaves correctly in both cases. In GNU Emacs 29.1.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-07-30 built on inspiron-5567 Repository revision: 0002d4f31666719c5e972ca65efffc70750db613 Repository branch: makepkg Windowing system distributor 'The X.Org Foundation', version 11.0.12302000 System Description: Arch Linux Configured using: 'configure --prefix=/opt --sysconfdir=/etc --libexecdir=/opt/lib --localstatedir=/var --mandir=/opt/share/man --with-gameuser=:games --with-modules --without-libotf --without-m17n-flt --without-gconf --with-native-compilation=yes --with-native-compilation=aot --with-xinput2 --with-x-toolkit=gtk3 --without-xaw3d --with-sound=no --with-tree-sitter --without-gpm --without-compress-install '--program-transform-name=s/\([ec]tags\)/\1.emacs/' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection' LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now PKG_CONFIG_PATH=/home/arch-aug/_opam/lib/pkgconfig 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: fr_FR.UTF-8 locale-coding-system: utf-8-unix Major mode: Info Minor modes in effect: windmove-mode: t yas-global-mode: t yas-minor-mode: t delete-selection-mode: t global-subword-mode: t subword-mode: t save-place-mode: t smartparens-global-mode: t treemacs-filewatch-mode: t treemacs-follow-mode: t treemacs-git-mode: t treemacs-fringe-indicator-mode: t global-hl-line-mode: t editorconfig-mode: t drag-stuff-global-mode: t drag-stuff-mode: t doom-modeline-mode: t global-git-commit-mode: t magit-auto-revert-mode: t global-auto-revert-mode: t shell-dirtrack-mode: t server-mode: t adaptive-wrap-prefix-mode: t global-undo-tree-mode: t undo-tree-mode: t global-anzu-mode: t anzu-mode: t which-key-mode: t projectile-mode: t global-corfu-mode: t corfu-mode: t TeX-PDF-mode: t TeX-source-correlate-mode: t vertico-mode: t marginalia-mode: t override-global-mode: t straight-use-package-mode: t straight-package-neutering-mode: t savehist-mode: t global-display-line-numbers-mode: t display-line-numbers-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t isearch-fold-quotes-mode: t global-font-lock-mode: t font-lock-mode: t buffer-read-only: t size-indication-mode: t column-number-mode: t line-number-mode: t global-visual-line-mode: t visual-line-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/arch-aug/.config/emacs-neo/straight/build/transient/transient hides /opt/share/emacs/29.1.50/lisp/transient /home/arch-aug/.config/emacs-neo/straight/build/jsonrpc/jsonrpc hides /opt/share/emacs/29.1.50/lisp/jsonrpc /home/arch-aug/.config/emacs-neo/straight/build/external-completion/external-completion hides /opt/share/emacs/29.1.50/lisp/external-completion /home/arch-aug/.config/emacs-neo/straight/build/use-package/use-package hides /opt/share/emacs/29.1.50/lisp/use-package/use-package /home/arch-aug/.config/emacs-neo/straight/build/use-package/use-package-lint hides /opt/share/emacs/29.1.50/lisp/use-package/use-package-lint /home/arch-aug/.config/emacs-neo/straight/build/bind-key/bind-key hides /opt/share/emacs/29.1.50/lisp/use-package/bind-key /home/arch-aug/.config/emacs-neo/straight/build/use-package/use-package-diminish hides /opt/share/emacs/29.1.50/lisp/use-package/use-package-diminish /home/arch-aug/.config/emacs-neo/straight/build/use-package/use-package-jump hides /opt/share/emacs/29.1.50/lisp/use-package/use-package-jump /home/arch-aug/.config/emacs-neo/straight/build/use-package/use-package-core hides /opt/share/emacs/29.1.50/lisp/use-package/use-package-core /home/arch-aug/.config/emacs-neo/straight/build/use-package/use-package-bind-key hides /opt/share/emacs/29.1.50/lisp/use-package/use-package-bind-key /home/arch-aug/.config/emacs-neo/straight/build/use-package/use-package-delight hides /opt/share/emacs/29.1.50/lisp/use-package/use-package-delight /home/arch-aug/.config/emacs-neo/straight/build/use-package/use-package-ensure hides /opt/share/emacs/29.1.50/lisp/use-package/use-package-ensure /home/arch-aug/.config/emacs-neo/straight/build/xref/xref hides /opt/share/emacs/29.1.50/lisp/progmodes/xref /home/arch-aug/.config/emacs-neo/straight/build/project/project hides /opt/share/emacs/29.1.50/lisp/progmodes/project /home/arch-aug/.config/emacs-neo/straight/build/flymake/flymake hides /opt/share/emacs/29.1.50/lisp/progmodes/flymake /home/arch-aug/.config/emacs-neo/straight/build/eglot/eglot hides /opt/share/emacs/29.1.50/lisp/progmodes/eglot /home/arch-aug/.config/emacs-neo/straight/build/soap-client/soap-inspect hides /opt/share/emacs/29.1.50/lisp/net/soap-inspect /home/arch-aug/.config/emacs-neo/straight/build/soap-client/soap-client hides /opt/share/emacs/29.1.50/lisp/net/soap-client /home/arch-aug/.config/emacs-neo/straight/build/eldoc/eldoc hides /opt/share/emacs/29.1.50/lisp/emacs-lisp/eldoc /home/arch-aug/.config/emacs-neo/straight/build/let-alist/let-alist hides /opt/share/emacs/29.1.50/lisp/emacs-lisp/let-alist Features: (shadow sort mail-extr emacsbug cus-start windmove magit-extras magit-delta xterm-color dabbrev textutils cape combobulate combobulate-yaml combobulate-css combobulate-js-ts combobulate-python combobulate-html combobulate-ui combobulate-display combobulate-contrib combobulate-manipulation python combobulate-navigation combobulate-misc combobulate-interface combobulate-rules combobulate-settings tempo misearch multi-isearch noutline outline shortdoc vertico-directory js c-ts-common mule-util checkdoc doom-snippets doom-snippets-lib yasnippet rainbow-delimiters ws-butler delsel cap-words superword subword saveplace flex-mode jison-mode bison-mode cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs bison-mode-autoloads dired-x cmake-mode rst cmake-mode-autoloads utop utop-minor-mode tuareg tuareg-compat tuareg-opam caml-help find-file utop-autoloads flycheck-ocaml flycheck find-func flycheck-ocaml-autoloads merlin-eldoc-autoloads merlin-xref merlin-cap merlin caml-types merlin-autoloads dune dune-autoloads tuareg-autoloads caml-autoloads pkgbuild-mode tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat parse-time iso8601 sh-script smie executable pkgbuild-mode-autoloads geiser-guile info-look geiser-debug geiser-repl geiser-image geiser-capf geiser-doc geiser-menu geiser-autodoc geiser-edit etags fileloop generator geiser-completion geiser-eval geiser-connection tq geiser-syntax scheme geiser-impl help-fns radix-tree geiser-log geiser-popup view geiser-custom geiser-base geiser-guile-autoloads geiser geiser-autoloads lua-mode lua-mode-autoloads debbugs soap-client url-http url-auth url-gw nsm rng-xsd rng-dt rng-util xsd-regexp debbugs-autoloads soap-client-autoloads expand-region-autoloads jinx-autoloads smartparens loadhist smartparens-autoloads builder vc-git vc-dispatcher dir-var builder-autoloads treemacs treemacs-header-line treemacs-compatibility treemacs-mode treemacs-bookmarks treemacs-tags xref treemacs-interface treemacs-persistence treemacs-filewatch-mode treemacs-follow-mode treemacs-rendering treemacs-annotations treemacs-async treemacs-workspaces treemacs-dom treemacs-visuals treemacs-fringe-indicator treemacs-scope pulse color treemacs-faces treemacs-icons treemacs-themes treemacs-core-utils pfuture inline hl-line ht treemacs-logging treemacs-customization treemacs-macros treemacs-autoloads cfrs-autoloads posframe-autoloads ht-autoloads hydra-autoloads lv-autoloads pfuture-autoloads ace-window-autoloads avy-autoloads hare-mode-autoloads eglot-autoloads external-completion-autoloads jsonrpc-autoloads flymake-autoloads project-autoloads xref-autoloads eldoc-autoloads flycheck-autoloads let-alist-autoloads pkg-info-autoloads epl-autoloads vertico-search general general-autoloads combobulate-autoloads treesit editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch pcase editorconfig-autoloads ws-butler-autoloads bel-coloration rainbow-delimiters-autoloads drag-stuff drag-stuff-autoloads doom-modeline doom-modeline-segments doom-modeline-env doom-modeline-core shrink-path f f-shortdoc s doom-modeline-autoloads shrink-path-autoloads f-autoloads s-autoloads all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons all-the-icons-autoloads doom-themes-ext-org doom-themes-ext-treemacs doom-themes-ext-neotree doom-themes-ext-visual-bell face-remap doom-dracula-theme doom-themes doom-themes-base doom-themes-autoloads magit-delta-autoloads xterm-color-autoloads magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util url-handlers url-parse auth-source json map url-vars magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff-mode git-commit log-edit message sendmail mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process with-editor shell pcomplete server magit-mode transient magit-git magit-base magit-section format-spec eieio eieio-core dash magit-autoloads magit-section-autoloads git-commit-autoloads with-editor-autoloads transient-autoloads dash-autoloads consult-vertico consult recentf tree-widget wid-edit bookmark pp consult-autoloads adaptive-wrap adaptive-wrap-autoloads undo-tree diff queue undo-tree-autoloads queue-autoloads anzu anzu-autoloads which-key which-key-autoloads comp comp-cstr rx projectile lisp-mnt grep ibuf-ext ibuffer ibuffer-loaddefs projectile-autoloads doom-snippets-autoloads yasnippet-autoloads finder-inf cape-autoloads corfu corfu-autoloads auctex-latexmk advice latex latex-flymake flymake-proc flymake project byte-opt compile text-property-search comint ansi-osc ansi-color ring warnings icons thingatpt tex-ispell tex-style auctex-latexmk-autoloads tex dbus xml crm texmathp auctex-autoloads tex-site vertico vertico-autoloads marginalia compat edmacro kmacro marginalia-autoloads compat-autoloads use-package-bind-key bind-key easy-mmode orderless orderless-autoloads use-package-ensure use-package-autoloads info bind-key-autoloads straight-autoloads cl-seq cl-extra help-mode straight subr-x cl-macs gv use-package-core cl-loaddefs cl-lib bytecomp byte-compile savehist display-line-numbers elec-pair cus-load rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 855111 185665) (symbols 48 62979 2) (strings 32 199519 18907) (string-bytes 1 6782525) (vectors 16 90652) (vector-slots 8 2300969 313710) (floats 8 1625 1345) (intervals 56 20355 3201) (buffers 984 25))