From: Joe Wells <jbw@macs.hw.ac.uk>
To: bug-gnu-emacs@gnu.org
Subject: tex-terminate-paragraph ignores paragraph-start and paragraph-separate
Date: Sun, 09 Sep 2007 07:35:54 +0100 [thread overview]
Message-ID: <86r6l8s5v9.fsf@macs.hw.ac.uk> (raw)
The tex-terminate-paragraph command has "\n\n" hard-coded into it as
the paragraph divider and ignores paragraph-start and
paragraph-separate. As a result, it reports false errors.
To reproduce the reporting of false errors by tex-terminate-paragraph,
first create a .tex file containing this text:
---------------------------
\documentclass{article}
\begin{document}
This is the main paragraph.
\begin{quote}
This is the first paragraph of a multi-paragraph quote.
\end{quote}
\end{document}
---------------------------
Then, move point to the end of the line that says “This is the first
paragraph of a multi-paragraph quote.”. Then, type C-j to invoke
tex-terminate-paragraph.
The correct behavior would be to silently insert two newline
characters. The actually buggy behavior is that
tex-terminate-paragraph also emits the false message that “Paragraph
being closed appears to contain a mismatch”.
The cause of the problem is that tex-terminate-paragraph is including
the “\begin{quote}” in the text it checks for validity but not the
corresponding “\end{quote}”, causing an error when it uses
forward-sexp to check for balance. It is an error to include the
“\begin{quote}” because it is not part of the current paragraph. It
makes a mistake about what is in the paragraph because it uses the
hard-coded "\n\n" as the paragraph divider.
The fix is to make tex-terminate-paragraph use a better approach to
finding the start of the current paragraph. At the very least, it
should honor paragraph-start and paragraph-separate.
I hope this bug report is helpful.
Joe
======================================================================
In GNU Emacs 22.1.1 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
of 2007-06-27 on artemis
Windowing system distributor `The X.Org Foundation', version 11.0.70000000
configured using `configure '--prefix=/home/jbw/local2' '--enable-debug' '--disable-nls' '--with-x-toolkit=gtk' 'CFLAGS=-O0 -g3 -ggdb''
next reply other threads:[~2007-09-09 6:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-09 6:35 Joe Wells [this message]
2007-09-09 8:47 ` tex-terminate-paragraph ignores paragraph-start and paragraph-separate martin rudalics
2007-09-09 10:28 ` Joe Wells
2007-09-19 7:30 ` Glenn Morris
2007-09-19 8:28 ` Joe Wells
2007-09-20 3:13 ` Glenn Morris
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=86r6l8s5v9.fsf@macs.hw.ac.uk \
--to=jbw@macs.hw.ac.uk \
--cc=bug-gnu-emacs@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).