From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] ignoring Info extensions Date: Fri, 02 Apr 2004 21:19:17 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87n05udyze.fsf@mail.jurta.org> References: <200404021416.i32EGYj01894@f7.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1080930944 30116 80.91.224.253 (2 Apr 2004 18:35:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Apr 2004 18:35:44 +0000 (UTC) Cc: emacs-devel@gnu.org, janneke@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Apr 02 20:35:32 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B9TVs-0002tH-00 for ; Fri, 02 Apr 2004 20:35:32 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B9TVo-0002Ag-00 for ; Fri, 02 Apr 2004 20:35:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B9TVj-0006Ss-JA for emacs-devel@quimby.gnus.org; Fri, 02 Apr 2004 13:35:23 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B9TTS-0005J6-RA for emacs-devel@gnu.org; Fri, 02 Apr 2004 13:33:02 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B9TSo-0004iQ-Tm for emacs-devel@gnu.org; Fri, 02 Apr 2004 13:32:54 -0500 Original-Received: from [66.33.219.6] (helo=knife.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B9TSo-0004h0-2V; Fri, 02 Apr 2004 13:32:22 -0500 Original-Received: from mail.jurta.org (80-235-32-79-dsl.mus.estpak.ee [80.235.32.79]) by knife.dreamhost.com (Postfix) with ESMTP id 6480DE4051; Fri, 2 Apr 2004 10:32:19 -0800 (PST) Original-To: karl@freefriends.org (Karl Berry) In-Reply-To: <200404021416.i32EGYj01894@f7.net> (Karl Berry's message of "Fri, 2 Apr 2004 09:16:34 -0500") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21206 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21206 karl@freefriends.org (Karl Berry) writes: > juri> I think `*Note' quoted with a preceding > ` or " character should not be considered as a valid reference > > I guess I can't think of a reason to write something like `@ref{foo}' or > "@ref{foo}", and I don't see any cases in reality, so this might be ok, > but neither am I clear as to why it is necessary. What does > fontification have to do with quote chars? (Sorry, I could not quickly > make sense of the code.) Could you explain a little? There are three cases with quoted `*Note' I was able to find: ./info.info:like a menu item except that it has `*note' instead of `*'. It ./info-stnd.info:with `*Note', and continue with a label and a target. ./texinfo-1: or an Info cross-reference saying `*Note NAME: NODE.'. Currently they are fontified incorrectly: the text between them and the next reference in the same Info node with them is very distorted. However, the first two cases will be fixed when the reference regexp will be changed to \*Note[ \t\n]+ because they have no whitespace after *Note. And the third case (in texinfo-1), even though it has whitespace after *Note, is not a problem at all, because it's just an example. Moreover, by coincidence, it refers to the node named `NODE', and the Texinfo manual has a node with the same name, so this reference is not broken! Currently the function `Info-fontify-node' has the code to skip the reference if the preceding character is ". The commentary says that it's a "hack". I haven't seen Info references with a leading ". Could someone tell is this code really needed. Otherwise, it could be removed. > eliz> How about if we instead detect the "*Note:*" case and don't > treat it as a reference? > > I believe this amounts to *Note:[^*] (vs. *Note:\s). I think either one > is ok, it won't make any difference in practice. I slightly tend toward > the latter, because it is clearer to understand "*Note: is always > followed by whitespace" rather than "*Note: is followed by anything > except a *" (which, in practice, is always whitespace). I guess you actually meant *Note[^:*] vs. *Note\s. Anyway, restricting the character after *Note to [:*] instead of whitespace apparently will not solve the problem for all known references. Here is the distribution of \*Note[^ \t]+ matches on the biggest Info base I found: 78 *Note:* 8 *NOTEBOOK, 6 *Note: 4 *NOTE:* 4 *NOTE* 3 *Note*: 2 *note:* 2 *NOTEBOOK) 2 *NOTE*: 1 *note* 1 *Notes:* 1 *Note2: 1 *note' 1 *Note', So perhaps whitespace is a better choice. -- Juri Linkov http://www.jurta.org/emacs/