Bug 69129 - auctex defaults to japanese latex and error messages
Summary: auctex defaults to japanese latex and error messages
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: xemacs
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-07-18 01:58 UTC by Manuel "Chilli" Chakravarty
Modified: 2007-04-18 16:44 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-02-21 07:52:33 UTC
Embargoed:


Attachments (Terms of Use)
Example LaTeX file triggering the bug (53 bytes, text/plain)
2002-11-14 02:41 UTC, Manuel "Chilli" Chakravarty
no flags Details

Description Manuel "Chilli" Chakravarty 2002-07-18 01:58:42 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020606

Description of problem:
The AucTeX package as included in XEmacs defaults to using the (non-existant)
"jlatex" binary (instead of "latex") and displays explanatory error messages by
default in Japanese.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Make sure you have (require 'tex-site) in init.el [to activate auctex]
2. start "xemacs"
3. Load a LaTeX file with a non-standard document class (eg, Springer's llncs style)
4. Type C-c C-c
*** first bug: Default choice is jLaTeX instead of LaTeX
5. Type "LaTeX<return>"
*** second bug: AucTex uses the "jlatex" binary instead of "latex"
6. Evaluate 
    (setq TeX-command-list
      (cons  
       (list "LaTeX" "latex '\\nonstopmode\\input{%t}'"
	     'TeX-run-LaTeX nil t)
       TeX-command-list))
   to get around the above two problems
7. Introduce an error into your LaTeX file and compile
*** third bug: explanatory error message is in Japanese

Actual Results:  See the lines marked with *** above

Additional info:

I had a quick look at the relevant Elisp sources and at least part of the
problem is that the file tex-jp.el (of the AucTeX sources) assumes that any
Emacs that has mule compiled in must be that of a person who by default wants to
use Japanese (the third bug can certainly be attributed to this).

This assumption is flawed as (1) RH7.3 ships XEmacs by default with mule enabled
and (2) some people want to have support for Japanese enabled in XEmacs, but use
it only occassionally and certainly not for error messages produced by vanilla
LaTeX.

The first bug seems to be more subtle.  It occurs only when a non-standard
document class is used.  Presumably, as AucTeX inspects the document class to
determine which version of LaTeX to run.  "jlatex" seems to be a bad default to
fall back on when the document class is not recognised.

The second bug is related to the %l option defined in the variable
TeX-expand-list in tex.el and the associated function TeX-style-check.  It
causes AucTeX to choose "jlatex" even when "LaTeX" (and not "jLaTeX") is chosen
at the C-c C-c prompt.

Workaround: My current *crude* workaround is to include the following in
.xemacs/init.el:

(require 'tex-site)
(require 'tex)
(setq TeX-command-list
      (cons  
       (list "LaTeX" "latex '\\nonstopmode\\input{%t}'"
	     'TeX-run-LaTeX nil t)
       TeX-command-list))
(setq japanese-TeX-error-messages nil)

Comment 1 Trond Eivind Glomsrxd 2002-07-18 15:18:06 UTC
Do you have a file demonstrating the problem? I can't reproduce it with a
standard tex file.

Comment 2 Jens Petersen 2002-11-12 03:34:15 UTC
I don't seem able to reproduce this either.

Comment 3 Manuel "Chilli" Chakravarty 2002-11-14 02:40:16 UTC
I finally found a very simple way to reproduce the problem, which at least works
on RedHat 8.0 (I don't have a 7.3 box to test this anymore).

1) Start xemacs with "xemacs -q"
2) Type Esc : (require 'tex-site)
   [Here "Esc :" means the two keys "Esc" and ":".]
3) Load the file foo.tex, which I attach to this bug report
4) Type C-c C-c

Now you will be presented with the default of running jLaTeX.  Even if you
ignore this default and type latex<Enter>, xemacs will still try to run jLaTeX.

Analysis: It is the first letter of the name of the document class that triggers
the errorneous behaviour.  The document class "jfp", which I use in the
attachment, is the standard class for articles for the Journal of Functional
Programming (and has nothing to do with the Japanese language).

Work around: Changing the \documentclass{jfp} into \documentclass{ jfp} (i.e.,
adding a space character after the opening brace) defeats auctex's crude
algorithm for determining whether a class file needs Japanese LaTeX, but doesn't
bother LaTeX.


Comment 4 Manuel "Chilli" Chakravarty 2002-11-14 02:41:37 UTC
Created attachment 84964 [details]
Example LaTeX file triggering the bug

Comment 5 Jens Petersen 2002-11-14 03:29:52 UTC
Ah, thanks for pinning it down.  (Of course it should be running
platex and not jlatex for Japanese LaTeX but that is another issue
I guess :-)

Comment 6 Jens Petersen 2002-11-15 04:03:34 UTC
Ok, the culprit was TeX-format-list (tex.el) whose default car is

  ("JLATEX" japanese-latex-mode
     "\\\\\\(documentstyle[^%\n]*{j\\|documentclass[^%\n]*{j\\)")

Should get fixed in the next package release (21.4.10-3).

Comment 7 Ville Skyttä 2002-11-18 22:54:00 UTC
This is included in xemacs-21.4.10-3, but actually the patch is not applied;
during the build there's a message:

+ patch -b .jltx
patch: **** Can't find file .jltx : No such file or directory

I guess the -b option of patch doesn't take an argument.

Comment 8 Jens Petersen 2002-11-19 07:28:35 UTC
Yep, I messed up the patch command, and rpmbuild just went on
regardless :-\  Should get properly fixed in next package release, thanks.

Comment 9 Jens Petersen 2002-12-23 17:07:13 UTC
Should be fixed in 21.4.10-5.  Thanks.


Note You need to log in before you can comment on or make changes to this bug.