Leo | 16 May 2010 15:39
Picon
Gravatar

Invalid face reference: quote

Hello,

I have been seeing this printed in *Message* and have identified that it
is from AUCTeX. Do:

 emacs -q -nw bug.tex

and you will seen similar msgs.

Invalid face reference: quote [104 times]
Invalid face reference: quote [12 times]
Invalid face reference: quote [244 times]
Invalid face reference: quote [8 times]
Invalid face reference: quote [59 times]
Invalid face reference: quote [39 times]
Invalid face reference: quote [30 times]
QuitInvalid face reference: quote
Invalid face reference: quote [15 times]
QuitInvalid face reference: quote
Invalid face reference: quote [43 times]

I am running emacs 23.2 with AUCTeX from today's CVS. Unfortunately this
is not straightforward to debug. I'd be grateful of any help on fixing
this?

Leo

Attachment (bug.tex): text/x-tex, 620 bytes
(Continue reading)

Leo | 16 May 2010 16:12
Picon
Gravatar

Re: Invalid face reference: quote

On 2010-05-16 14:39 +0100, Leo wrote:
> I am running emacs 23.2 with AUCTeX from today's CVS. Unfortunately this
> is not straightforward to debug. I'd be grateful of any help on fixing
> this?

--- a/auctex/font-latex.el.gz~
+++ b/auctex/font-latex.el.gz
 <at>  <at>  -514,7 +514,7  <at>  <at> 
        ((eq type 'noarg)
         `(,(intern (concat prefix name))
           ;; Quote a list of face properties but do not to quote a face symbol.
-          (0 ,(if (listp face) `',face face))))
+          (0 ,(if (listp face) `,face face))))
        ((eq type 'declaration)
         `(,(intern (concat prefix name))
           (0 'font-latex-warning-face t t)

Diff finished.  Sun May 16 15:09:05 2010

Leo
Georgi Boshnakov | 17 May 2010 09:23
Picon
Favicon

bug in TeX-math-input-method-off-regexp ?

Hello,

In tex.el, there seems to be a bug in the string

      TeX-math-input-method-off-regexp

which is

     "^\\(chinese\\|japanese\\|korean\\bulgarian\\russian\\)"

(Notice the absence of `|'  in the Cyrillic languages.)

Shouldn't it be

(setq TeX-math-input-method-off-regexp
       "^\\(chinese\\|japanese\\|korean\\|bulgarian\\|russian\\)")

I have this in my .emacs and haven't noticed that it is still wrong in  
AucTeX 11.86.

Georgi

--

-- 
Dr Georgi Boshnakov               tel: (+44) (0)161 306 3684
School of Mathematics             fax: (+44) (0)161 306 3669
Alan Turing Building 1.125
The University of Manchester
Oxford Road
Manchester M13 9PL
UK
(Continue reading)

Leo | 17 May 2010 11:16
Picon
Gravatar

Re: bug in TeX-math-input-method-off-regexp ?

On 2010-05-17 08:23 +0100, Georgi Boshnakov wrote:
> Hello,
>
> In tex.el, there seems to be a bug in the string
>
>      TeX-math-input-method-off-regexp
>
> which is
>
>     "^\\(chinese\\|japanese\\|korean\\bulgarian\\russian\\)"
>
> (Notice the absence of `|'  in the Cyrillic languages.)
>
> Shouldn't it be
>
> (setq TeX-math-input-method-off-regexp
>       "^\\(chinese\\|japanese\\|korean\\|bulgarian\\|russian\\)")

I think it is a bug too. I have applied the following patch in my local
branch.

diff --git a/tex.el b/tex.el
index 7260895..0f6f459 100644
--- a/tex.el
+++ b/tex.el
 <at>  <at>  -4941,7 +4941,7  <at>  <at>  sign.  With optional ARG, insert that many dollar signs."
   (TeX-math-input-method-off))

 (defvar TeX-math-input-method-off-regexp
-  "^\\(chinese\\|japanese\\|korean\\bulgarian\\russian\\)"
(Continue reading)

Ralf Angeli | 17 May 2010 18:05

Re: bug in TeX-math-input-method-off-regexp ?

* Georgi Boshnakov (2010-05-17) writes:

> In tex.el, there seems to be a bug in the string
>
>       TeX-math-input-method-off-regexp

Fixed in CVS.  Thanks for the report.

--

-- 
Ralf
Ralf Hemmecke | 21 May 2010 07:37
Picon

bug in auctex highlighting

Hi,

last night I sent the following bug to bug-auctex <at> gnu.org, but I cannot
see it see it here http://lists.gnu.org/archive/html/bug-auctex/.

Is there somewhere a proper bugtracker for auctex? Or must I assume that
auctex manages issues just via mailing lists?

Anyway, I have not much experience with auctex and elisp either, but
could somebody tell me about the logic how verbatim environments are
recognised?

There seems to be LaTeX-verbatim-p in latex.el relevant for this
purpose. but what is the actual workflow and where is it stored that the
cursor is currently inside a verbatim environment?

Best regards
Ralf

=====================================================================
Hello

My .emacs file is

---rhxBEGIN .emacs
(custom-set-variables
 '(LaTeX-verbatim-environments (quote ("verbatim" "verbatim*"
"myverbatim")))
 '(inhibit-startup-screen t))
(custom-set-faces)
(Continue reading)

Ralf Angeli | 22 May 2010 15:47

Re: bug in auctex highlighting

* Ralf Hemmecke (2010-05-21) writes:

> last night I sent the following bug to bug-auctex <at> gnu.org, but I cannot
> see it see it here http://lists.gnu.org/archive/html/bug-auctex/.

The list is moderated for unknown mail addresses, so you have to wait
until the moderator releases your message.

> Is there somewhere a proper bugtracker for auctex?

No.

> Or must I assume that
> auctex manages issues just via mailing lists?

Yes.

> Anyway, I have not much experience with auctex and elisp either, but
> could somebody tell me about the logic how verbatim environments are
> recognised?

For font locking?  This is done with syntactic keywords.  The regular
expressions for that are built in `font-latex-set-syntactic-keywords'
and hooked into the respective font-lock mechanism.  See font-lock.el
for more info on font locking with syntactic keywords.

> There seems to be LaTeX-verbatim-p in latex.el relevant for this
> purpose. but what is the actual workflow and where is it stored that the
> cursor is currently inside a verbatim environment?

(Continue reading)

Ralf Hemmecke | 22 May 2010 16:02
Picon

verbatim problem and proposal

Hello,

from what I have seen in the code, it seems that

http://www.gnu.org/software/auctex/manual/auctex/Known-problems.html#Known-problems

cannot be solved without a dramatic change in the code.

Prove me wrong, but as far as I understand the code, in order to
determine that point is inside a math or a verbatim environment, it is
searched backwards until the opening environment is found. That
seemingly works in most of the cases, but it cannot work in the most
general case.

For example,

\documentclass{article}
\begin{document}
\begin{verbatim}
  \begin{verbatim}
\end{verbatim}
\end{document}

is a proper latex document. But it's highlighting with auctex (at least
in my emacs23 is wrong. Auctex believes that everything up to
\end{document} is verbatim text.

Of course, it's certainly unwise to always scan the whole buffer from
the first line in order to figure out the correct state of point, but
one could keep a datastructure (a tree) that can be parsed and updated
(Continue reading)

Ralf Hemmecke | 22 May 2010 16:50
Picon

Re: bug in auctex highlighting

>> Is there somewhere a proper bugtracker for auctex?
> 
> No.
> 
>> Or must I assume that
>> auctex manages issues just via mailing lists?
> 
> Yes.

Well, it's up to you guys, but why don't you just switch on the
bugtracker feature provided by savannah?

>> Anyway, I have not much experience with auctex and elisp either, but
>> could somebody tell me about the logic how verbatim environments are
>> recognised?

> For font locking?  This is done with syntactic keywords.  The regular
> expressions for that are built in `font-latex-set-syntactic-keywords'
> and hooked into the respective font-lock mechanism.  See font-lock.el
> for more info on font locking with syntactic keywords.

OK, meanwhile, I've seen some code (in auctex) that tries to recognize
whether point is inside a verbatim environment. And that looks wrong to
me as you can see from my last message and the second picture here.
http://sites.google.com/site/hemmecke/emacs-auctex-verbatim-bug

But maybe, that wrong display is connected to way font-lock.el works. I
haven't yet studied that in detail.

Ralf
(Continue reading)

Ralf Angeli | 22 May 2010 17:03

Re: bug in auctex highlighting

* Ralf Hemmecke (2010-05-22) writes:

> Well, it's up to you guys, but why don't you just switch on the
> bugtracker feature provided by savannah?

Because bug tracking without an email interface sucks?

> OK, meanwhile, I've seen some code (in auctex) that tries to recognize
> whether point is inside a verbatim environment. And that looks wrong to
> me as you can see from my last message and the second picture here.
> http://sites.google.com/site/hemmecke/emacs-auctex-verbatim-bug

Well, it uses a heuristic which mostly works but fails in some corner
cases, e.g. in the ones you constructed.

> But maybe, that wrong display is connected to way font-lock.el works. I
> haven't yet studied that in detail.

Yes, font-latex (and therefore font-lock) does not use
`LaTeX-verbatim-p'.

--

-- 
Ralf

Gmane