From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70382: 29.3; Info-fontify-node renders cross-references misleadingly Date: Sun, 14 Apr 2024 14:43:31 -0400 Message-ID: References: <18edd090d56.b4d9f833651238.7754717828208203833@excalamus.com> <86edb7ncd6.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16852"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 70382@debbugs.gnu.org, matt@excalamus.com, Juri Linkov To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 14 20:44:04 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rw4pg-0004AK-3G for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Apr 2024 20:44:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rw4pU-00083A-2D; Sun, 14 Apr 2024 14:43:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rw4pT-00081S-16 for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2024 14:43:51 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rw4pS-0001rt-Oj for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2024 14:43:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rw4pd-0006t4-V9 for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2024 14:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Apr 2024 18:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70382 X-GNU-PR-Package: emacs Original-Received: via spool by 70382-submit@debbugs.gnu.org id=B70382.171312023926459 (code B ref 70382); Sun, 14 Apr 2024 18:44:01 +0000 Original-Received: (at 70382) by debbugs.gnu.org; 14 Apr 2024 18:43:59 +0000 Original-Received: from localhost ([127.0.0.1]:36142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rw4pb-0006sh-EH for submit@debbugs.gnu.org; Sun, 14 Apr 2024 14:43:59 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:2069) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rw4pY-0006sU-Ud for 70382@debbugs.gnu.org; Sun, 14 Apr 2024 14:43:57 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 29B7010004C; Sun, 14 Apr 2024 14:43:39 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1713120218; bh=AaHIGHULVOb7tkroYVha5xzDxWbDbAXkf+4ChJDhIzs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Ed+OU1JDmJy21mfadxVICTD9SpMd206LI5v6TJ6ixdRdB/WBbOkeSQeXvaxNrTvoF 4jSztKdEyOzue2E99Gy+rMj0pPpRQmIUCvXRPgPSMaoAKfx1EBqdSA91g1bkHNpFpm A767IvLaK+wq4FGMp7kQcHBH4ZgHml5o/A9T3+Sz0fbii3MXb/zQdrMU2X8649JPVp 2pc2hin1M9uHwvOqP2+wVGTrrdKUo2jkjqWWs6vMGIn8q78g/2Se5SlBNrOVI5b482 Y19lgNU5mbAQS4Sqr66KAW2KIPa6ZF9c5PXV+o9ImGYZMrYLlIqU0Oi972q8Cp2Rlj XFShvnoyhe0hQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1A599100048; Sun, 14 Apr 2024 14:43:38 -0400 (EDT) Original-Received: from pastel (unknown [45.72.201.215]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E244612068E; Sun, 14 Apr 2024 14:43:37 -0400 (EDT) In-Reply-To: <86edb7ncd6.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Apr 2024 19:21:57 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283308 Archived-At: > will look in the reader. You will see that the paragraph about @ref > in that section is also shown incorrectly (the Emacs Info reader > doesn't show "see" for @ref), and the paragraph about @pxref > incorrectly says the result starts with "*note" (it actually starts > with "see"). Yes, our prettifying of cross-references gets confused here because it mistakes the doc's text for a cross-reference (because that text is indeed showing an example of what such cross-references look like). Given that the Info format doesn't document what the actual text should look like, our prettifying can only be heuristic. Notice that even if you set `Info-hide-note-references` to nil, the "*Note NAME: NODE." is still highlighted if it were an actual cross-reference (and if you click on it you jump to the "node" node). In the Info reader, the behavior is almost the same: this example is also highlighted but if you hit RET on it it signals an error because it can't find a node named "NODE" (looks like `/usr/bin/info` is case sensitive while Emacs's Info reader is not). IOW, Texinfo's own reader gets confused by its own doc. > I think the only sane way of dealing with this problem is to disable > Info-hide-note-references in that particular node (and any other > nodes, if we find them, where there's a similar issue). The patch > below attempts to do that. Sounds OK. > Juri and Stefan, do you see a cleaner solution? We could try and detect that the cross ref is within a '...'. BTW, I'm not sure whether the current behavior is really a problem: after all, in Emacs, people indeed won't see something of the form `*note NAME: NODE.` but they'll see something of the form `see NAME` or `See NAME`, so the bug could be considered a feature (depending on whether we think the doc describes the content of the Info file or whether it describes when readers will see when reading their doc in Emacs). Stefan