unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Subject: [stephen_leake@member.fsf.org: infinite loop in align latex]
Date: Thu, 14 Dec 2006 12:47:03 -0500	[thread overview]
Message-ID: <E1Guuff-0005eB-Bc@fencepost.gnu.org> (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 -------

             reply	other threads:[~2006-12-14 17:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-14 17:47 Richard Stallman [this message]
2006-12-14 17:59 ` [stephen_leake@member.fsf.org: infinite loop in align latex] Vinicius Jose Latorre

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=E1Guuff-0005eB-Bc@fencepost.gnu.org \
    --to=rms@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).