This bug report will be sent to the XEmacs Development Team,
not to your local site managers!!
Please write in English, because the XEmacs maintainers do not have
translators to read other languages for them.
Please describe as succinctly as possible:
- What happened.
- What you thought should have happened.
- Precisely what you were doing at the time.
Please also include any C or lisp back-traces that you may have.
================================================================
Dear Bug Team!
I've just been struggling for some time (my fault, I'm not enough of
an XEmacs/PSGML expert) with the problem that, when I load an HTML
file without a doctype declaration, I always get "external entity html
not found".
I created a CATALOG of my own with a doctype entry for html, although
I later found there was one anyway in
.../xemacs/xemacs-packages/etc/psgml/CATALOG, with the entry
DOCTYPE HTML html.dtd
but it still didn't work.
Much puzzling over elisp later, I found the answer: the names of
doctypes found in catalog files are upcased, but sgml-catalog-lookup
doesn't upcase the name it tries to match against. The following patch
cures that:
--- psgml-parse.el Tue Feb 13 06:06:19 2001
+++ psgml-parse.el.new Sun Aug 4 22:49:05 2002
@@ -2015,6 +2015,8 @@
type 'entity))
((eq type 'dtd)
(setq type 'doctype)))
+ (if (eq type 'doctype)
+ (setq name (upcase name)))
;;(sgml-trace-lookup " [pubid='%s' type=%s name='%s']" pubid type name)
(let ((remaining files)
(file nil))
It also seems sensible for the same reason to change the line in
psgml-html.el/html-mode so that it reads
sgml-default-doctype-name "HTML"
(it's unnecessary, since it will be upcased anyway, but it seems
sensible to have all literal doctypes in upper case so as to avoid
confusion (and possible bugs)).
Now it works fine: you can load un-doctyped HTML (such as that
produced by Google) into XEmacs (I have Opera set up to use XEmacs as
its source viewer) and happily play around, even with
auto-activate-dtd on.
I'm somewhat surprised no-one fixed this before, but I suppose most
people are happy to obey the command in the PSGML info that "you must
have a doctype declaration", even though the defaulting mechanisms
suggest that this is not strictly true.
================================================================
System Info to help track down your bug:
---------------------------------------
uname -a: Linux mnemosyne 2.4.18-4 #1 Thu May 2 18:10:25 EDT 2002 i686 unknown
./configure '--prefix=/home/rrt' '--with-mule'
XEmacs 21.4.8 "Honest Recruiter" configured for `i686-pc-linux'.
Compilation / Installation:
Source code location: /home/rrt/src/xemacs-21.4.8
Installation prefix: /home/rrt
Operating system description file: `s/linux.h'
Machine description file: `m/intel386.h'
Compiler: gcc -g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes -Wsign-compare -Wshadow
Relocating allocator for buffers: no
GNU version of malloc: yes
- Using Doug Lea's new malloc from the GNU C Library.
Linking with `-z nocombreloc'.
- Consider configuring with --pdump.
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.
TTY:
Compiling in support for ncurses.
Compiling in support for GPM (General Purpose Mouse).
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.
Compiling in support for X-Face message headers.
Sound:
Compiling in support for sound (native).
Databases:
Compiling in support for Berkeley database.
Compiling in support for PostgreSQL.
- Using PostgreSQL header file: libpq-fe.h
- Using PostgreSQL V7 bindings.
Internationalization:
Compiling in support for Mule (multi-lingual Emacs).
Compiling in support for XIM (X11R5+ I18N input method).
- Using raw Xlib to provide XIM support.
Mail:
Compiling in support for "dot-locking" mail spool file locking method.
Other Features:
Inhibiting IPv6 canonicalization at startup.
Compiling in support for dynamic shared object modules.
Load-Path Lisp Shadows:
----------------------
(/home/rrt/elisp/winring
/home/rrt/lib/xemacs/xemacs-packages/lisp/edit-utils/winring
/home/rrt/elisp/setnu
/home/rrt/lib/xemacs/xemacs-packages/lisp/edit-utils/setnu)
Installed XEmacs Packages:
-------------------------
((xemacs-devel:version 1.47 :type single-file)
(xemacs-base :version 1.66 :type regular)
(vm :version 7.07 :type regular)
(view-process :version 1.11 :type regular)
(vc :version 1.33 :type regular)
(tm :version 1.34 :type regular)
(time :version 1.11 :type regular)
(textools :version 1.12 :type regular)
(text-modes :version 1.48 :type single-file)
(texinfo :version 1.2 :type regular)
(strokes :version 1.08 :type regular)
(speedbar :version 1.23 :type regular)
(sounds-wav :version 1.1 :type regular)
(slider :version 1.13 :type regular)
(sh-script :version 1.15 :type regular)
(sgml :version 1.08 :type regular)
(semantic :version 1.12 :type regular)
(rmail :version 1.13 :type regular)
(reftex :version 1.25 :type regular)
(psgml :version 1.28 :type regular)
(ps-print :version 1.04 :type regular)
(prog-modes
:version
1
.6
:type
single-file)
(pcomplete :version 1.01 :type regular)
(pcl-cvs :version 1.63 :type regular)
(pc :version 1.25 :type single-file)
(os-utils :version 1.28 :type single-file)
(net-utils :version 1.27 :type single-file)
(mmm-mode :version 1.0 :type regular)
(misc-games :version 1.15 :type single-file)
(mine :version 1.14 :type regular)
(mailcrypt :version 2.11 :type regular)
(mail-lib :version 1.47 :type regular)
(jde :version 1.35 :type regular)
(ispell :version 1.24 :type regular)
(ilisp :version 1.27 :type regular)
(igrep :version 1.08 :type regular)
(ibuffer :version 1.08 :type regular)
(hm--html-menus :version 1.18 :type regular)
(haskell-mode :version 1.04 :type regular)
(gnus :version 1.62 :type regular)
(gnats :version 1.15 :type regular)
(games :version 1.13 :type regular)
(fsf-compat :version 1.11 :type single-file)
(frame-icon :version 1.09 :type regular)
(forms :version 1.14 :type regular)
(eterm :version 1.13 :type regular)
(emerge :version 1.09 :type regular)
(elib :version 1.1 :type single-file)
(eieio :version 1.02 :type regular)
(efs :version 1.29 :type regular)
(edit-utils :version 1.89 :type single-file)
(ediff :version 1.41 :type regular)
(edebug :version 1.14 :type regular)
(dired :version 1.12 :type regular)
(dictionary :version 1.11 :type regular)
(debug :version 1.15 :type regular)
(cookie :version 1.14 :type regular)
(cc-mode :version 1.28 :type regular)
(calendar :version 1.18 :type regular)
(calc :version 1.23 :type regular)
(c-support :version 1.16 :type single-file)
(build :version 1.06 :type regular)
(bbdb :version 1.21 :type regular)
(auctex :version 1.32 :type regular)
(apel :version 1.25 :type regular)
(mule-ucs :version 1.04 :type regular)
(mule-base :version 1.42 :type regular)
(lookup :version 1.12 :type regular)
(leim :version 1.18 :type regular)
(latin-unity :version 1.05 :type regular)
(egg-its :version 1.26 :type regular))
Features:
--------
(mail-abbrevs xemacsbug shadow shell view-less view hyper-apropos
psgml-dtd psgml-parse cus-edit cus-load cl-specs info sendmail rfc822
tempo psgml-xemacs sgml-mode psgml psgml-html cperl-mode mmm-mode
mmm-univ mmm-class mmm-region mmm-utils lua-mode comint font
disp-table blink-cursor permanent-buffers desktop lazy-lock lazy-shot
balloon-help avoid filladapt paren blink-paren after-save-commands env
scroll-in-place rsz-minibuf func-menu font-lock crypt crypt++ efs-cu
efs-x19.15 efs-fnh efs-ovwrt efs-auto dired-faces dired-xemacs dired
gnuserv pending-del change-mode advice advice-preload fm vc ring
vc-hooks ansi-color tex-site cc-styles cc-vars wid-edit cc-defs
mmm-auto mmm-vars mmm-compat overlay regexp-opt newcomment edebug
eval-reg ffap edmacro iswitchb find-files esms esms-conf esms-ssp-funs
bbdb timezone recent-files jka-compr mwheel time cus-face
xemacs-devel-autoloads xemacs-base-autoloads vm-autoloads
view-process-autoloads vc-autoloads tm-autoloads time-autoloads
textools-autoloads text-modes-autoloads texinfo-autoloads
strokes-autoloads speedbar-autoloads sounds-wav-autoloads
slider-autoloads sh-script-autoloads sgml-autoloads semantic-autoloads
rmail-autoloads reftex-autoloads psgml-autoloads ps-print-autoloads
prog-modes-autoloads pcomplete-autoloads pcl-cvs-autoloads
pc-autoloads os-utils-autoloads net-utils-autoloads mmm-mode-autoloads
misc-games-autoloads mine-autoloads mailcrypt-autoloads
mail-lib-autoloads jde-autoloads ispell-autoloads ilisp-autoloads
igrep-autoloads ibuffer-autoloads hm--html-menus-autoloads
haskell-mode-autoloads gnus-autoloads gnats-autoloads games-autoloads
fsf-compat-autoloads frame-icon-autoloads forms-autoloads
eterm-autoloads emerge-autoloads elib-autoloads eieio-autoloads
efs-autoloads edit-utils-autoloads ediff-autoloads edebug-autoloads
dired-autoloads dictionary-autoloads debug-autoloads cookie-autoloads
cc-mode-autoloads calendar-autoloads calc-autoloads
c-support-autoloads build-autoloads bbdb-autoloads auctex-autoloads
apel-autoloads mule-ucs-autoloads mule-base-autoloads lookup-autoloads
leim-autoloads latin-unity-autoloads egg-its-autoloads lisp-autoloads
loadhist auto-show fontl-hooks x-iso8859-1 slovenian czech romanian
ccl mule-help code-cmds gutter-items menubar-items x-menubar
mode-motion mouse itimer auto-save lisp-mode easymenu iso8859-1 page
buff-menu lib-complete cus-file derived frame text-props obsolete
cus-start custom widget cl-extra mini-cl cl cl-19 packages backquote
very-early-lisp postgresqlv7 postgresql file-coding mule
lucid-scrollbars cut-buffer lucid-menubars x c-balloon-help tty-frames
tty toolbar native-sound scrollbar unix-processes multicast
network-streams subprocesses modules menu-accelerator-support menubar
berkeley-db md5 xemacs xim gutter tiff png gif jpeg xface xpm xbm
lisp-float-type linux devices window-system base64)
Recent keystrokes:
-----------------
C A T TAB . BS BS . BS x RET C-x b o p RET M-x up RET
C-h C p up RET M-< C-s t r a c e button2 button2up
button2 button2up button1 button1up button2 button2up
button2 button2up button2 misc-user C-x b RET M-x up
RET C-x 1 C-x b RET C-x b C-s RET C-x b RET up up up
up up up up up up up up up up C-a C-SPC down down down
down down down down down down down down M-w M-x r e
p o TAB r TAB x e TAB RET
Recent messages (most recent first):
-----------------------------------
C-x p not defined.
Quit
Matches: (defun sgml-catalog-lookup (files pubid type name)
Loading xemacsbug...done
Loading xemacsbug...
Making completion list...
Matches: (defun sgml-catalog-lookup (files pubid type name)
Parsing prolog...done
Parsing prolog...
Wrote /home/rrt/.xemacs/custom.el
Attempt to change text outside editable field
To install your edits, invoke [State] and choose the Set operation
no selection: PRIMARY
no selection: PRIMARY
Parsing prolog...done
Reading compiled DTD...
Parsing prolog...
Completed
Completing file name...
Completed