From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: texinfo question about `...' and links - possible enhancement? Date: Fri, 21 Sep 2012 16:41:22 -0700 Message-ID: <0C2C1B835B864463ABFE841BA6094D7F@us.oracle.com> References: <7BF53B4A92694CC8B66F782A64AE5205@us.oracle.com><83y5k4xvwt.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0040_01CD9817.EFCC5D30" X-Trace: ger.gmane.org 1348270897 4136 80.91.229.3 (21 Sep 2012 23:41:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Sep 2012 23:41:37 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Eli Zaretskii'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 22 01:41:42 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TFCqr-0007Gd-Vf for ged-emacs-devel@m.gmane.org; Sat, 22 Sep 2012 01:41:42 +0200 Original-Received: from localhost ([::1]:51507 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFCqn-000380-3B for ged-emacs-devel@m.gmane.org; Fri, 21 Sep 2012 19:41:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFCqk-00037v-9F for emacs-devel@gnu.org; Fri, 21 Sep 2012 19:41:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFCqj-00067w-3S for emacs-devel@gnu.org; Fri, 21 Sep 2012 19:41:34 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:47657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFCqh-00066r-8F; Fri, 21 Sep 2012 19:41:31 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q8LNfSWc003247 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 21 Sep 2012 23:41:29 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q8LNfSx5023017 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Sep 2012 23:41:28 GMT Original-Received: from abhmt104.oracle.com (abhmt104.oracle.com [141.146.116.56]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q8LNfSdg020960; Fri, 21 Sep 2012 18:41:28 -0500 Original-Received: from dradamslap1 (/10.159.185.172) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 21 Sep 2012 16:41:27 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac2XcWJOPx8WzZ0+QUqqpUbb4mwb6gABCJlgADWW8iA= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 148.87.113.117 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153449 Archived-At: This is a multi-part message in MIME format. ------=_NextPart_000_0040_01CD9817.EFCC5D30 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit > > > Another possibility might be to provide such linking > > > automatically, based on the presence of such a term in > > > the index. In that case, whenever foo is indexed, a > > > mention of `foo' in the manual would link to the same > > > target location as the foo index entry does. If automatic, > > > there should probably be a way to override that > > > (turn it off for one or for all occurrences). > > > > This should be possible in Emacs, assuming it could be fast enough > > (indices could be quite long). > > Juri will come up with a patch within the hour! ;-) Actually, I did that locally today, to see what it might be like. I didn't try any special optimizations, and I didn't try to remove any existing cross refs that might thus become redundant. I tried a couple of alternative approaches: 1. Doing it automatically whenever you visit a node (based on a Boolean user option). 2. Doing it only on demand (a key) for the current node. It is helpful to have the links (including distinguishing which ones have already been visited), IMO. However, it is very slow, as might be expected. Hence the turn from approach #1 to #2. But it is still too slow to be useful, IMO. For #2 I didn't bother to follow up with any attempt to keep or reinstate such links once they have been added to a given node, i.e., when you revisit it later. So unless someone has a good idea about optimizing this, I withdraw the suggestion. The effect is helpful, but it is just too slow today. Instead, two other things can still be helpful in this regard, IMO. 1. A simple patch to provide the symbol at point as the default for `i'. This should have been done long ago, IMO. It makes little sense to offer no default. 2. Highlighting for `...' (and "..."), so you can more easily recognize such terms. The (trivial) patch (#1) is attached. I mention #2 because it is a helpful complement to #1. --- FWIW - #2 makes Elisp symbols etc. stand out, which is one of the benefits of the above links. Without highlighting, they just disappear into the noise, IMO, in spite of the fact that we set them off with `...'. I would not use Info without #2, personally. I am only mentioning it, not proposing it - I've done that more than once in the past. For those who might be interested, this is what it looks like: http://www.emacswiki.org/cgi-bin/wiki/InfoPlus. ------=_NextPart_000_0040_01CD9817.EFCC5D30 Content-Type: application/octet-stream; name="info-2012-09-21.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="info-2012-09-21.patch" diff -cw info.el info-patched-2012-09-21.el=0A= *** info.el Fri Sep 21 15:41:54 2012=0A= --- info-patched-2012-09-21.el Fri Sep 21 15:47:12 2012=0A= ***************=0A= *** 3168,3186 ****=0A= If there are no exact matches to the specified topic, this chooses=0A= the first match which is a case-insensitive substring of a topic.=0A= Use the \\\\[Info-index-next] command to see the other = matches.=0A= ! Give an empty topic name to go to the Index node itself."=0A= (interactive=0A= (list=0A= (let ((completion-ignore-case t)=0A= (Info-complete-menu-buffer (clone-buffer))=0A= (Info-complete-nodes (Info-index-nodes))=0A= ! (Info-history-list nil))=0A= (if (equal Info-current-file "dir")=0A= (error "The Info directory node has no index; use m to select a = manual"))=0A= (unwind-protect=0A= (with-current-buffer Info-complete-menu-buffer=0A= (Info-goto-index)=0A= ! (completing-read "Index topic: " 'Info-complete-menu-item))=0A= (kill-buffer Info-complete-menu-buffer)))))=0A= (if (equal Info-current-file "dir")=0A= (error "The Info directory node has no index; use m to select a = manual"))=0A= --- 3168,3189 ----=0A= If there are no exact matches to the specified topic, this chooses=0A= the first match which is a case-insensitive substring of a topic.=0A= Use the \\\\[Info-index-next] command to see the other = matches.=0A= ! Give an empty topic name to go to the Index node itself.=0A= ! The default topic (`M-n') is the name of the symbol at point."=0A= (interactive=0A= (list=0A= (let ((completion-ignore-case t)=0A= (Info-complete-menu-buffer (clone-buffer))=0A= (Info-complete-nodes (Info-index-nodes))=0A= ! (Info-history-list nil)=0A= ! (default-topic (thing-at-point 'symbol)))=0A= (if (equal Info-current-file "dir")=0A= (error "The Info directory node has no index; use m to select a = manual"))=0A= (unwind-protect=0A= (with-current-buffer Info-complete-menu-buffer=0A= (Info-goto-index)=0A= ! (completing-read "Index topic: " 'Info-complete-menu-item=0A= ! nil nil nil nil default-topic))=0A= (kill-buffer Info-complete-menu-buffer)))))=0A= (if (equal Info-current-file "dir")=0A= (error "The Info directory node has no index; use m to select a = manual"))=0A= =0A= Diff finished. Fri Sep 21 15:48:34 2012=0A= ------=_NextPart_000_0040_01CD9817.EFCC5D30--