Discussion:
latest auctex CVS fails to load under xemacs 21.5.19
Artemio Gonzalez Lopez
2005-03-15 20:09:13 UTC
Permalink
Visiting a tex file in the latest CVS auctex under xemacs 21.5.19
(CVS-20050227) fails to load auctex, and produces the following backtrace:

(1) (file-mode-spec/warning) Error in File mode specification: Wrong
type argument: stringp, 12

Backtrace follows:

string-match("^[0-9]+" 12)
# bind (base-size-string face-name num --dotimes-temp--50522 i)
font-latex-make-title-faces()
byte-code("..." [font-latex-make-title-faces custom-declare-face
font-latex-title-4-face featurep xemacs ((((type tty pc) (class color)
(background light)) (:foreground "blue4" :bold t)) (((type tty pc)
(class color) (background dark)) (:foreground "yellow" :bold t))
(((class color) (background light)) (:bold t :foreground "blue4" :family
"helvetica")) (((class color) (background dark)) (:bold t :foreground
"yellow" :family "helvetica")) (t (:bold t :family "helvetica")))
((((type tty pc) (class color) (background light)) (:foreground "blue4"
:weight bold)) (((type tty pc) (class color) (background dark))
(:foreground "yellow" :weight bold)) (((class color) (background light))
(:weight bold :inherit variable-pitch :foreground "blue4")) (((class
color) (background dark)) (:weight bold :inherit variable-pitch
:foreground "yellow")) (t (:weight bold :inherit variable-pitch))) "Face
for LaTeX titles at level 4." :group font-latex-highlighting-faces] 6)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
load-internal("font-latex" nil nil nil binary)
# bind (path handler filename nosuffix nomessage noerror file)
load("font-latex" nil nil nil)
# (unwind-protect ...)
font-latex-setup()
VirTeX-common-initialization()
LaTeX-common-initialization()
latex-mode()
tex-mode()
# bind (alist mode name keep-going)
# (unwind-protect ...)
# bind (just-from-file-name)
set-auto-mode()
#<compiled-function nil "...(5)" [set-auto-mode t] 1>()
# (unwind-protect ...)
call-with-condition-handler(#<compiled-function
(__call_trapping_errors_arg__) "...(17)" [__call_trapping_errors_arg__
errstr error-message-string lwarn file-mode-spec warning "Error in %s:
%s\n\nBacktrace follows:\n\n%s" "File mode specification"
backtrace-in-condition-handler-eliminating-handler] 8>
#<compiled-function nil "...(5)" [set-auto-mode t] 1>)
# (condition-case ... . ((error)))
# bind (find-file)
normal-mode(t)
# bind (nomodes after-find-file-from-revert-buffer noauto warn error)
after-find-file(nil t)
# (unwind-protect ...)
# bind (inhibit-read-only error number truename rawfile nowarn
filename buf)
find-file-noselect-1(#<buffer "chap3.tex">
"/Backup/Documents/Coursework/Mecanica Teorica/Apuntes/chap3.tex" nil
nil "/Backup/Documents/Coursework/Mecanica Teorica/Apuntes/chap3.tex"
(631381 234881026))
byte-code("..." [number truename rawfile nowarn filename buf
set-buffer-major-mode find-file-noselect-1] 7)
# (condition-case ... . ((t (byte-code "¬!à√ @ A\"á" [buf data
kill-buffer signal] 3))))
# bind (number truename buf wildcards rawfile nowarn filename)
find-file-noselect("/Backup/Documents/Coursework/Mecanica
Teorica/Apuntes/chap3.tex" nil nil nil)
# bind (wildcards codesys filename)
find-file("/Backup/Documents/Coursework/Mecanica
Teorica/Apuntes/chap3.tex")
eval((find-file "/Backup/Documents/Coursework/Mecanica
Teorica/Apuntes/chap3.tex"))
# (condition-case ... . error)
# (catch top-level ...)

My installation info follows:

uname -a: Darwin imac-g5.local 7.8.0 Darwin Kernel Version 7.8.0: Wed
Dec 22 14:26:17 PST 2004; root:xnu/xnu-517.11.1.obj~1/RELEASE_PPC Power
Macintosh powerpc

./configure '--pdump' '--error-checking=no' '--with-ldap=no'
'--with-postgresql=no' '--with-default-eol-detection' '--with-mule=no'
'--with-tty' '--with-athena=3d' '--with-widgets=motif'
'--prefix=/opt/local' '--infodir=/opt/local/share/info'
'--mandir=/opt/local/share/man' '--cflags=-fast'
'--site-includes=/opt/local/include' '--site-libraries=/opt/local/lib'
'--dynamic'


XEmacs 21.5-b19 "chives" (+CVS-20050227) configured for
`powerpc-apple-darwin7.8.0'.


Compilation Environment and Installation Defaults:
Source code location:
/Users/artemio/Archive/xemacs/xemacs-21.5
Installation prefix: /opt/local
Additional header files: /opt/local/include
Additional libraries: /opt/local/lib
Operating system description file: `s/darwin.h'
Machine description file: `m/powerpc.h'
Compiler version: gcc (GCC) 3.3 20030304 (Apple
Computer, Inc. build 1671)
- GCC specs file: /usr/libexec/gcc/darwin/ppc/3.3/specs
- Compiler command: gcc -Wall -Wno-switch -Wundef
-Wsign-compare -Wno-char-subscripts -Wpacked -Wpointer-arith
-Wunused-parameter -g -fast
libc version:
Relocating allocator for buffers: no
GNU version of malloc: no
- The GNU allocators don't work with this system configuration.

Window System:
Compiling in support for the X window system:
- X Windows headers location: /usr/X11R6/include
- X Windows libraries location: /usr/X11R6/lib
- Handling WM_COMMAND properly.
Using Lucid menubars.
Using Lucid scrollbars.
Using Motif dialog boxes.
Using Motif native widgets.

TTY:
Compiling in support for ncurses.

Images:
Compiling in support for GIF images (builtin).
Compiling in support for XPM images.
Compiling in support for PNG images.
Compiling in support for JPEG images.
Compiling in support for TIFF images.

Sound:

Databases:
Compiling in support for Berkeley database.
Compiling in support for DBM.

Internationalization:

Mail:
Compiling in support for "file" mail spool file locking method.

Other Features:
Inhibiting IPv6 canonicalization at startup.
Compiling in support for dynamic shared object modules.
Using the new portable dumper.
Compiling in support for extra debugging code.

Any hints?

Cheers,

Artemio Gonzalez
artemiog<AT>mac<dot>com
Ralf Angeli
2005-03-15 20:59:17 UTC
Permalink
Post by Artemio Gonzalez Lopez
Visiting a tex file in the latest CVS auctex under xemacs 21.5.19
(1) (file-mode-spec/warning) Error in File mode specification: Wrong
type argument: stringp, 12
string-match("^[0-9]+" 12)
# bind (base-size-string face-name num --dotimes-temp--50522 i)
font-latex-make-title-faces()
Oh great. `font-size' can return a string _and_ a number? The
function unfortunately is not documented. But looking at
`x-font-create-object' it seems that it may return a number if the
font name includes the size in points and a string if this is not the
case but the size in pixels is given. And to make it even more
interesting it can return nil if no size is specified.

I checked a fix into CVS. Thanks for the report.
--
Ralf
David Kastrup
2005-03-15 21:50:01 UTC
Permalink
Post by Ralf Angeli
Post by Artemio Gonzalez Lopez
Visiting a tex file in the latest CVS auctex under xemacs 21.5.19
Wrong type argument: stringp, 12
string-match("^[0-9]+" 12)
# bind (base-size-string face-name num --dotimes-temp--50522 i)
font-latex-make-title-faces()
Oh great. `font-size' can return a string _and_ a number? The
function unfortunately is not documented. But looking at
`x-font-create-object' it seems that it may return a number if the
font name includes the size in points and a string if this is not
the case but the size in pixels is given. And to make it even more
interesting it can return nil if no size is specified.
I suppose this is one of those cases Stephen was referring to when he
said that XEmacs chose not to follow Emacs' deficient APIs in all
cases.

Sorry, could not resist. I tried. Wouldn't do.

I almost think this might be worth filing a bug report: if the
function is not documented and returns inconsistent stuff, chances are
that it is the completely wrong interface to use and people on the
xemacs-beta list might tell you what to do instead.

We _do_ have font size calculating code in preview/prv-xemacs.el. It
might be worth taking a look there: AFAIR, this worked pretty well
consistently.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Ralf Angeli
2005-03-16 10:07:16 UTC
Permalink
Post by David Kastrup
Post by Ralf Angeli
Oh great. `font-size' can return a string _and_ a number? The
function unfortunately is not documented. But looking at
`x-font-create-object' it seems that it may return a number if the
font name includes the size in points and a string if this is not
the case but the size in pixels is given. And to make it even more
interesting it can return nil if no size is specified.
I suppose this is one of those cases Stephen was referring to when he
said that XEmacs chose not to follow Emacs' deficient APIs in all
cases.
Sorry, could not resist. I tried. Wouldn't do.
Well, at least you are better off than me. My tongue is bleeding from
biting on it.
Post by David Kastrup
I almost think this might be worth filing a bug report: if the
function is not documented and returns inconsistent stuff, chances are
that it is the completely wrong interface to use and people on the
xemacs-beta list might tell you what to do instead.
Probably.
Post by David Kastrup
We _do_ have font size calculating code in preview/prv-xemacs.el. It
might be worth taking a look there: AFAIR, this worked pretty well
consistently.
What prv-xemacs.el basically does is this:

(round (/ (* (/ 720.0 25.4)
(face-height 'default)
(device-mm-height))
(device-pixel-height)))

I don't know what the resulting value is supposed to be. Points?
Anyway, it works with `face-height' which looks as wrong as the
original definition we had in font-latex.
--
Ralf
David Kastrup
2005-03-16 10:31:32 UTC
Permalink
Post by Ralf Angeli
(round (/ (* (/ 720.0 25.4)
(face-height 'default)
(device-mm-height))
(device-pixel-height)))
I don't know what the resulting value is supposed to be. Points?
It simulates the :height attribute of Emacs which is described as

`:height'
Either the font height, an integer in units of 1/10 point, [...]
Post by Ralf Angeli
Anyway, it works with `face-height' which looks as wrong as the
original definition we had in font-latex.
No idea about that. This is pretty much what worked out for
preview-latex. Whether this is because it is right or because it is
completely idiotic but happens to be in the right scale by chance in
the few cases that have been tested, I don't know anymore...
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Loading...