From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.devel Subject: Re: Links in WoMan buffer should not call `man' Date: Tue, 05 Sep 2006 01:38:57 -0400 Message-ID: <874pvmx47i.fsf@cs.cmu.edu> References: <874pvy0wik.fsf@jurta.org> <87zmdhzusd.fsf@jurta.org> <878xkzz1i0.fsf@jurta.org> <87hcznvv8m.fsf@cs.cmu.edu> <87d5abvuzk.fsf@cs.cmu.edu> <878xkzvsrm.fsf@cs.cmu.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1157434765 29109 80.91.229.2 (5 Sep 2006 05:39:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 5 Sep 2006 05:39:25 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 05 07:39:24 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GKTeW-0000M5-R7 for ged-emacs-devel@m.gmane.org; Tue, 05 Sep 2006 07:39:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GKTeW-0008U7-8f for ged-emacs-devel@m.gmane.org; Tue, 05 Sep 2006 01:39:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GKTe8-0008Ol-QD for emacs-devel@gnu.org; Tue, 05 Sep 2006 01:38:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GKTe8-0008ON-9V for emacs-devel@gnu.org; Tue, 05 Sep 2006 01:38:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GKTe7-0008OI-SZ for emacs-devel@gnu.org; Tue, 05 Sep 2006 01:38:52 -0400 Original-Received: from [205.201.10.244] (helo=maru) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GKTom-00031W-IG; Tue, 05 Sep 2006 01:49:52 -0400 Original-Received: from md5i by maru with local (Exim 4.63) (envelope-from ) id 1GKTeD-0007Nz-9a; Tue, 05 Sep 2006 01:38:57 -0400 Original-To: Juri Linkov In-Reply-To: <878xkzvsrm.fsf@cs.cmu.edu> (Michael Welsh Duggan's message of "Tue, 05 Sep 2006 00:31:25 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:59352 Archived-At: Michael Welsh Duggan writes: > Michael Welsh Duggan writes: > >> Michael Welsh Duggan writes: >> >>> Juri Linkov writes: >>> >>>>> the last command typed in the woman's dedicated frame fails with the error >>>>> signalled by string-match: >>>>> >>>>> Man-translate-references: Wrong type argument: arrayp, nil >>>>> >>>>> How about debugging it? This sounds like something straightforward >>>>> to debug. >>>> >>>> I narrowed it to the simplest case. This error occurs only when `M-x man' >>>> is executed in the *Messages* buffer. (The shortest key sequence to >>>> reproduce it: `C-h e M-x man RET man RET') >>> >>> I don't know what the correct fix for the underlying problem is (i.e., >>> the fact that this doesn't error out in other contexts), but the >>> problem can be solved by fixing the Man-name-regexp, which is currenly >>> invalid. The following is a patch for that. >> >> I take my original statement back. The character I removed was not a >> hyphen as I expected, but rather a soft-hyphen (U+00AD). On the other >> hand, the fact that removing this character fixed the problem might >> narrow down the problem a bit more. I will now look into this a bit >> more deeply. > > Some time later, I am realizing that string_match_1 is using > current_buffer's case table. Since the string being matched against > might have nothing to do with the current buffer, this seems > incorrect. Is this a red herring? More data: The *Message* buffer at dump time has a case_canon_table with three extra slots, all nil. (gdb) run The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /usr/local/src/emacs/src/emacs -Q [Thread debugging using libthread_db enabled] [New Thread -1213884736 (LWP 28342)] [Switching to Thread -1213884736 (LWP 28342)] Breakpoint 10, main (argc=2, argv=0xbf884c74) at emacs.c:843 (gdb) p Vbuffer_alist $65 = 137906437 (gdb) xcdr $66 = 0x8384a85 (gdb) xcdr $67 = 0x8382d55 (gdb) xcar $68 = 0x8382d4d (gdb) xcdr $69 = 0x83beb1c (gdb) xbuffer $70 = (struct buffer *) 0x83beb18 (unsigned char *) 0x8389220 "*Messages*" (gdb) p $70->case_canon_table $71 = 137940012 (gdb) xchartable $72 = (struct Lisp_Char_Table *) 0x838cc28 Purpose: "case-table" 3 extra slots (gdb) p $72->extras[0] $73 = 137914569 (gdb) pr nil (gdb) p $72->extras[1] $74 = 137914569 (gdb) pr nil (gdb) p $72->extras[2] $75 = 137914569 (gdb) pr nil On buffer creation, the buffers case_canon_table gets a copy of Vascii_downcase_table's second extra slot, which matches (the first two of this slot's extra elements are also nil). (gdb) p Vascii_downcase_table $76 = 137938404 (gdb) xchartable $77 = (struct Lisp_Char_Table *) 0x838c5e0 Purpose: "case-table" 3 extra slots (gdb) p $77->extras[1] $79 = 139808316 (gdb) xchartable $80 = (struct Lisp_Char_Table *) 0x8554e38 Purpose: "case-table" 3 extra slots (gdb) p $80->extras[0] $85 = 137914569 (gdb) pr nil (gdb) p $80->extras[1] $86 = 137914569 (gdb) pr nil I am still trying to figure out what all this means. Hopefully, this analysis is useful to someone else. -- Michael Welsh Duggan (md5i@cs.cmu.edu)