From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#16333: 24.3.50; Info manuals: link defined terms to their glossary entries Date: Wed, 28 Oct 2020 23:52:32 -0700 (PDT) Message-ID: References: <87pnfk1ozm.fsf@marxist.se> <44a24b90-adf8-41f1-8d06-b35f55f1850c@default> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36567"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 16333@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 29 07:56:44 2020 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 1kY1rY-0009Nl-8K for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Oct 2020 07:56:44 +0100 Original-Received: from localhost ([::1]:51432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kY1rX-0004fJ-6X for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Oct 2020 02:56:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kY1pu-00044Z-7D for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 02:55:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40035) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kY1pt-00075z-TR for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 02:55:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kY1pt-0002ZX-RY for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 02:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Oct 2020 06:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16333 X-GNU-PR-Package: emacs Original-Received: via spool by 16333-submit@debbugs.gnu.org id=B16333.16039544849861 (code B ref 16333); Thu, 29 Oct 2020 06:55:01 +0000 Original-Received: (at 16333) by debbugs.gnu.org; 29 Oct 2020 06:54:44 +0000 Original-Received: from localhost ([127.0.0.1]:51581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kY1pb-0002Yy-Ok for submit@debbugs.gnu.org; Thu, 29 Oct 2020 02:54:44 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:45776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kY1pZ-0002Ym-S8 for 16333@debbugs.gnu.org; Thu, 29 Oct 2020 02:54:42 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09T6iaua037286; Thu, 29 Oct 2020 06:54:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=K5e0YSIhcbS4U/WxEyQkbKCoQEdPVqq9epyRGtY/F/I=; b=QFz3Daa9gf1BVGyuJ3+M3uNhvBu4UgIHR3a7/7mKUXqjrWTtSBFZUCBfAp9+co/aYzAR K1weFQPGvZ1PeClcMwlirz/aOg1MWFPupw5b5PKgldth3/Fe3E5yjdBbbwWQcslvWHvN U6uzH1poXw0FYxJzLDLj7qw0GokpR4NqzF2VLaB2DVTpPk5MhzxdhW5nDXGtXUtiwVv/ pDkqb+Tdwft+qiaH8UKwv2GscZf6kwHkwYilGddmEZrcsK2hG/9Zdvzx4vG2D0vUqz/S FLJBdpu6dFZtuVvzGRagf8GDr8n1JEFCEiNfHVf+sFsmRmZOkL4o1CTXl8yLZrG8+JGQ bw== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 34dgm48ptv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 29 Oct 2020 06:54:35 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09T6kMc0178512; Thu, 29 Oct 2020 06:52:35 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 34cx1svfaq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Oct 2020 06:52:35 +0000 Original-Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 09T6qXL2009369; Thu, 29 Oct 2020 06:52:33 GMT In-Reply-To: <44a24b90-adf8-41f1-8d06-b35f55f1850c@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5056.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9788 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 bulkscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010290047 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9788 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 impostorscore=0 adultscore=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999 suspectscore=0 clxscore=1011 mlxscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010290047 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" Xref: news.gmane.io gmane.emacs.bugs:191938 Archived-At: > > Let's hope there is someone interested enough to take a > > stab at this. (Perhaps Drew would like to volunteer?) >=20 > No, but I too hope someone will do so at some point. Actually, I've done this now. I added it to info+.el. (It could of course be added to vanilla Emacs also.) >From the Info+ Commentary: Glossary words, that is, words that are defined in a manual's `Glossary' node, are highlighted and linked to their glossary entries, if option `Info-fontify-glossary-words' is non-nil. By default, a mouseover on such a link shows a tooltip with the word's definition from the glossary. (Currently only the Emacs and Semantic manuals have `Glossary' nodes, as far as I=20 know.) Only the first occurrence of a given glossary word in a given node is handled this way; other occurrences are ignored. Occurrences of glossary words within Info links (e.g. menu items, xrefs) are not treated (they're skipped); there's no treatment of glossary words in an Index (there could be; that was a choice); and occurrences within a Glossary itself are treated only when not in the definition of the same word. You can toggle this highlighting (and linking) with command `Info-toggle-fontify-glossary-words'. Only glossary terms that are single words are handled by this highlighting/linking/tooltip behavior. But there's also a command, `Info-glossary', that prompts for a glossary term with completion, and all glossary terms are handled (i.e., not just single-word terms). https://www.emacswiki.org/emacs/download/info%2b.el ___ BTW, I did have a question, which I finally found the answer to (I guess), by experimenting. I think the Elisp manual needs some info added. The tooltip help I was using had (1) the glossary word's definition, followed (after a blank line) by "mouse-2: go to Glossary entry for this word". I couldn't figure out why that "mouse-2" text wouldn't magically change to "mouse-1" with non-nil variable `mouse-1-click-follows-link'. Couldn't get it to work. Finally, on a whim, I switched the order, so the text started with "mouse-2"... instead of starting with the glossary definition. Bingo! This magic seems to be undocumented. Everything about `mouse-1' following links is well documented except this help-echo magic. I hope someone will add this secret to the Elisp manual somewhere: If you've got things set up so that `mouse-1' will follow links (e.g., you use `follow-link' etc.) and if your `help-echo' text starts with the text "mouse-2", then the resulting help echo will actually start with "mouse-1", in place of "mouse-2". That seems to be the (undocumented) behavior. It turns out that the text need not exactly start with "mouse-2". Because I want the definition to be the main point of the tooltip, I now put the mouse action description (which apparently has to come first) in parens: "(mouse-2...)" - and it still works. So maybe the magic that transforms "mouse-2" to "mouse-1" works only if "mouse-2" is within N chars of the start. Or maybe it will skip over punctuation (e.g. "(") but not over letters. Or maybe it didn't work in the other order because I have a blank line between the two. I didn't play with it enough to figure out the behavior completely. Dunno where that text transformation is implemented (in C?) - I didn't find it in the Lisp. And I just happened to guess an answer, based on seeing the same text used over and over in source code. Would someone please consider telling users about this secret sauce in the Elisp manual? Thx. ___ Another nice-to-have would be beefing up the Glossary in the Emacs manual. I'm guessing it hasn't been updated in a while, and features have been added that are not reflected there. I was also surprised to see that most manuals have no glossary. The only manuals I found that have glossaries are Emacs and Semantic. Aren't there lisp things that deserve glossary entries? Org things? (No, I'm not volunteering.)