From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Ponce Newsgroups: gmane.emacs.bugs Subject: bug#65270: 30.0.50; `describe-function' issue with some methods Date: Sun, 13 Aug 2023 12:36:25 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35951"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 To: 65270@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 13 12:37:31 2023 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 1qV8TS-0008xP-BV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Aug 2023 12:37:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qV8T3-000758-QY; Sun, 13 Aug 2023 06:37:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qV8T0-00074q-JG for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2023 06:37:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qV8T0-0000r5-B0 for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2023 06:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qV8Sz-0007PV-QM for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2023 06:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Ponce Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Aug 2023 10:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65270 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169192300328451 (code B ref -1); Sun, 13 Aug 2023 10:37:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Aug 2023 10:36:43 +0000 Original-Received: from localhost ([127.0.0.1]:58311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qV8Sh-0007Oo-6O for submit@debbugs.gnu.org; Sun, 13 Aug 2023 06:36:43 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:37702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qV8Sd-0007OT-Lq for submit@debbugs.gnu.org; Sun, 13 Aug 2023 06:36:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qV8SX-0006xG-P3 for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2023 06:36:33 -0400 Original-Received: from smtp-16.smtpout.orange.fr ([80.12.242.16] helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qV8SU-0000oj-Fe for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2023 06:36:33 -0400 Original-Received: from [192.168.1.15] ([2.7.71.181]) by smtp.orange.fr with ESMTPA id V8SPqAuZ09KIfV8SPqPvNI; Sun, 13 Aug 2023 12:36:26 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1691922986; bh=+6CfOpR+ng/EfOmI5chKEFwX/Z4B3L1pe4Bt6H/FxtY=; h=Date:To:From:Subject; b=Dm1RncdWwUCbtSWc9K8AIHeZVc9Cxm4QU5Thnu++ic0ABZisxyzCMebdDDpVRAkHB 4Xwwp968qEGPDny2W7ppGZv25DJbELWCx1hzeKJ+/+5vaGZQ05+3H9PTuskxHCnxeS VitDIc1woPI6RDr7Hvzzq4Ywnz1/3C7L2i6wUsSePGkHKU9RX3Du5vxzVYIq/cRyuN /imHtvxapXWFqJb0cWQa8pEWuKdIjT7n6lVTGwIaxEru3TmiDnT2grkh6/6vTDnKwF zscbU7yBDT+je7I63gxF5+05Mq4z98JjI74tlFX2vmoiWwgwjIv/dbHJegweVdmjD3 fphWp1XKsYf5w== X-ME-Helo: [192.168.1.15] X-ME-Auth: ZGFfdmlkQHdhbmFkb28uZnI= X-ME-Date: Sun, 13 Aug 2023 12:36:26 +0200 X-ME-IP: 2.7.71.181 Content-Language: fr, en-US Received-SPF: pass client-ip=80.12.242.16; envelope-from=da_vid@orange.fr; helo=smtp.smtpout.orange.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:267356 Archived-At: Hello, It seems there is an issue with `describe-function' of a method that calls `cl-call-next-method'. For a such method `describe-function' says that the method is "Undocumented" even if a doc string is present. Also the mentioned signature is weird. See an illustration below using a simple recipe, running 'emacs -Q'. Thanks! <1> In scratch buffer eval: =========================== *scratch* ------------------------------------------------------------------ (cl-defgeneric foo (arg) "Generic foo receiving any ARG." (format "%S" arg)) foo (cl-defmethod foo ((arg atom)) "Specialized foo receiving any atoms." (format "atom %s" (cl-call-next-method))) foo (cl-defmethod foo ((arg string)) "Specialized foo receiving strings." (format "string %S" arg)) foo ;; Check results are correct (foo 1) "atom 1" (foo '(1)) "(1)" (foo "1") "string \"1\"" ------------------------------------------------------------------ <2> M-x describe-function RET foo RET ===================================== *Help* (is not correct for the method using `cl-call-next-method') ------------------------------------------------------------------ foo is a byte-compiled Lisp function. (foo ARG) Generic foo receiving any ARG. Probably introduced at or before Emacs version 1.2. This is a generic function. Implementations: (foo (ARG string)) Specialized foo receiving strings. (foo (ARG0 atom) &rest CL--ARGS) <<<<<<<<<<<<< Incorrect Undocumented (foo ARG) Undocumented ------------------------------------------------------------------ <3> In scratch buffer eval: =========================== *scratch* ------------------------------------------------------------------ ;; Redefine method without calling `cl-call-next-method' (cl-defmethod foo ((arg atom)) "Specialized foo receiving any atoms." (format "atom %S" arg)) foo ;; Check results are correct (foo 1) "atom 1" (foo '(1)) "(1)" (foo "1") "string \"1\"" ------------------------------------------------------------------ <4> M-x describe-function RET foo RET ===================================== *Help* (is correct) ------------------------------------------------------------------ foo is a byte-compiled Lisp function. (foo ARG) Generic foo receiving any ARG. Probably introduced at or before Emacs version 1.2. This is a generic function. Implementations: (foo (ARG string)) Specialized foo receiving strings. (foo (ARG atom)) <<<<<<<<<<<<< Correct Specialized foo receiving any atoms. (foo ARG) Undocumented ------------------------------------------------------------------ In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-08-13 Repository revision: de6c1c4d5c92b92d5b280e157c2a5bc3228749f2 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: Fedora Linux 38 (KDE Plasma) Configured using: 'configure --with-x-toolkit=gtk3 --with-native-compilation=no' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_TIME: fr_FR.utf8 value of $LANG: fr_FR.UTF-8 locale-coding-system: utf-8-unix