emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: infinite loop in align latex]


From: Vinicius Jose Latorre
Subject: Re: address@hidden: infinite loop in align latex]
Date: Thu, 14 Dec 2006 15:59:40 -0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061029 SeaMonkey/1.0.6

Richard Stallman wrote:
Would someone please DTRT, then ack?

------- Start of forwarded message -------
To: emacs-devel <address@hidden>
From: Stephen Leake <address@hidden>
Date: Sun, 10 Dec 2006 09:43:41 -0500
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: infinite loop in align latex
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed version=3.0.4

I've found a fix for a bug in align for LaTeX.

To reproduce the bug, paste the following text in a buffer:

- ------------
The I \& T custom cards uses a single FPGA per custom card.

Older custom cards do not use a single FPGA for each custom card; they
use ADLINK digital IO and Kontron timer cards, as well as the
\code{GDS_Timers} FPGA image.

Some custom cards have 2 cPLDs on them. We do not have a consistent
naming convention for the older cPLDs.

\begin{tabular}{|lllll|}
\hline
\multicolumn{5}{|c|}{FPGA images}                                             \\
\hline

Name & Configuration & Driver  & Driver & image file \\
     &               & ID high & ID low &            \\
\hline

GDS\_Timers & 1 & 0 & 0 & \file{gds_timers.hexout}     \\
I\&T      & 1 & 1 & 1 & \file{fpga_int_sdo_1.hexout} \\
I\&T      & 2 & 1 & 2 & \file{fpga_int_sdo_2.hexout} \\
\hline
\end{tabular}
- -----------

Then position point on 'Name' in the table. Then:

M-x latex-mode
M-x align-current

Emacs hangs; interrupt with control-g.

I don't understand why this is not always a problem; it only occurs in
some (apparently rare) situations.

Here's the fix:

===================================================================
RCS file: /sources/emacs/emacs/lisp/align.el,v
retrieving revision 1.22
diff -c -r1.22 align.el
*** align.el    6 Feb 2006 14:33:31 -0000       1.22
- --- align.el  10 Dec 2006 14:38:42 -0000
***************
*** 1074,1080 ****
                           (eq (char-before pos) ?\\))
                 (setq count (1+ count) pos (1- pos)))
               (eq (mod count 2) 1))
!            (goto-char (match-beginning 2))))
      result))
(defun align-new-section-p (beg end separator)
- --- 1074,1080 ----
                           (eq (char-before pos) ?\\))
                 (setq count (1+ count) pos (1- pos)))
               (eq (mod count 2) 1))
!            (goto-char (match-beginning (if reverse 1 2)))))
      result))
(defun align-new-section-p (beg end separator)


- -- - -- Stephe


Done





reply via email to

[Prev in Thread] Current Thread [Next in Thread]