Subject: bug#25563: 11.90; Many predicates in TeX-view-predicate-list-builtin don't work.

From: Tassilo Horn <[email-masked]>
Date: Thu, 02 Feb 2017 06:52:47 +0100

Ikumi Keita <[email-masked]> writes:

Hi Ikumi,

> The reason for this is that the current AUCTeX does not append the
> documentclass options to the active styles of the document.  In the days
> that the predicates did function, the options were present in the output
> of `(TeX-style-list)'.  However, evaluating `(TeX-style-list)' in the
> buffer of the example above yields just
> ("art10" "article" "latex2e" "FILENAME" "LATEX")
> , which lacks "a5paper".  Thus the predicate
> ----------------------------------------------------------------------
>     (paper-a5
>      (TeX-match-style "\\`a5paper\\|a5comb\\'"))
> ----------------------------------------------------------------------
> in TeX-view-predicate-list-builtin returns negative result.  I suppose
> that the other predicates related to paper size in
> TeX-view-predicate-list-builtin do not function anymore, too.

Oh, good catch.  We've rewritten that a bit so that `TeX-style-list' is
just that, the list of styles.  In addition to that, there are now

,----[ C-h v LaTeX-provided-class-options RET ]
| LaTeX-provided-class-options is a variable defined in ‘latex.el’.
| Its value is nil
| 
|   Automatically becomes buffer-local when set.
| 
| Documentation:
| Alist of options provided to LaTeX classes.
| For each element, the CAR is the name of the class, the CDR is
| the list of options provided to it.
| 
| E.g., its value will be
|   (("book" "a4paper" "11pt" "openany" "fleqn")
|    ...)
| See also ‘LaTeX-provided-package-options’.
`----

(and that one needs to be checked now) and

,----[ C-h v LaTeX-provided-package-options RET ]
| LaTeX-provided-package-options is a variable defined in ‘latex.el’.
| Its value is nil
| 
|   Automatically becomes buffer-local when set.
| 
| Documentation:
| Alist of options provided to LaTeX packages.
| For each element, the CAR is the name of the package, the CDR is
| the list of options provided to it.
| 
| E.g., its value will be
|   (("babel" "german")
|    ("geometry" "a4paper" "top=2cm" "bottom=2cm" "left=2.5cm" "right=2.5cm")
|    ...)
| See also ‘LaTeX-provided-class-options’.
`----

I'll see if I can fix it.  And "landscape" is another document class
option which is broken right now.

Thanks for the report!

Bye,
Tassilo