Discussion:
Fortifying bug
marcuirl
2005-02-15 16:40:02 UTC
Permalink
[No Cc copy required]

Cover basics:

\verb+\+ breaks fortifying. After the second `+' all LaTeX source
appears as if between $$, in my case at least. Remains like this until
another \verb+\+ is encountered.

Minimum sample file: (you will need to delete the line indicated to
observe breaking!)

\documentclass[12pt,a4paper]{article}

\begin{document}

\begin{enumerate}
\item Three special characters, namely \verb+\+
\verb+{+, and \verb+}+. mainly used for software

%% \verb+\+ DELETE THIS LINE
%% Deleting the line above from the file completely will illustrate
%% the problem

\verb+{+, and \verb+}+. (is mainly used for software

\end{enumerate}
\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

marcuirl


Emacs : GNU Emacs 21.2.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2002-04-09 on porky.devel.redhat.com
Package: AUCTeX CVS-5.485 (2005-02-12)

current state:
==============
(setq
window-system 'x
LaTeX-version "2e"
TeX-style-path '("style/" "auto/" "/home/marcuirl/thesis/bib/style/"
"/home/marcuirl/lib/TeX/bib/style/"
"/home/marcuirl/lib/TeX/inputs/style/"
"/home/marcuirl/lib/TeX/inputs/foils/style/"
"/home/marcuirl/thesis/bib/auto/"
"/home/marcuirl/lib/TeX/bib/auto/"
"/home/marcuirl/lib/TeX/inputs/auto/"
"/home/marcuirl/lib/TeX/inputs/foils/auto/"
"/usr/share/emacs/site-lisp/auctex/style/"
"/usr/local/var/auctex/")
TeX-auto-save t
TeX-parse-self t
TeX-master t
)
--
Unless otherwise noted, the statements herein reflect my
personal opinions and not those of any organisation with
which I may be affiliated.
Ralf Angeli
2005-02-16 13:58:29 UTC
Permalink
Post by marcuirl
\verb+\+ breaks fortifying. After the second `+' all LaTeX source
appears as if between $$, in my case at least. Remains like this until
another \verb+\+ is encountered.
Well, I've been aware of that for some time know but unfortunately I
don't know how to fix it. The backslash has escape syntax which seems
to override the syntax property placed at the position following it.
This will lead to `parse-partial-sexp' not finding the correct end of
the \verb construct. I don't know if there is a way to get rid of the
backslash's escape syntax in verbatim commands/environments, or how to
make `parse-partial-sexp' ignore it.

Here is some code in case somebody wants to experiment:

(with-temp-buffer
(insert "foo +\\+ bar")
(put-text-property 5 6 'syntax-table '(15))
(put-text-property 7 8 'syntax-table '(15))
(goto-char (point-min))
(set (make-local-variable 'parse-sexp-lookup-properties) t)
(let ((old-state (parse-partial-sexp (point-min) (point-max)
nil nil nil 'syntax-table)))
(parse-partial-sexp (point) (point-max)
nil nil old-state 'syntax-table))
(point))

Note how the value returned changes upon replacing the "\\" e.g. with
"a".
--
Ralf
Ralf Angeli
2005-02-16 16:08:35 UTC
Permalink
Post by Ralf Angeli
Post by marcuirl
\verb+\+ breaks fortifying. After the second `+' all LaTeX source
appears as if between $$, in my case at least. Remains like this until
another \verb+\+ is encountered.
Well, I've been aware of that for some time know but unfortunately I
don't know how to fix it. The backslash has escape syntax which seems
to override the syntax property placed at the position following it.
This will lead to `parse-partial-sexp' not finding the correct end of
the \verb construct. I don't know if there is a way to get rid of the
backslash's escape syntax in verbatim commands/environments, or how to
make `parse-partial-sexp' ignore it.
I'm so stupid that I don't even see the solution when it jumps right
into my face. It should be fixed in CVS now.
--
Ralf
marcuirl
2005-02-16 17:06:20 UTC
Permalink
Post by Ralf Angeli
Post by Ralf Angeli
Post by marcuirl
\verb+\+ breaks fortifying. After the second `+' all LaTeX source
appears as if between $$, in my case at least. Remains like this until
another \verb+\+ is encountered.
Well, I've been aware of that for some time know but unfortunately I
don't know how to fix it. The backslash has escape syntax which seems
to override the syntax property placed at the position following it.
This will lead to `parse-partial-sexp' not finding the correct end of
the \verb construct. I don't know if there is a way to get rid of the
backslash's escape syntax in verbatim commands/environments, or how to
make `parse-partial-sexp' ignore it.
I'm so stupid that I don't even see the solution when it jumps right
into my face. It should be fixed in CVS now.
Sometimes just talking and thinking out loud helps the ideas and
solutions to come!

Thanks for the fix, marcu
--
Unless otherwise noted, the statements herein reflect my
personal opinions and not those of any organisation with
which I may be affiliated.
Loading...