[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-AUCTeX] 11.85; TeX-format-filter incorrectly unbreaks lines
From: |
Ivan Andrus |
Subject: |
[Bug-AUCTeX] 11.85; TeX-format-filter incorrectly unbreaks lines |
Date: |
Tue, 30 Mar 2010 22:44:47 +0200 |
I debugged this problem a while ago, so I don't remember all the details
perfectly. When I got the new version of AUCTeX, I realized I had never
reported the problem, so here goes.
First the problem: when an error occurs in a LaTeX file and I call
TeX-next-error, AUCTeX often thinks the error is in a file named "Web2C
7.5.7". I believe the error is because TeX-format-filter unbreaks a
line like
(/usr/local/texlive/2008/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex(/usr/local/texlive/2008/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex)
when it shouldn't (or perhaps TeX-parse-error needs to be smarter). I
added a check
(not (eq (char-after (1+ (point))) ?\())
to this portion:
;; Remove line breaks at column 79
(while (> (point) pt)
(end-of-line 0)
(when (and (= (current-column) 79)
;; Heuristic: Don't delete the linebreak if there
;; is an empty line after the current one or
;; point is located after a period.
(not (eq (char-after (1+ (point))) ?\n))
(not (eq (char-before) ?.))
;; I also added an opening parenthesis since
;; that seems to be causing problems
(not (eq (char-after (1+ (point))) ?\())
)
(delete-char 1)))
and that seems to fix the problem.
-Ivan Andrus
===============================
Emacs : GNU Emacs 24.0.50.5 (x86_64-apple-darwin10.2.0, NS
apple-appkit-1038.25)
of 2010-03-22 on parduc.local
Package: 11.85
current state:
==============
(setq
AUCTeX-date "2008-02-10"
window-system 'ns
LaTeX-version "2e"
TeX-style-path '("style" "auto" "/Users/gvol/TeX/style"
"/Users/gvol/vcs/cur-sage/local/share/texmf/tex/generic/sagetex/style"
"/Users/gvol/TeX/auto"
"/Users/gvol/vcs/cur-sage/local/share/texmf/tex/generic/sagetex/auto"
"/usr/share/emacs/site-lisp/auctex/style"
"/usr/local/var/auctex")
TeX-auto-save t
TeX-parse-self t
TeX-master t
TeX-command-list '(("Kindle" "cp %s.pdf ~/Kindle/" TeX-run-shell t t)
("Open" "open %s.pdf" TeX-run-discard nil t)
("Sage" "~/vcs/cur-sage/sage %s.sage" TeX-run-compile t t)
("TeX" "%(PDF)%(tex) %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX
nil
(plain-tex-mode ams-tex-mode texinfo-mode) :help "Run
plain TeX")
("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil (latex-mode
doctex-mode) :help
"Run LaTeX")
("Makeinfo" "makeinfo %t" TeX-run-compile nil
(texinfo-mode) :help
"Run Makeinfo with Info output")
("Makeinfo HTML" "makeinfo --html %t" TeX-run-compile nil
(texinfo-mode)
:help "Run Makeinfo with HTML output")
("AmSTeX" "%(PDF)amstex %`%S%(PDFout)%(mode)%' %t"
TeX-run-TeX nil
(ams-tex-mode) :help "Run AMSTeX")
("ConTeXt" "texexec --once --texutil %(execopts)%t"
TeX-run-TeX nil
(context-mode) :help "Run ConTeXt once")
("ConTeXt Full" "texexec %(execopts)%t" TeX-run-TeX nil
(context-mode)
:help "Run ConTeXt until completion")
("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run
BibTeX")
("View" "%V" TeX-run-discard t t :help "Run Viewer")
("Print" "%p" TeX-run-command t t :help "Print the file")
("Queue" "%q" TeX-run-background nil t :help "View the
printer queue"
:visible TeX-queue-command)
("File" "%(o?)dvips %d -o %f " TeX-run-command t t :help
"Generate PostScript file")
("Index" "makeindex %s" TeX-run-command nil t :help "Create
index file")
("Check" "lacheck %s" TeX-run-compile nil (latex-mode) :help
"Check LaTeX file for correctness")
("Spell" "(TeX-ispell-document \"\")" TeX-run-function nil
t :help
"Spell-check the document")
("Clean" "TeX-clean" TeX-run-function nil t :help
"Delete generated intermediate files")
("Clean All" "(TeX-clean t)" TeX-run-function nil t :help
"Delete generated intermediate and output files")
("Other" "" TeX-run-command t t :help "Run an arbitrary
command"))
)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-AUCTeX] 11.85; TeX-format-filter incorrectly unbreaks lines,
Ivan Andrus <=