GNU bug report logs - #49080
28.0.50; latex-forward-sexp scan error (unbalanced parens) when parens are balanced

Previous Next

Package: emacs;

Reported by: Ahmed Khaled <akregeb <at> gmail.com>

Date: Thu, 17 Jun 2021 23:20:01 UTC

Severity: normal

Tags: moreinfo

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49080 in the body.
You can then email your comments to 49080 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#49080; Package emacs. (Thu, 17 Jun 2021 23:20:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ahmed Khaled <akregeb <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 17 Jun 2021 23:20:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ahmed Khaled <akregeb <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; latex-forward-sexp scan error (unbalanced parens) when
 parens are balanced
Date: Thu, 17 Jun 2021 22:12:14 +0200
[Message part 1 (text/plain, inline)]
In tex-mode, latex-forward-sexp does not correctly handle parentheses
like this \[ \]. In particular, it says the expression is not balanced
when it is.

Steps to reproduce the bug:
1. Start with emacs -Q (with -nw or without doesn't make a difference)
2. Open any .tex file (I attached test.tex which I used).
3. Navigate to any LaTeX equation delimited by \[ and \], like this:
\[ 1 + 1 = 2 \]
4. Put the cursor on the first [ in the line:
5. Call latex-forward-sexp

That's it. On test.tex, the error I get is:
       Scan error: "Unbalanced parentheses", 126, 157
Note that if the cursor is on the backslash, rather than [, then there
is no error.

In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24,
cairo version 1.16.0)
System Description: Ubuntu 20.04.2 LTS

Configured using:
 'configure
 CONFIG_SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
 SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
 --prefix=/gnu/store/xq1linh33h7icndhqwsxky0x6fmjqn11-emacs-pgtk-native-comp-28.0.50-194.1c0a7c3
 --enable-fast-install --with-native-compilation --with-pgtk
 --with-xwidgets --with-modules --with-cairo --disable-build-details'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LIBOTF LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XIM
XWIDGETS GTK3 ZLIB

Important settings:
  value of $EMACSLOADPATH:
/home/robo/.guix-profile/share/emacs/site-lisp:/home/robo/.guix-profile/share/emacs/site-lisp:/gnu/store/xq1linh33h7icndhqwsxky0x6fmjqn11-emacs-pgtk-native-comp-28.0.50-194.1c0a7c3/share/emacs/28.0.50/lisp
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: LaTeX

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core eieio-loaddefs
password-cache json map time-date subr-x seq mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils vc-git
diff-mode easy-mmode vc-dispatcher tex-mode compile text-property-search
shell pcomplete comint ansi-color ring latexenc term/xterm xterm
byte-opt bytecomp byte-compile cconv cl-macs cl-loaddefs cl-lib pcase gv
jka-compr iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/pgtk-win pgtk-win term/common-win tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-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 cl-generic
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 charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads
xwidget-internal dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit pgtk multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 97956 9073)
 (symbols 48 8246 0)
 (strings 32 24556 2414)
 (string-bytes 1 872307)
 (vectors 16 13770)
 (vector-slots 8 274177 6530)
 (floats 8 37 69)
 (intervals 56 410 0)
 (buffers 992 12))
[Message part 2 (text/html, inline)]
[test.tex (text/x-tex, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49080; Package emacs. (Sat, 19 Jun 2021 13:33:02 GMT) Full text and rfc822 format available.

Message #8 received at 49080 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ahmed Khaled <akregeb <at> gmail.com>
Cc: 49080 <at> debbugs.gnu.org
Subject: Re: bug#49080: 28.0.50; latex-forward-sexp scan error (unbalanced
 parens) when parens are balanced
Date: Sat, 19 Jun 2021 15:32:32 +0200
Ahmed Khaled <akregeb <at> gmail.com> writes:

> In tex-mode, latex-forward-sexp does not correctly handle parentheses
> like this \[ \]. In particular, it says the expression is not balanced
> when it is.
>
> Steps to reproduce the bug:
> 1. Start with emacs -Q (with -nw or without doesn't make a difference)
> 2. Open any .tex file (I attached test.tex which I used).
> 3. Navigate to any LaTeX equation delimited by \[ and \], like this:
> \[ 1 + 1 = 2 \]
> 4. Put the cursor on the first [ in the line:
> 5. Call latex-forward-sexp
>
> That's it. On test.tex, the error I get is:
>        Scan error: "Unbalanced parentheses", 126, 157
> Note that if the cursor is on the backslash, rather than [, then there
> is no error.

I think that's correct behaviour?  The parentheses start is \[ and not
just [.

Anybody have any opinion here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 19 Jun 2021 14:03:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49080; Package emacs. (Sat, 17 Jul 2021 19:24:01 GMT) Full text and rfc822 format available.

Message #13 received at 49080 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ahmed Khaled <akregeb <at> gmail.com>
Cc: 49080 <at> debbugs.gnu.org
Subject: Re: bug#49080: 28.0.50; latex-forward-sexp scan error (unbalanced
 parens) when parens are balanced
Date: Sat, 17 Jul 2021 21:23:11 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I think that's correct behaviour?  The parentheses start is \[ and not
> just [.
>
> Anybody have any opinion here?

Nobody had in a month, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 49080 <at> debbugs.gnu.org and Ahmed Khaled <akregeb <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 17 Jul 2021 19:24:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 15 Aug 2021 11:24:06 GMT) Full text and rfc822 format available.

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

Previous Next


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