From unknown Mon Aug 18 17:54:57 2025 X-Loop: don@donarmstrong.com Subject: bug#669: 23.0.60; defalias is not taken into account by C-h k Reply-To: "Drew Adams" , 669@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 07 Aug 2008 18:30:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 669 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12181334566336 (code B ref -1); Thu, 07 Aug 2008 18:30:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,BAYES_00,FOURLA, FRT_SYMBOL,RCVD_IN_DNSWL_MED,TVD_FUZZY_SYMBOL,UNPARSEABLE_RELAY autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 7 Aug 2008 18:24:16 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m77IODrx006330 for ; Thu, 7 Aug 2008 11:24:14 -0700 Received: from mx10.gnu.org ([199.232.76.166]:52870) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KRA8i-0001ko-Uq for emacs-pretest-bug@gnu.org; Thu, 07 Aug 2008 14:23:09 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KRA9g-0001W0-8a for emacs-pretest-bug@gnu.org; Thu, 07 Aug 2008 14:24:12 -0400 Received: from rgminet01.oracle.com ([148.87.113.118]:36084) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KRA9f-0001Hj-GD for emacs-pretest-bug@gnu.org; Thu, 07 Aug 2008 14:24:08 -0400 Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m77INBtf002790 for ; Thu, 7 Aug 2008 12:23:11 -0600 Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m77CcmCQ025729 for ; Thu, 7 Aug 2008 12:23:10 -0600 Received: from inet-141-146-46-1.oracle.com by acsmt356.oracle.com with ESMTP id 11302449111218133382; Thu, 07 Aug 2008 11:23:02 -0700 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 07 Aug 2008 11:23:02 -0700 From: "Drew Adams" To: Date: Thu, 7 Aug 2008 11:23:05 -0700 Message-ID: <002201c8f8ba$a2eebea0$c2b22382@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acj4uqKgNgrAV73kQWKgxRspvmro3Q== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 emacs -Q (defun foo (&optional predicate) "" (interactive) (message "FOO")) (defalias 'lisp-complete-symbol (symbol-function 'foo)) C-h k then shows this, which is 100% wrong: M-TAB (translated from ) runs the command lisp-complete-symbol, which is an interactive Lisp function in `lisp.el'. It is bound to M-TAB. (lisp-complete-symbol &optional predicate) In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-08-01 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU value of $XMODIFIERS: nil locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x C-f t h r o w - r r r r . e l ( d e f u n SPC f o o SPC ( C-h f l i s p - l i s p - c o m p l e t e - s y m b o l From unknown Mon Aug 18 17:54:57 2025 X-Loop: don@donarmstrong.com Subject: bug#669: 23.0.60; defalias is not taken into account by C-h k Reply-To: "Drew Adams" , 669@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 07 Aug 2008 21:00:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 669 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.121814248319817 (code B ref -1); Thu, 07 Aug 2008 21:00:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.0 required=4.0 tests=AWL,BAYES_00,FOURLA, FRT_SYMBOL,HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED,TVD_FUZZY_SYMBOL, UNPARSEABLE_RELAY autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 7 Aug 2008 20:54:43 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m77KsdvS019811 for ; Thu, 7 Aug 2008 13:54:41 -0700 Received: from mail.gnu.org ([199.232.76.166]:40334 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KRCUJ-0000WK-Dt for emacs-pretest-bug@gnu.org; Thu, 07 Aug 2008 16:53:35 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KRCVH-0007yJ-AV for emacs-pretest-bug@gnu.org; Thu, 07 Aug 2008 16:54:38 -0400 Received: from rgminet01.oracle.com ([148.87.113.118]:46192) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KRCVF-0007wk-OT for emacs-pretest-bug@gnu.org; Thu, 07 Aug 2008 16:54:35 -0400 Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m77KsCrD017745; Thu, 7 Aug 2008 14:54:13 -0600 Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m77EOBGf000546; Thu, 7 Aug 2008 14:54:11 -0600 Received: from inet-141-146-46-1.oracle.com by acsmt358.oracle.com with ESMTP id 11305311371218142441; Thu, 07 Aug 2008 15:54:01 -0500 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 07 Aug 2008 13:54:01 -0700 From: "Drew Adams" To: <669@debbugs.gnu.org>, References: <002201c8f8ba$a2eebea0$c2b22382@us.oracle.com> Date: Thu, 7 Aug 2008 13:54:05 -0700 Message-ID: <003201c8f8cf$bafb9df0$c2b22382@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <002201c8f8ba$a2eebea0$c2b22382@us.oracle.com> Thread-Index: Acj4uqKgNgrAV73kQWKgxRspvmro3QAFFltA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-CrossAssassin-Score: 2 If you use (defalias 'lisp-complete-symbol 'foo) instead, then this is output: M-TAB (translated from ) runs the command lisp-complete-symbol, which is an alias for `foo' in `lisp.el'. It is bound to M-TAB. (lisp-complete-symbol &optional predicate) This is still wrong, because `foo' is not in `lisp.el' (and the defalias is not in `lisp.el'). This bug appears as far back as Emacs 20.7. > From: Drew Adams Sent: Thursday, August 07, 2008 11:23 AM > emacs -Q > > (defun foo (&optional predicate) > "" (interactive) (message "FOO")) > > (defalias 'lisp-complete-symbol (symbol-function 'foo)) > > C-h k then shows this, which is 100% wrong: > > M-TAB (translated from ) runs the command > lisp-complete-symbol, which is an interactive Lisp function in > `lisp.el'. > > It is bound to M-TAB. > > (lisp-complete-symbol &optional predicate) > > > > In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) > of 2008-08-01 on LENNART-69DE564 > Windowing system distributor `Microsoft Corp.', version 5.1.2600 > configured using `configure --with-gcc (3.4) --no-opt > --cflags -Ic:/g/include > -fno-crossjumping' > > Important settings: > value of $LC_ALL: nil > value of $LC_COLLATE: nil > value of $LC_CTYPE: nil > value of $LC_MESSAGES: nil > value of $LC_MONETARY: nil > value of $LC_NUMERIC: nil > value of $LC_TIME: nil > value of $LANG: ENU > value of $XMODIFIERS: nil > locale-coding-system: cp1252 > default-enable-multibyte-characters: t > > Major mode: Emacs-Lisp > > Minor modes in effect: > tooltip-mode: t > tool-bar-mode: t > mouse-wheel-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > global-auto-composition-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > line-number-mode: t > transient-mark-mode: t > > Recent input: > C-x C-f t h r o w - r r r r . e l > ( d e f u n SPC f o o SPC > ( > > C-h f l i s p - > > l i s p - c o m p l e t e - > s y m b o l > > > > > > > From unknown Mon Aug 18 17:54:57 2025 X-Loop: don@donarmstrong.com Subject: bug#669: 23.0.60; defalias is not taken into account by C-h k Reply-To: martin rudalics , 669@debbugs.gnu.org Resent-From: martin rudalics Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 13 Aug 2008 17:15:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 669 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 669-submit@emacsbugs.donarmstrong.com id=B669.121864729514115 (code B ref 669); Wed, 13 Aug 2008 17:15:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 669) by emacsbugs.donarmstrong.com; 13 Aug 2008 17:08:15 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m7DH8Bd8014034 for <669@emacsbugs.donarmstrong.com>; Wed, 13 Aug 2008 10:08:12 -0700 Received: (qmail invoked by alias); 13 Aug 2008 17:08:05 -0000 Received: from 62-47-38-123.adsl.highway.telekom.at (EHLO [62.47.38.123]) [62.47.38.123] by mail.gmx.net (mp013) with SMTP; 13 Aug 2008 19:08:05 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19WlQkFGOVWgS4KOhbKqewMk+hTgPap3uN7siyYIj 7Z8bkVyDPFr4FQ Message-ID: <48A31466.9080401@gmx.at> Date: Wed, 13 Aug 2008 19:05:42 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Drew Adams CC: 669@debbugs.gnu.org References: <002201c8f8ba$a2eebea0$c2b22382@us.oracle.com> <003201c8f8cf$bafb9df0$c2b22382@us.oracle.com> In-Reply-To: <003201c8f8cf$bafb9df0$c2b22382@us.oracle.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.6 > If you use (defalias 'lisp-complete-symbol 'foo) instead, then this is output: > > M-TAB (translated from ) runs the command > lisp-complete-symbol, which is an alias for `foo' in `lisp.el'. > > It is bound to M-TAB. > > (lisp-complete-symbol &optional predicate) > > This is still wrong, because `foo' is not in `lisp.el' (and the defalias is not > in `lisp.el'). > > This bug appears as far back as Emacs 20.7. > > >> From: Drew Adams Sent: Thursday, August 07, 2008 11:23 AM >> emacs -Q >> >> (defun foo (&optional predicate) >> "" (interactive) (message "FOO")) >> >> (defalias 'lisp-complete-symbol (symbol-function 'foo)) >> >> C-h k then shows this, which is 100% wrong: >> >> M-TAB (translated from ) runs the command >> lisp-complete-symbol, which is an interactive Lisp function in >> `lisp.el'. >> >> It is bound to M-TAB. >> >> (lisp-complete-symbol &optional predicate) I'm currently rewriting help-fns.el and can produce M-TAB (translated from ) runs the command lisp-complete-symbol, which is an interactive Lisp function. It is bound to M-TAB, , H-SPC. (lisp-complete-symbol &optional predicate) and M-TAB (translated from ) runs the command lisp-complete-symbol, which is an alias for `foo'. It is bound to M-TAB, , H-SPC. (lisp-complete-symbol &optional predicate) Are these acceptable? martin From unknown Mon Aug 18 17:54:57 2025 X-Loop: don@donarmstrong.com Subject: bug#669: 23.0.60; defalias is not taken into account by C-h k Reply-To: "Drew Adams" , 669@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 13 Aug 2008 17:35:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 669 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 669-submit@emacsbugs.donarmstrong.com id=B669.121864856220170 (code B ref 669); Wed, 13 Aug 2008 17:35:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 669) by emacsbugs.donarmstrong.com; 13 Aug 2008 17:29:22 +0000 Received: from rgminet01.oracle.com (rgminet01.oracle.com [148.87.113.118]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7DHTIAI020164 for <669@emacsbugs.donarmstrong.com>; Wed, 13 Aug 2008 10:29:19 -0700 Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m7DHTBhx016542; Wed, 13 Aug 2008 11:29:11 -0600 Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m7DFMh7Y022804; Wed, 13 Aug 2008 11:29:10 -0600 Received: from inet-141-146-46-1.oracle.com by acsmt356.oracle.com with ESMTP id 11462082711218648443; Wed, 13 Aug 2008 10:27:23 -0700 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 13 Aug 2008 10:27:23 -0700 From: "Drew Adams" To: "'martin rudalics'" Cc: <669@debbugs.gnu.org> References: <002201c8f8ba$a2eebea0$c2b22382@us.oracle.com> <003201c8f8cf$bafb9df0$c2b22382@us.oracle.com> <48A31466.9080401@gmx.at> Date: Wed, 13 Aug 2008 10:27:24 -0700 Message-ID: <001d01c8fd69$da11c450$c2b22382@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <48A31466.9080401@gmx.at> Thread-Index: Acj9Zy7gxAPrSi/zS8O4lfEsBiDUzQAAW0Tw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE > > If you use (defalias 'lisp-complete-symbol 'foo) instead, > > then this is output: > > > > M-TAB (translated from ) runs the command > > lisp-complete-symbol, which is an alias for `foo' in `lisp.el'. > > > > It is bound to M-TAB. > > > > (lisp-complete-symbol &optional predicate) > > > > This is still wrong, because `foo' is not in `lisp.el' > > (and the defalias is not in `lisp.el'). > > > > This bug appears as far back as Emacs 20.7. > > > > > >> From: Drew Adams Sent: Thursday, August 07, 2008 11:23 AM > >> emacs -Q > >> > >> (defun foo (&optional predicate) > >> "" (interactive) (message "FOO")) > >> > >> (defalias 'lisp-complete-symbol (symbol-function 'foo)) > >> > >> C-h k then shows this, which is 100% wrong: > >> > >> M-TAB (translated from ) runs the command > >> lisp-complete-symbol, which is an interactive Lisp function in > >> `lisp.el'. > >> > >> It is bound to M-TAB. > >> > >> (lisp-complete-symbol &optional predicate) > > I'm currently rewriting help-fns.el and can produce > > M-TAB (translated from ) runs the command > lisp-complete-symbol, which is an interactive Lisp function. > > It is bound to M-TAB, > , H-SPC. > > (lisp-complete-symbol &optional predicate) > > and > > M-TAB (translated from ) runs the command > lisp-complete-symbol, which is an alias for `foo'. > > It is bound to M-TAB, > , H-SPC. > > (lisp-complete-symbol &optional predicate) > > Are these acceptable? Hi Martin, Thanks for working on this. Not completely fixed yet, because it doesn't say anything about where `foo' is defined (assuming it is defined in a file somewhere). If you could add that, that would be great. The point is that we do want to send the user to the source code, but not to the original `lisp-complete-symbol' source code. We also need to be sure that the `foo' doc string is used. In my test example I omitted that. And both of these cases need to be treated: (defalias 'lisp-complete-symbol 'foo) (defalias 'lisp-complete-symbol (symbol-function 'foo)) Thx - Drew From unknown Mon Aug 18 17:54:57 2025 X-Loop: don@donarmstrong.com Subject: bug#669: 23.0.60; defalias is not taken into account by C-h k Reply-To: martin rudalics , 669@debbugs.gnu.org Resent-From: martin rudalics Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 13 Aug 2008 21:25:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 669 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 669-submit@emacsbugs.donarmstrong.com id=B669.121866236826805 (code B ref 669); Wed, 13 Aug 2008 21:25:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.4 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 669) by emacsbugs.donarmstrong.com; 13 Aug 2008 21:19:28 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m7DLJNEu026798 for <669@emacsbugs.donarmstrong.com>; Wed, 13 Aug 2008 14:19:25 -0700 Received: (qmail invoked by alias); 13 Aug 2008 21:19:17 -0000 Received: from 62-47-61-125.adsl.highway.telekom.at (EHLO [62.47.61.125]) [62.47.61.125] by mail.gmx.net (mp031) with SMTP; 13 Aug 2008 23:19:17 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18dnK45eAUdbFkmu+dnsFvOrPCuC7obUk/YTi4/w1 wd7uZJaIRLfagP Message-ID: <48A34F54.9090302@gmx.at> Date: Wed, 13 Aug 2008 23:17:08 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Drew Adams CC: 669@debbugs.gnu.org References: <002201c8f8ba$a2eebea0$c2b22382@us.oracle.com> <003201c8f8cf$bafb9df0$c2b22382@us.oracle.com> <48A31466.9080401@gmx.at> <001d01c8fd69$da11c450$c2b22382@us.oracle.com> In-Reply-To: <001d01c8fd69$da11c450$c2b22382@us.oracle.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.73 > Not completely fixed yet, because it doesn't say anything about where `foo' is > defined (assuming it is defined in a file somewhere). If it is "defined in a file somewhere" you can jump to `foo' and see where it is defined. IIUC your assumption was that it's been defined and evaluated in a buffer only. > If you could add that, > that would be great. The point is that we do want to send the user to the source > code, but not to the original `lisp-complete-symbol' source code. If it's defined in a file we can send the user to the source code in the (defalias 'lisp-complete-symbol 'foo) case via the `foo' indirection but certainly _not_ in the (defalias 'lisp-complete-symbol (symbol-function 'foo)) because, well, look at the return value of (symbol-function 'foo). > We also need to be sure that the `foo' doc string is used. In my test example I > omitted that. In the indirection case follow the link to `foo' and get its doc-string from there. In the `symbol-function' case you simply have to provide your own doc-string via the third arg of `defalias'. > And both of these cases need to be treated: > > (defalias 'lisp-complete-symbol 'foo) > (defalias 'lisp-complete-symbol (symbol-function 'foo)) I suppose I posted the *Help* output for both cases. martin From unknown Mon Aug 18 17:54:57 2025 X-Loop: don@donarmstrong.com Subject: bug#669: 23.0.60; defalias is not taken into account by C-h k Reply-To: "Drew Adams" , 669@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 13 Aug 2008 21:50:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 669 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 669-submit@emacsbugs.donarmstrong.com id=B669.12186637031641 (code B ref 669); Wed, 13 Aug 2008 21:50:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.5 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 669) by emacsbugs.donarmstrong.com; 13 Aug 2008 21:41:43 +0000 Received: from rgminet01.oracle.com (rgminet01.oracle.com [148.87.113.118]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7DLfeGM001586 for <669@emacsbugs.donarmstrong.com>; Wed, 13 Aug 2008 14:41:41 -0700 Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m7DLfXi8028410; Wed, 13 Aug 2008 15:41:33 -0600 Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m7DEorpH019825; Wed, 13 Aug 2008 15:41:19 -0600 Received: from inet-141-146-46-1.oracle.com by acsmt357.oracle.com with ESMTP id 11466948501218663671; Wed, 13 Aug 2008 16:41:11 -0500 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 13 Aug 2008 14:41:10 -0700 From: "Drew Adams" To: "'martin rudalics'" Cc: <669@debbugs.gnu.org> References: <002201c8f8ba$a2eebea0$c2b22382@us.oracle.com> <003201c8f8cf$bafb9df0$c2b22382@us.oracle.com> <48A31466.9080401@gmx.at> <001d01c8fd69$da11c450$c2b22382@us.oracle.com> <48A34F54.9090302@gmx.at> Date: Wed, 13 Aug 2008 14:41:07 -0700 Message-ID: <004f01c8fd8d$4f880730$c2b22382@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <48A34F54.9090302@gmx.at> Thread-Index: Acj9iosJZGDWjGvpR0+7G+Vo3S2SBQAAE0lQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE > > Not completely fixed yet, because it doesn't say anything > > about where `foo' is > > defined (assuming it is defined in a file somewhere). > > If it is "defined in a file somewhere" you can jump to `foo' and see > where it is defined. IIUC your assumption was that it's been defined > and evaluated in a buffer only. I didn't mean to make any such assumption. The example I sent was ambiguous in this regard, but it did probably suggest a definition outside of a file. If the new definition is in a file that is loaded, then it would be good to treat it the same way we treat such a definition when it has nothing aliased to it: give the function name and the file it is defined in. That is, for (defun foo () "..." 5) we don't just print `foo' and let you click that link to find out where it is defined. We also print "is an interactive compiled Lisp function in `titi.el'". That same format would be preferable for the defalias case also: "`toto' is an alias for `foo' which is an interactive compiled Lisp function in `titi.el'". IOW, the only thing to be added is the fact that `toto' is an alias for `foo'. We still need to know what `foo' is and where it was defined. > > If you could add that, that would be great. The point is that > > we do want to send the user to the source > > code, but not to the original `lisp-complete-symbol' source code. > > If it's defined in a file we can send the user to the source > code in the > > (defalias 'lisp-complete-symbol 'foo) > > case via the `foo' indirection It's the `lisp-complete-symbol' that is the indirection: it is a pointer to `foo'. > but certainly _not_ in the > > (defalias 'lisp-complete-symbol (symbol-function 'foo)) > > because, well, look at the return value of (symbol-function 'foo). I guess this is because `defalias' is a function, not a macro, so we don't have access to the sexp (symbol-function 'foo) and hence to `foo'. OK. > > We also need to be sure that the `foo' doc string is used. > > In my test example I omitted that. > > In the indirection case follow the link to `foo' and get its > doc-string from there. In the `symbol-function' case you > simply have to provide your own doc-string via the third arg of `defalias'. This is presumably the same problem as above. OK. So it sounds like we can build the source file link "in `titi.el'" in the case of 'foo but not in the case of (symbol-function 'foo). That's still pretty good - much more helpful than what we have now (which is wrong and misleading). > > And both of these cases need to be treated: > > > > (defalias 'lisp-complete-symbol 'foo) > > (defalias 'lisp-complete-symbol (symbol-function 'foo)) > > I suppose I posted the *Help* output for both cases. Thx - Drew From unknown Mon Aug 18 17:54:57 2025 X-Loop: don@donarmstrong.com Subject: bug#669: 23.0.60; defalias is not taken into account by C-h k Reply-To: martin rudalics , 669@debbugs.gnu.org Resent-From: martin rudalics Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 14 Aug 2008 06:30:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 669 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 669-submit@emacsbugs.donarmstrong.com id=B669.12186948351217 (code B ref 669); Thu, 14 Aug 2008 06:30:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 669) by emacsbugs.donarmstrong.com; 14 Aug 2008 06:20:35 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m7E6KVkH001188 for <669@emacsbugs.donarmstrong.com>; Wed, 13 Aug 2008 23:20:32 -0700 Received: (qmail invoked by alias); 14 Aug 2008 06:20:25 -0000 Received: from unknown (EHLO [62.47.62.138]) [62.47.62.138] by mail.gmx.net (mp017) with SMTP; 14 Aug 2008 08:20:25 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18eP8lmXGEet7h3RBK+ENdZeevb0jwUM1X9fAnhlr pWmmC4BgadbSAu Message-ID: <48A3CE2C.3070204@gmx.at> Date: Thu, 14 Aug 2008 08:18:20 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Drew Adams CC: 669@debbugs.gnu.org References: <002201c8f8ba$a2eebea0$c2b22382@us.oracle.com> <003201c8f8cf$bafb9df0$c2b22382@us.oracle.com> <48A31466.9080401@gmx.at> <001d01c8fd69$da11c450$c2b22382@us.oracle.com> <48A34F54.9090302@gmx.at> <004f01c8fd8d$4f880730$c2b22382@us.oracle.com> In-Reply-To: <004f01c8fd8d$4f880730$c2b22382@us.oracle.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.73 > That is, for (defun foo () "..." 5) we don't just print `foo' and let you click > that link to find out where it is defined. We also print "is an interactive > compiled Lisp function in `titi.el'". That same format would be preferable for > the defalias case also: "`toto' is an alias for `foo' which is an interactive > compiled Lisp function in `titi.el'". Doing C-h f RET rplaca RET gets me a Help buffer with the line rplaca is an alias for `setcar' in `.../subr.el'. Clicking on - the "setcar" link gets me to the Help buffer for `setcar', - the ".../subr.el" link gets me to the location of the defalias. I suppose we shouldn't change that behavior. martin From unknown Mon Aug 18 17:54:57 2025 X-Loop: don@donarmstrong.com Subject: bug#669: 23.0.60; defalias is not taken into account by C-h k Reply-To: "Drew Adams" , 669@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 14 Aug 2008 15:40:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 669 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 669-submit@emacsbugs.donarmstrong.com id=B669.121872805110646 (code B ref 669); Thu, 14 Aug 2008 15:40:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 669) by emacsbugs.donarmstrong.com; 14 Aug 2008 15:34:11 +0000 Received: from agminet01.oracle.com (agminet01.oracle.com [141.146.126.228]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7EFY8gL010640 for <669@emacsbugs.donarmstrong.com>; Thu, 14 Aug 2008 08:34:09 -0700 Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m7EFXwgQ000934; Thu, 14 Aug 2008 10:33:58 -0500 Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m7E6ZIG5003172; Thu, 14 Aug 2008 09:33:57 -0600 Received: from inet-141-146-46-1.oracle.com by acsmt356.oracle.com with ESMTP id 11484206171218728000; Thu, 14 Aug 2008 08:33:20 -0700 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 14 Aug 2008 08:33:19 -0700 From: "Drew Adams" To: "'martin rudalics'" Cc: <669@debbugs.gnu.org> References: <002201c8f8ba$a2eebea0$c2b22382@us.oracle.com> <003201c8f8cf$bafb9df0$c2b22382@us.oracle.com> <48A31466.9080401@gmx.at> <001d01c8fd69$da11c450$c2b22382@us.oracle.com> <48A34F54.9090302@gmx.at> <004f01c8fd8d$4f880730$c2b22382@us.oracle.com> <48A3CE2C.3070204@gmx.at> Date: Thu, 14 Aug 2008 08:33:22 -0700 Message-ID: <006501c8fe23$17413900$c2b22382@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <48A3CE2C.3070204@gmx.at> Thread-Index: Acj91eTi1UhETU/lQXa0aG+Wvkuw8gASMH/g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE > > That is, for (defun foo () "..." 5) we don't just print > `foo' and let you click > > that link to find out where it is defined. We also print > "is an interactive > > compiled Lisp function in `titi.el'". That same format > would be preferable for > > the defalias case also: "`toto' is an alias for `foo' > which is an interactive > > compiled Lisp function in `titi.el'". > > Doing C-h f RET rplaca RET gets me a Help buffer with the line > > rplaca is an alias for `setcar' in `.../subr.el'. > > Clicking on > > - the "setcar" link gets me to the Help buffer for `setcar', > > - the ".../subr.el" link gets me to the location of the defalias. > > I suppose we shouldn't change that behavior. I'll leave it up to you - whatever you think is appropriate. Thanks for working on this. The general idea, from my point of view, is to immediately give the user the most info s?he might need, provided that doesn't obscure the most important info s?he is after (the doc string, in this case). The main thing I wanted to point out was that `C-h f' was describing the wrong things and attributing those faulty descriptions to the right things. It should say that the alias is an alias and then describe the function for which it is an alias. If it can also let you know where the alias is defined and where the function it points to is defined, so much the better. From unknown Mon Aug 18 17:54:57 2025 X-Loop: don@donarmstrong.com Subject: bug#669: 23.0.60; defalias is not taken into account by C-h k Reply-To: Stefan Monnier , 669@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 14 Aug 2008 20:10:06 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 669 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 669-submit@emacsbugs.donarmstrong.com id=B669.121874405729661 (code B ref 669); Thu, 14 Aug 2008 20:10:06 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 669) by emacsbugs.donarmstrong.com; 14 Aug 2008 20:00:57 +0000 Received: from smtp-03.arnet.com.ar (smtp-03.arnet.com.ar [200.45.191.14]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m7EK0rVd029654 for <669@emacsbugs.donarmstrong.com>; Thu, 14 Aug 2008 13:00:55 -0700 Received: (qmail 11244 invoked from network); 14 Aug 2008 19:59:00 -0000 Received: from unknown (HELO ceviche.home) (200.117.153.208) by 0 with SMTP; 14 Aug 2008 19:59:00 -0000 Received: by ceviche.home (Postfix, from userid 20848) id DD2A2B40B9; Thu, 14 Aug 2008 16:00:46 -0400 (EDT) From: Stefan Monnier To: martin rudalics Cc: 669@debbugs.gnu.org, Drew Adams Message-ID: References: <002201c8f8ba$a2eebea0$c2b22382@us.oracle.com> <003201c8f8cf$bafb9df0$c2b22382@us.oracle.com> <48A31466.9080401@gmx.at> <001d01c8fd69$da11c450$c2b22382@us.oracle.com> <48A34F54.9090302@gmx.at> Date: Thu, 14 Aug 2008 16:00:46 -0400 In-Reply-To: <48A34F54.9090302@gmx.at> (martin rudalics's message of "Wed, 13 Aug 2008 23:17:08 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > case via the `foo' indirection but certainly _not_ in the > (defalias 'lisp-complete-symbol (symbol-function 'foo)) > because, well, look at the return value of (symbol-function 'foo). We certainly could, if we labelled every lambda we build with the location where it was found (rather than labelling the symbol to which the lambda is bound). In some cases we already do that (if the code is byte-compiled and the lambda has a docstring, we include a pointer to the docstring which includes the file name). Stefan From unknown Mon Aug 18 17:54:57 2025 X-Loop: don@donarmstrong.com Subject: bug#669: 23.0.60; defalias is not taken into account by C-h k Reply-To: Stefan Monnier , 669@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 14 Aug 2008 20:10:08 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 669 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 669-submit@emacsbugs.donarmstrong.com id=B669.121874420329808 (code B ref 669); Thu, 14 Aug 2008 20:10:08 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.1 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 669) by emacsbugs.donarmstrong.com; 14 Aug 2008 20:03:23 +0000 Received: from smtp-03.arnet.com.ar (smtp-03.arnet.com.ar [200.45.191.14]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m7EK3JXk029802 for <669@emacsbugs.donarmstrong.com>; Thu, 14 Aug 2008 13:03:20 -0700 Received: (qmail 17956 invoked from network); 14 Aug 2008 20:01:26 -0000 Received: from unknown (HELO ceviche.home) (200.117.153.208) by 0 with SMTP; 14 Aug 2008 20:01:25 -0000 Received: by ceviche.home (Postfix, from userid 20848) id 0D29AB40B9; Thu, 14 Aug 2008 16:03:12 -0400 (EDT) From: Stefan Monnier To: martin rudalics Cc: 669@debbugs.gnu.org, Drew Adams Message-ID: References: <002201c8f8ba$a2eebea0$c2b22382@us.oracle.com> <003201c8f8cf$bafb9df0$c2b22382@us.oracle.com> <48A31466.9080401@gmx.at> <001d01c8fd69$da11c450$c2b22382@us.oracle.com> <48A34F54.9090302@gmx.at> <004f01c8fd8d$4f880730$c2b22382@us.oracle.com> <48A3CE2C.3070204@gmx.at> Date: Thu, 14 Aug 2008 16:03:12 -0400 In-Reply-To: <48A3CE2C.3070204@gmx.at> (martin rudalics's message of "Thu, 14 Aug 2008 08:18:20 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > Clicking on > - the "setcar" link gets me to the Help buffer for `setcar', > - the ".../subr.el" link gets me to the location of the defalias. > I suppose we shouldn't change that behavior. Indeed we don't want to change that: having access to the defalias itself is more important than saving a click in the case the user wants to access the actual function body. Stefan From unknown Mon Aug 18 17:54:57 2025 X-Loop: don@donarmstrong.com Subject: bug#669: 23.0.60; To source or not to source (from help) Reply-To: Chong Yidong , 669@debbugs.gnu.org Resent-From: Chong Yidong Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 01 Sep 2008 14:40:06 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 669 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 669-submit@emacsbugs.donarmstrong.com id=B669.12202794899958 (code B ref 669); Mon, 01 Sep 2008 14:40:06 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.7 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 669) by emacsbugs.donarmstrong.com; 1 Sep 2008 14:31:29 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m81EVEl4009951; Mon, 1 Sep 2008 07:31:15 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 83DE757E337; Mon, 1 Sep 2008 10:33:29 -0400 (EDT) To: 587@debbugs.gnu.org, 669@debbugs.gnu.org, 690@debbugs.gnu.org From: Chong Yidong Date: Mon, 01 Sep 2008 10:33:29 -0400 Message-ID: <87zlmsndfq.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Martin Rudalics has checked in his fix (2008-09-01 checkin to trunk). Now closing the bug.