From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Wells Newsgroups: gmane.emacs.devel Subject: Re: [jbw@macs.hw.ac.uk: strange Emacs 22.1 failure due to utf-8-compose-scripts when --no-window-system used] Date: Thu, 19 Jul 2007 19:08:25 +0100 Message-ID: <86d4youuzq.fsf@macs.hw.ac.uk> References: <86hco4wed4.fsf@macs.hw.ac.uk> <86644jwcjh.fsf@macs.hw.ac.uk> <86sl7lvijy.fsf@macs.hw.ac.uk> <86lkddui5a.fsf_-_@macs.hw.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1184868552 25806 80.91.229.12 (19 Jul 2007 18:09:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Jul 2007 18:09:12 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 19 20:09:10 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IBaR3-0005JR-KX for ged-emacs-devel@m.gmane.org; Thu, 19 Jul 2007 20:09:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IBaR2-0000lP-Hr for ged-emacs-devel@m.gmane.org; Thu, 19 Jul 2007 14:09:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IBaQy-0000kz-W7 for emacs-devel@gnu.org; Thu, 19 Jul 2007 14:09:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IBaQx-0000kU-Ta for emacs-devel@gnu.org; Thu, 19 Jul 2007 14:09:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IBaQx-0000kR-QW for emacs-devel@gnu.org; Thu, 19 Jul 2007 14:09:03 -0400 Original-Received: from izanami.macs.hw.ac.uk ([137.195.13.6]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IBaQv-000403-0U; Thu, 19 Jul 2007 14:09:01 -0400 Original-Received: from lxultra1.macs.hw.ac.uk ([137.195.27.173]:58464 helo=127.0.0.1) by izanami.macs.hw.ac.uk with smtp (Exim 4.51) id 1IBaQt-000884-9k; Thu, 19 Jul 2007 19:08:59 +0100 Original-Received: (nullmailer pid 31409 invoked by uid 1001); Thu, 19 Jul 2007 18:08:26 -0000 In-Reply-To: <86lkddui5a.fsf_-_@macs.hw.ac.uk> (Joe Wells's message of "Thu, 19 Jul 2007 05:33:37 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:75132 Archived-At: Joe Wells writes: > Kenichi Handa writes: > >> In article <86sl7lvijy.fsf@macs.hw.ac.uk>, Joe Wells = writes: >> >>> I have reverified the bug. I tested in a dummy account to make sure >>> none of my account settings affected things. I have also verified >>> that I get the bug when using the console (no X windows). >> >>> Here are some more details on my configuration. I am using >>> Ubuntu=C2=A06.06 LTS (=E2=80=9CDapper Drake=E2=80=9D) with all packages= fully updated. >>> Everything I am using is standard Ubuntu except for my kernel and >>> Emacs. I am using a custom Linux kernel version 2.6.17 (this version >>> was fairly current a year ago) with a few extra patches applied by my >>> hardware middleman. As I reported in my original report, I built >>> Emacs with these options: >> >>> export CFLAGS=3D'-O0 -g3 -ggdb' >>> ./configure --prefix=3D$HOME/local2 --enable-debug --disable-nls --wi= th-x-toolkit=3Dgtk >> >>> I suppose that the =E2=80=9C--disable-nls=E2=80=9D or =E2=80=9C--with-x= -toolkit=3Dgtk=E2=80=9D options >>> might contribute to the bug. >> >> I configured Emacs 21.1 with the same options, but still >> can't reproduce the bug (my distribution is Debian). After >> starting Emacs, the *Messsage* buffer contains this: >> >> ("/home/handa/local2/bin/emacs" "--quick" "--eval" "(setq utf-8-compose-= scripts\ t)" "--load" "lao-util") >> Loading encoded-kb...done >> For information about the GNU Project and its goals, type C-h C-p. >> Loading regexp-opt...done >> Loading thai-util... >> Loading mule-util...done >> Loading thai-util...done >> Loading devan-util... >> Loading ind-util...done >> Loading devan-util...done >> Loading mlm-util...done >> Loading tml-util...done > > Here is the *Messages* buffer for me which shows the error: > > ---------------------------------------------------------------------- > ("/home/jbw/local2/bin/emacs" "--quick" "--eval" "(setq utf-8-compose-scr= ipts t)" "--load" "lao-util") > Loading encoded-kb...done > For information about the GNU Project and its goals, type C-h C-p. > Loading thai-util... [2 times] > Loading mule-util... > Loading lao-util... [2 times] > Loading regexp-opt... > Loading lao-util... [2 times] > Loading regexp-opt... > Loading lao-util... [2 times] > Loading regexp-opt... > Loading lao-util... > utf-8-post-read-conversion: Recursive load: "/home/jbw/local2/share/emacs= /22.1/lisp/language/lao-util.elc", "/home/jbw/local2/share/emacs/22.1/lisp/= language/lao-util.elc", "/home/jbw/local2/share/emacs/22.1/lisp/emacs-lisp/= regexp-opt.elc", "/home/jbw/local2/share/emacs/22.1/lisp/language/lao-util.= elc", "/home/jbw/local2/share/emacs/22.1/lisp/language/lao-util.elc", "/hom= e/jbw/local2/share/emacs/22.1/lisp/emacs-lisp/regexp-opt.elc", "/home/jbw/l= ocal2/share/emacs/22.1/lisp/language/lao-util.elc" > ---------------------------------------------------------------------- > > There are several differences. Your *Messages* buffer shows > regexp-opt being loaded just once and before the other files. Mine > shows regexp-opt not being loaded until after several other files, and > it is loaded repeatedly as part of the recursive load loop. > > Mine shows thai-util being loaded _twice_, with the second time > apparently happening during the first time. > > Yours _never_ loads lao-util. > >> If you don't supply "--load lao-util", does your emacs work >> well? > > No, sooner or later something else causes it to be loaded. It seems > that any time an attempt is made to load =E2=80=9Cmule-util=E2=80=9D, =E2= =80=9Clao-util=E2=80=9D, or > =E2=80=9Cregexp-opt=E2=80=9D, a recursive loading loop results. A quick = check reveals > I get the same error with both of these command lines: > > emacs --no-window-system --quick --eval '(setq utf-8-compose-scripts t)= ' --load "mule-util" > > emacs --no-window-system --quick --eval '(setq utf-8-compose-scripts t)= ' --load "regexp-opt" > >> How about "--load lao-util.el" instead? > > I get the same problem if I load =E2=80=9Clao-util.el=E2=80=9D instead of= =E2=80=9Clao-util=E2=80=9D. > > --=20 > Joe > > P.S. Unfortunately, doing (setq debug-on-error t) before (load > "lao-util") does not trigger the debugger, which makes it harder to > figure out just what is happening. Well, debug-on-error is not working (presumably because the debugger itself is failing for the same reason), but stack-trace-on-error does work! I've appended the full stack trace below. It seems that an additional ingredient is needed to trigger the bug: the path to Emacs's installed location must include a symbolic link. On my system, Emacs is installed under =E2=80=9C/home/jbw/local2=E2=80=9D, = which is a symbolic link to =E2=80=9C/mnt/extra-space-02/jbw/local=E2=80=9D. Loading is canonicalizing paths using the function file-truename which invokes file-symlink-p which uses the macro DECODE_FILE which invokes code_convert_string_norecord using the value of default-file-name-coding-system which is mule-utf-8. The function code_convert_string_norecord makes an attempt to prevent character composition with the line =E2=80=9Ccoding.composing =3D COMPOSITION_DISABLE= D;=E2=80=9D, but this seems to be ignored (or be affecting a completely different code path for character composition). The function code_convert_string_norecord invokes decode_coding_string which invokes run_pre_post_conversion_on_str if the coding system has a post-read-conversion property. The coding system mule-utf-8 has as its value of its post-read-conversion property the function utf-8-post-read-conversion. The function run_pre_post_conversion_on_str then invokes utf-8-post-read-conversion, which attempts to run lao-compose-region. The function lao-compose-region is autoloaded from =E2=80=9Clao-util.el=E2= =80=9D, and loading that file defines the initial value of a variable by invoking =E2=80=9Cregexp-opt=E2=80=9D which is autoloaded from =E2=80=9Cregexp-opt.e= l=E2=80=9D. There is some additional complication. See the stack trace below. What seems to be needed is some way of telling the post-read-conversion function to do all of its usual work except for any work for character composition. Joe ---------------------------------------------------------------------- lao-compose-region(30 1) utf-8-post-read-conversion(29) file-symlink-p("/home/jbw/local2") file-truename("/home/jbw/local2" (91) ((("/home/jbw/" . "/home/jbw/") ("/= home/" . "/home/")))) file-truename("/home/jbw/local2/share" (91) ((("/home/jbw/" . "/home/jbw/= ") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs" (91) ((("/home/jbw/" . "/hom= e/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1" (91) ((("/home/jbw/" . = "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp" (91) ((("/home/jbw= /" . "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp/emacs-lisp" (91) ((= ("/home/jbw/" . "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp/emacs-lisp/debug.el= c") debug(error (error "Recursive load" "/home/jbw/local2/share/emacs/22.1/li= sp/language/lao-util.elc" "/home/jbw/local2/share/emacs/22.1/lisp/emacs-lis= p/regexp-opt.elc" "/home/jbw/local2/share/emacs/22.1/lisp/language/lao-util= .elc" "/home/jbw/local2/share/emacs/22.1/lisp/language/lao-util.elc" "/home= /jbw/local2/share/emacs/22.1/lisp/emacs-lisp/regexp-opt.elc" "/home/jbw/loc= al2/share/emacs/22.1/lisp/language/lao-util.elc" "/home/jbw/local2/share/em= acs/22.1/lisp/language/lao-util.elc" "/home/jbw/local2/share/emacs/22.1/lis= p/emacs-lisp/regexp-opt.elc")) lao-compose-region(30 1) utf-8-post-read-conversion(29) file-symlink-p("/home/jbw/local2") file-truename("/home/jbw/local2" (91) ((("/home/jbw/" . "/home/jbw/") ("/= home/" . "/home/")))) file-truename("/home/jbw/local2/share" (91) ((("/home/jbw/" . "/home/jbw/= ") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs" (91) ((("/home/jbw/" . "/hom= e/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1" (91) ((("/home/jbw/" . = "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp" (91) ((("/home/jbw= /" . "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp/emacs-lisp" (91) ((= ("/home/jbw/" . "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp/emacs-lisp/regexp-o= pt.elc") regexp-opt(("ngh" "kh" "qh" "ng" "th" "dh" "hp" "fh" "ph" "gn" "hh" "nh" = "mh" "lh" "yh" "wh" "hl" "hy" "hn" "hm" "k" "j" "s" "x" "y" "d" "t" "n" "b"= "p" "f" "m" "l" "r" "v" "w" "O" "h")) byte-code("\306\307\310\311\"!\312\307\310\311 \"!\313\307\310\311 \"!\312\307\310\311=0B\"!\314\307\310\311 \"!\315\307\310\311=0D\"!\260 \20= 7" [lao-transcription-consonant-alist lao-transcription-semi-vowel-alist la= o-transcription-vowel-alist lao-transcription-maa-sakod-alist lao-transcrip= tion-tone-alist lao-transcription-punctuation-alist "\\(" regexp-opt mapcar= car "\\)\\(" "\\)?\\(\\(" "\\)?\\(" "\\)?\\)?\\|"] 15) (defconst lao-transcription-pattern (byte-code "\306\307\310\311\"!\312\= 307\310\311 \"!\313\307\310\311 \"!\312\307\310\311=0B\"!\314\307\310\311 \"!\315\307\310\311=0D\"!\260 \20= 7" [lao-transcription-consonant-alist lao-transcription-semi-vowel-alist la= o-transcription-vowel-alist lao-transcription-maa-sakod-alist lao-transcrip= tion-tone-alist lao-transcription-punctuation-alist "\\(" regexp-opt mapcar= car "\\)\\(" "\\)?\\(\\(" "\\)?\\(" "\\)?\\)?\\|"] 15) ("/home/jbw/local2/= share/emacs/22.1/lisp/language/lao-util.elc" . 10639)) lao-compose-region(30 1) utf-8-post-read-conversion(29) file-symlink-p("/home/jbw/local2") file-truename("/home/jbw/local2" (91) ((("/home/jbw/" . "/home/jbw/") ("/= home/" . "/home/")))) file-truename("/home/jbw/local2/share" (91) ((("/home/jbw/" . "/home/jbw/= ") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs" (91) ((("/home/jbw/" . "/hom= e/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1" (91) ((("/home/jbw/" . = "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp" (91) ((("/home/jbw= /" . "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp/language" (91) ((("= /home/jbw/" . "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp/language/lao-util.e= lc") lao-compose-region(30 1) utf-8-post-read-conversion(29) file-symlink-p("/home/jbw/local2") file-truename("/home/jbw/local2" (91) ((("/home/jbw/" . "/home/jbw/") ("/= home/" . "/home/")))) file-truename("/home/jbw/local2/share" (91) ((("/home/jbw/" . "/home/jbw/= ") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs" (91) ((("/home/jbw/" . "/hom= e/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1" (91) ((("/home/jbw/" . = "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp" (91) ((("/home/jbw= /" . "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp/emacs-lisp" (91) ((= ("/home/jbw/" . "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp/emacs-lisp/regexp-o= pt.elc") regexp-opt(("ngh" "kh" "qh" "ng" "th" "dh" "hp" "fh" "ph" "gn" "hh" "nh" = "mh" "lh" "yh" "wh" "hl" "hy" "hn" "hm" "k" "j" "s" "x" "y" "d" "t" "n" "b"= "p" "f" "m" "l" "r" "v" "w" "O" "h")) byte-code("\306\307\310\311\"!\312\307\310\311 \"!\313\307\310\311 \"!\312\307\310\311=0B\"!\314\307\310\311 \"!\315\307\310\311=0D\"!\260 \20= 7" [lao-transcription-consonant-alist lao-transcription-semi-vowel-alist la= o-transcription-vowel-alist lao-transcription-maa-sakod-alist lao-transcrip= tion-tone-alist lao-transcription-punctuation-alist "\\(" regexp-opt mapcar= car "\\)\\(" "\\)?\\(\\(" "\\)?\\(" "\\)?\\)?\\|"] 15) (defconst lao-transcription-pattern (byte-code "\306\307\310\311\"!\312\= 307\310\311 \"!\313\307\310\311 \"!\312\307\310\311=0B\"!\314\307\310\311 \"!\315\307\310\311=0D\"!\260 \20= 7" [lao-transcription-consonant-alist lao-transcription-semi-vowel-alist la= o-transcription-vowel-alist lao-transcription-maa-sakod-alist lao-transcrip= tion-tone-alist lao-transcription-punctuation-alist "\\(" regexp-opt mapcar= car "\\)\\(" "\\)?\\(\\(" "\\)?\\(" "\\)?\\)?\\|"] 15) ("/home/jbw/local2/= share/emacs/22.1/lisp/language/lao-util.elc" . 10639)) lao-compose-region(30 1) utf-8-post-read-conversion(29) file-symlink-p("/home/jbw/local2") file-truename("/home/jbw/local2" (91) ((("/home/jbw/" . "/home/jbw/") ("/= home/" . "/home/")))) file-truename("/home/jbw/local2/share" (91) ((("/home/jbw/" . "/home/jbw/= ") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs" (91) ((("/home/jbw/" . "/hom= e/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1" (91) ((("/home/jbw/" . = "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp" (91) ((("/home/jbw= /" . "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp/language" (91) ((("= /home/jbw/" . "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp/language/lao-util.e= lc") lao-compose-region(30 1) utf-8-post-read-conversion(29) file-symlink-p("/home/jbw/local2") file-truename("/home/jbw/local2" (91) ((("/home/jbw/" . "/home/jbw/") ("/= home/" . "/home/")))) file-truename("/home/jbw/local2/share" (91) ((("/home/jbw/" . "/home/jbw/= ") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs" (91) ((("/home/jbw/" . "/hom= e/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1" (91) ((("/home/jbw/" . = "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp" (91) ((("/home/jbw= /" . "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp/emacs-lisp" (91) ((= ("/home/jbw/" . "/home/jbw/") ("/home/" . "/home/")))) file-truename("/home/jbw/local2/share/emacs/22.1/lisp/emacs-lisp/regexp-o= pt.elc") load("regexp-opt") eval((load "regexp-opt")) eval-last-sexp-1(nil) eval-last-sexp(nil) call-interactively(eval-last-sexp) ----------------------------------------------------------------------