From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#24842: 24.5; `help-make-xrefs': False link-type determinations Date: Mon, 31 Oct 2016 16:00:14 -0700 (PDT) Message-ID: <919e40a4-f6c4-492d-b50f-b0671e13cb60@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1477954887 26544 195.159.176.226 (31 Oct 2016 23:01:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 31 Oct 2016 23:01:27 +0000 (UTC) To: 24842@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 01 00:01:22 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1LZn-0004pQ-AI for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Nov 2016 00:01:11 +0100 Original-Received: from localhost ([::1]:38980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1LZp-0001Ox-OR for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Oct 2016 19:01:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1LZh-0001On-3K for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2016 19:01:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1LZe-00060S-2N for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2016 19:01:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51213) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c1LZd-00060L-VU for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2016 19:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c1LZd-0003xW-Oo for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2016 19:01: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: Mon, 31 Oct 2016 23:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24842 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.147795483115161 (code B ref -1); Mon, 31 Oct 2016 23:01:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Oct 2016 23:00:31 +0000 Original-Received: from localhost ([127.0.0.1]:38379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1LZ8-0003wT-WC for submit@debbugs.gnu.org; Mon, 31 Oct 2016 19:00:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42444) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1LZ7-0003wG-CC for submit@debbugs.gnu.org; Mon, 31 Oct 2016 19:00:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1LZ0-0005hX-Tg for submit@debbugs.gnu.org; Mon, 31 Oct 2016 19:00:24 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:33697) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1LZ0-0005hF-QI for submit@debbugs.gnu.org; Mon, 31 Oct 2016 19:00:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1LYz-0001N3-EN for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2016 19:00:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1LYw-0005f4-Cf for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2016 19:00:21 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:29692) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1LYw-0005cl-4D for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2016 19:00:18 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u9VN0G3J007314 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 31 Oct 2016 23:00:16 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.13.8) with ESMTP id u9VN0Fkd030478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 31 Oct 2016 23:00:16 GMT Original-Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id u9VN0Fp9032633 for ; Mon, 31 Oct 2016 23:00:15 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125190 Archived-At: `help-make-xrefs' tries to guess the type of a symbol that is enclosed in `...', in help. This determination needs to to be improved, or else programmers need some way to inhibit it when it turns out to be inappropriate. Example: This is part of a doc string I have: `isearchp-movement-unit-alist'\t- units and their movement functions `isearchp-on-demand-action-function'\t- on-demand action function `isearchp-prompt-for-filter-name'\t- when to ask for filter name Those symbols are all variables (in fact, user options), not functions. but the word "function" at the end of the second line causes the quoted symbol that follows it to be considered as a function name. And then, because it is not `fboundp', it gets no link. It should instead get a variable-name link to its definition. 1. One possible approach is to improve the behavior. I have not tested this generally, but changing the `cond' clauses to include the test for type and for documentation as part of the `cond' test, instead of being part of the result clause after the test, fixes at least the immediate problem of the above example. For example, instead of: ((match-string 4) ; `function' &c (and (fboundp sym) ; similarly (help-xref-button 8 'help-function sym))) use this: ((and (match-string 4) ; `function' &c (fboundp sym)) ; similarly (help-xref-button 8 'help-function sym)) Similarly for the other clauses. Possibly this does not DTRT generally, since it lets subsequent `cond' clauses get tested if the code cannot determine that the symbol is a variable, function, etc. But that's the point of those clauses. If they cannot find that some symbol is a variable, etc., then shouldn't the subsequent clauses be tried? (The tests might need to be improved. Dunno.) Again, I have not tested this, so I don't propose an exact code fix. I'm reporting the bug. 2. An alternative, if you don't find that #1 is reasonable, could be to explicitly provide for (and document) some way for a programmer to "escape" a given quoted symbol from a "determiner" such as "function" that immediately precedes it. The regexp used now looks for whitespace after the "determiner": any combination of space, tab, and newline chars. I can insert a NULL char, x00, after "function", and that "fixes" things, but that char then appears in the output, as "^@". Another Unicode whitespace char could be used instead, etc. But that still means another character that gets rendered, increasing the line length, etc. If #2 is chosen, the solution should hopefully be more robust and cleaner that such a hack. I hope you will consider fixing this in some way. In GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/usr --host=3Di686-pc-mingw32'