From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ikumi Keita Newsgroups: gmane.emacs.bugs Subject: bug#57974: 2022-08-30; Enhancing help facility for function doc string Date: Wed, 21 Sep 2022 23:21:20 +0900 Message-ID: <6232.1663770080@localhost> References: <1509.1663752344@localhost> <871qs56iut.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13822"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57974@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 21 16:27:10 2022 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 1ob0gw-0003QB-MY for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Sep 2022 16:27:10 +0200 Original-Received: from localhost ([::1]:38732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ob0gv-0007qr-JL for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Sep 2022 10:27:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ob0bz-00024f-1T for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2022 10:22:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35911) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ob0bx-00083o-Ro for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2022 10:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ob0bx-0003Sn-LL for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2022 10:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ikumi Keita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 14:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57974 X-GNU-PR-Package: emacs Original-Received: via spool by 57974-submit@debbugs.gnu.org id=B57974.166377008813265 (code B ref 57974); Wed, 21 Sep 2022 14:22:01 +0000 Original-Received: (at 57974) by debbugs.gnu.org; 21 Sep 2022 14:21:28 +0000 Original-Received: from localhost ([127.0.0.1]:34989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ob0bQ-0003Rt-JR for submit@debbugs.gnu.org; Wed, 21 Sep 2022 10:21:28 -0400 Original-Received: from smtp1a.inetd.co.jp ([210.129.88.11]:34002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ob0bM-0003Rg-NE for 57974@debbugs.gnu.org; Wed, 21 Sep 2022 10:21:26 -0400 Original-Received: from localhost (42-144-46-173.rev.home.ne.jp [42.144.46.173]) by smtp1a.inetd.co.jp (Postfix) with ESMTPA id 615862DC; Wed, 21 Sep 2022 23:21:22 +0900 (JST) In-reply-to: <871qs56iut.fsf@gnus.org> Comments: In-reply-to Lars Ingebrigtsen message dated "Wed, 21 Sep 2022 13:56:58 +0200." X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 28.2 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:243360 Archived-At: Hi Lars, >>>>> Lars Ingebrigtsen writes: > I'm not quite sure I follow your meaning here. > Do you have a complete recipe, starting from "emacs -Q", that displays > the problem? 1. Save the following file as /tmp/foo.el ---------------------------------------------------------------------- (defun func-A () "doc string of A" nil) (defun func-B () "doc string of B" t) (advice-add 'func-A :override #'func-B) ---------------------------------------------------------------------- 2. emacs -Q -l /tmp/foo.el 3. Type C-h f func-A RET 4. Then *Help* buffer pops up and shows ---------------------------------------------------------------------- func-A is a Lisp function in ‘/tmp/foo.el’. (func-A) doc string of A This function has :override advice: ‘func-B’. ---------------------------------------------------------------------- The function A behaves as if it were the function B by the nature of :override advice, so the doc string of A is almost useless. The actual behavior is described by the doc string of B. Unfortunately, when A is a mode function and has a long doc string, users can easily look over the line This function has :override advice: ‘func-B’. far downward in the *Help* buffer when they see the output of C-h m. That results in that they miss the "true" mode description provided by the doc string of B. Stephan suggested that such situation can be improved as ,---- | Maybe the help facility should be more careful in how it builds the | docstring when a function has an `:override` advice, indeed. `---- , in https://lists.gnu.org/r/auctex-devel/2022-09/msg00046.html Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine