From: Ahmed Khaled <akregeb@gmail.com>
To: 49080@debbugs.gnu.org
Subject: bug#49080: 28.0.50; latex-forward-sexp scan error (unbalanced parens) when parens are balanced
Date: Thu, 17 Jun 2021 22:12:14 +0200 [thread overview]
Message-ID: <CAKFjJAX6PyiqXq-JnS4WAFyP498UF+tSXwbq29RWpe9ioBcgvA@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 4157 bytes --]
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))
[-- Attachment #1.2: Type: text/html, Size: 4536 bytes --]
[-- Attachment #2: test.tex --]
[-- Type: text/x-tex, Size: 156 bytes --]
\documentclass[10pt]{article}
\begin{document}
\title{Test}
\author{}
\maketitle
\tableofcontents
This is a simple equation
\[ 1 + 1 = 2. \]
\end{document}
next reply other threads:[~2021-06-17 20:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 20:12 Ahmed Khaled [this message]
2021-06-19 13:32 ` bug#49080: 28.0.50; latex-forward-sexp scan error (unbalanced parens) when parens are balanced Lars Ingebrigtsen
2021-07-17 19:23 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKFjJAX6PyiqXq-JnS4WAFyP498UF+tSXwbq29RWpe9ioBcgvA@mail.gmail.com \
--to=akregeb@gmail.com \
--cc=49080@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).