From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Gavin Smith Newsgroups: gmane.comp.tex.texinfo.bugs,gmane.emacs.bugs Subject: Support double colons in Info index entries Date: Wed, 9 Jan 2019 21:14:33 +0000 Message-ID: <20190109211433.GB1481@darkstar> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1547068264 16508 195.159.176.226 (9 Jan 2019 21:11:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 9 Jan 2019 21:11:04 +0000 (UTC) User-Agent: Mutt/1.5.23 (2014-03-12) Cc: bug-texinfo@gnu.org To: bug-gnu-emacs@gnu.org Original-X-From: bug-texinfo-bounces+gnu-bug-texinfo2=m.gmane.org@gnu.org Wed Jan 09 22:11:00 2019 Return-path: Envelope-to: gnu-bug-texinfo2@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghL7s-0004AM-2I for gnu-bug-texinfo2@m.gmane.org; Wed, 09 Jan 2019 22:11:00 +0100 Original-Received: from localhost ([127.0.0.1]:51855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghL9y-0007lH-Pt for gnu-bug-texinfo2@m.gmane.org; Wed, 09 Jan 2019 16:13:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghL9v-0007lB-BC for bug-texinfo@gnu.org; Wed, 09 Jan 2019 16:13:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghL9t-0002Qy-RN for bug-texinfo@gnu.org; Wed, 09 Jan 2019 16:13:07 -0500 Original-Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:46726) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ghL9p-0001zU-F1; Wed, 09 Jan 2019 16:13:01 -0500 Original-Received: by mail-wr1-x42a.google.com with SMTP id l9so9082763wrt.13; Wed, 09 Jan 2019 13:13:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:mail-followup-to:mime-version :content-disposition:user-agent; bh=c41oNolTC3qt5ZDhmjamRLK+5qB137a/UjATuUXe7wk=; b=gDEzirpfOdtjMh+Y/7VPPMFdBffQgwhWjzJNqmQxKlBIf4tDTDG1HeHem4aA8lkNCI LNwW5p8cPVzNX4Ebohe1yhbGG6ujIy6QrVtIVHqAa2EWOmgfJEpzol2ovBvN+Bwjud4n bUWiYY8vXyDtx4UzPSaoHAytrZwSS/IMKc0MaHIzxvA9JEuR8u/ieehrXuhkNAbPmYSW ZvEpgJv8wJRTO/07u8X53XDdQKJyQlCtfN4NOYTAv4oVXIgvt5Qqe5uFLRofTYg4+oTP eYvWcimeiWQq6opf1iGqimNr1xd/LboirUeseS5Y6QFBtDCnr8kE+bZDo6iyl1GrejVg 9bAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id :mail-followup-to:mime-version:content-disposition:user-agent; bh=c41oNolTC3qt5ZDhmjamRLK+5qB137a/UjATuUXe7wk=; b=CH6kpxiEW2noIHAWf7gbS4UP/vIUF9pA6xpnyFQVSC7v/coz0H6MmNAGebZqfvw5th +5i7yV0wakKeYws9b9nhU0wm/jI9YZQJtB2ywOJOjahxM2/NTc+1qySs4P2FxrxO5Kzu NfQbiMSfnu9f99T44OTv2GRvvdzzd9eJXGrfAdWfBc0IlM09H1IKvr9D5+/In8xeHrak 72a51mii2+HC+H72XCveE8Sij4Oky+dXIEM7UqIyefGbBVjDbAoE1+FKNp0qRstjVMAP zzmt+u4oFYNkQmhlXbFbQRSqTC4bWVZNE0zF6zShkFGwQo20qPNJd/uTb+bmViv4if0O /rUQ== X-Gm-Message-State: AJcUukeDZFas17dYJ6zRQC63hWj/EufcarLp5ZQf1BZCSGNiZxN5UoMd K9fJ//XU8bRiW2MhdP339enIBrDj X-Google-Smtp-Source: ALg8bN492/N69TwGv9mnj/aV90he1YrBqOuNntOLqQvHdsTcSdZ6wd9jLKhhYjueN3Wg4g18E4iZvA== X-Received: by 2002:adf:8122:: with SMTP id 31mr6680493wrm.48.1547068378763; Wed, 09 Jan 2019 13:12:58 -0800 (PST) Original-Received: from darkstar.example.net (55.37.198.146.dyn.plus.net. [146.198.37.55]) by smtp.gmail.com with ESMTPSA id b12sm5799108wmj.3.2019.01.09.13.12.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 13:12:57 -0800 (PST) X-Google-Original-From: Gavin Smith Original-Received: from darkstar.example.net (localhost [127.0.0.1]) by darkstar.example.net (8.14.9/8.14.9) with ESMTP id x09LEXnX007496; Wed, 9 Jan 2019 21:14:34 GMT Original-Received: (from g@localhost) by darkstar.example.net (8.14.9/8.14.9/Submit) id x09LEXaK007495; Wed, 9 Jan 2019 21:14:33 GMT Mail-Followup-To: Gavin Smith , bug-gnu-emacs@gnu.org, bug-texinfo@gnu.org Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42a X-BeenThere: bug-texinfo@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU Texinfo documentation system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-texinfo-bounces+gnu-bug-texinfo2=m.gmane.org@gnu.org Original-Sender: "bug-texinfo" Xref: news.gmane.org gmane.comp.tex.texinfo.bugs:9543 gmane.emacs.bugs:154296 Archived-At: Emacs version checked: 26.1. In the Info format colons are special, and for this reason, there is limited support for colons in index entries. The Emacs Info mode supports single colons in index entries as long as they are not followed by a space. There is this comment at the start of info.el: ;; Note that nowadays we expect Info files to be made using makeinfo. ;; In particular we make these assumptions: ;; - a menu item MAY contain colons but not colon-space ": " ;; - a menu item ending with ": " (but not ":: ") is an index entry ;; - a node name MAY NOT contain a colon ;; This distinction is to support indexing of computer programming ;; language terms that may contain ":" but not ": ". It doesn't state it, but when I tested it double colons don't work even if they are not followed by a space. There is a fairly simple solution to this problem that I haven't seen suggested in all the messages posted on this topic in the mailing list archives. In index nodes only (which have a special marker included, ^@^H[index^@^H]), use a colon to terminate the text of the index entry, but instead of looking for the first colon in the line, look for the last. So this entry: * a::b: a colon b. (line 129) would refer to line 129 of the node "a colon b". This is possible because node names cannot contain colons. This restriction is not too important, whereas the inability to index items containing colons is quite important. This is what is implemented in the standalone info browser (since change on 2017-04-08). This change shouldn't be made for all nodes, because the comment after the closing '.' could contain a colon: * label: node. comment: with a colon. This shouldn't be interpreted as refering to a node "with a colon". However, the "(line ...)" comment can't contain a colon. I'm not familiar with Emacs Lisp enough to propose a patch to implement this change myself. The standalone info program also implemented a quoting mechanism (surrounding the text with a pair of 0x7F bytes) to allow nearly all characters to be included in node names and index entries. This has never been implemented in Emacs Info and has never been used by default in texi2any's output. I think my suggestion above would be sufficient and would work with existing Info files and versions of texi2any/makeinfo without anything breaking. The quoting mechanism could potentially be removed from texi2any and info as nobody has ever used it and it makes things more complicated for no reason.