From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.bugs Subject: bug#21154: 24.5.50; LaTeX mode complains about mismatched parentheses on end commands Date: Mon, 02 May 2016 12:32:19 +0200 Message-ID: <87pot4zr64.fsf@mbork.pl> References: <87h9oneqt0.fsf@ijmp.net> <87wpnfthtv.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1462185222 23724 80.91.229.3 (2 May 2016 10:33:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 May 2016 10:33:42 +0000 (UTC) Cc: 21154@debbugs.gnu.org To: Jeff Clough Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 02 12:33:30 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1axBAP-0004aK-Hz for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 May 2016 12:33:29 +0200 Original-Received: from localhost ([::1]:35999 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axBAL-0001xb-NF for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 May 2016 06:33:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axBAD-0001jf-4b for bug-gnu-emacs@gnu.org; Mon, 02 May 2016 06:33:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axBA1-0000nG-E8 for bug-gnu-emacs@gnu.org; Mon, 02 May 2016 06:33:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axBA1-0000mh-Ae for bug-gnu-emacs@gnu.org; Mon, 02 May 2016 06:33:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1axB9x-0001JN-VK for bug-gnu-emacs@gnu.org; Mon, 02 May 2016 06:33:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Marcin Borkowski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 May 2016 10:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21154 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21154-submit@debbugs.gnu.org id=B21154.14621851595004 (code B ref 21154); Mon, 02 May 2016 10:33:01 +0000 Original-Received: (at 21154) by debbugs.gnu.org; 2 May 2016 10:32:39 +0000 Original-Received: from localhost ([127.0.0.1]:33040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axB9X-0001IY-Fk for submit@debbugs.gnu.org; Mon, 02 May 2016 06:32:39 -0400 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:42989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axB9R-0001IL-Dw for 21154@debbugs.gnu.org; Mon, 02 May 2016 06:32:33 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 46533B288CF; Mon, 2 May 2016 12:32:28 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id e7PSYTwQclSl; Mon, 2 May 2016 12:32:23 +0200 (CEST) Original-Received: from localhost (98-171.echostar.pl [213.156.98.171]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 15E5CB288CB; Mon, 2 May 2016 12:32:23 +0200 (CEST) In-Reply-To: <87wpnfthtv.fsf@mbork.pl> (Marcin Borkowski's message of "Sat, 30 Apr 2016 14:13:48 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:117562 Archived-At: On 2016-04-30, at 14:13, Marcin Borkowski wrote: > On 2015-07-28, at 20:43, Jeff Clough wrote: > >> When writing LaTeX, typing the closing curly brace of an end >> command (\end{document} for instance) causes a "Mismatched parentheses" >> complaint to appear in the minibuffer, even when this seems to be false. >> >> Steps to reproduce: >> >> Create a new ".tex" file with the following contents (note the missing >> curly brace at the very end... >> >> \documentclass{article} >> \begin{document} >> \end{document >> >> Watch the minibuffer, type the closing curly brace, and witness the >> complaint. The only ever appears to happen on an end command, and it >> happens on every single end command no matter where it appears. > > Confirmed on GNU Emacs 25.1.50.9 (commit a3b46e0). I'll try to > investigate it. Here's my conjecture: the problematic message is displayed by `blink-matching-open'. After cursory examination, it seems that the problem is caused by the fact that `forward-sexp-function' in tex-mode is trying to be smart and jumps to the beginning of the environment when after "\end{...}". Since there is no opening brace there, `blink-matching-open' thinks there's a mismatch. I'll try to come up with a patch. Incidentally, AUC-TeX does not have this problem. Best, -- Marcin