* [stephen_leake@member.fsf.org: infinite loop in align latex]
@ 2006-12-14 17:47 Richard Stallman
2006-12-14 17:59 ` Vinicius Jose Latorre
0 siblings, 1 reply; 2+ messages in thread
From: Richard Stallman @ 2006-12-14 17:47 UTC (permalink / raw)
Would someone please DTRT, then ack?
------- Start of forwarded message -------
To: emacs-devel <emacs-devel@gnu.org>
From: Stephen Leake <stephen_leake@member.fsf.org>
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
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
------- End of forwarded message -------
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [stephen_leake@member.fsf.org: infinite loop in align latex]
2006-12-14 17:47 [stephen_leake@member.fsf.org: infinite loop in align latex] Richard Stallman
@ 2006-12-14 17:59 ` Vinicius Jose Latorre
0 siblings, 0 replies; 2+ messages in thread
From: Vinicius Jose Latorre @ 2006-12-14 17:59 UTC (permalink / raw)
Cc: emacs-devel
Richard Stallman wrote:
> Would someone please DTRT, then ack?
>
> ------- Start of forwarded message -------
> To: emacs-devel <emacs-devel@gnu.org>
> From: Stephen Leake <stephen_leake@member.fsf.org>
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-14 17:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-14 17:47 [stephen_leake@member.fsf.org: infinite loop in align latex] Richard Stallman
2006-12-14 17:59 ` Vinicius Jose Latorre
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.