unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49080: 28.0.50; latex-forward-sexp scan error (unbalanced parens) when parens are balanced
@ 2021-06-17 20:12 Ahmed Khaled
  2021-06-19 13:32 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Ahmed Khaled @ 2021-06-17 20:12 UTC (permalink / raw)
  To: 49080


[-- 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}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#49080: 28.0.50; latex-forward-sexp scan error (unbalanced parens) when parens are balanced
  2021-06-17 20:12 bug#49080: 28.0.50; latex-forward-sexp scan error (unbalanced parens) when parens are balanced Ahmed Khaled
@ 2021-06-19 13:32 ` Lars Ingebrigtsen
  2021-07-17 19:23   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-19 13:32 UTC (permalink / raw)
  To: Ahmed Khaled; +Cc: 49080

Ahmed Khaled <akregeb@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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#49080: 28.0.50; latex-forward-sexp scan error (unbalanced parens) when parens are balanced
  2021-06-19 13:32 ` Lars Ingebrigtsen
@ 2021-07-17 19:23   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-17 19:23 UTC (permalink / raw)
  To: Ahmed Khaled; +Cc: 49080

Lars Ingebrigtsen <larsi@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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-17 19:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 20:12 bug#49080: 28.0.50; latex-forward-sexp scan error (unbalanced parens) when parens are balanced Ahmed Khaled
2021-06-19 13:32 ` Lars Ingebrigtsen
2021-07-17 19:23   ` Lars Ingebrigtsen

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).