From: Ikumi Keita <ikumi@ikumi.que.jp>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 57974@debbugs.gnu.org
Subject: bug#57974: 2022-08-30; Enhancing help facility for function doc string
Date: Wed, 21 Sep 2022 23:21:20 +0900 [thread overview]
Message-ID: <6232.1663770080@localhost> (raw)
In-Reply-To: <871qs56iut.fsf@gnus.org>
Hi Lars,
>>>>> Lars Ingebrigtsen <larsi@gnus.org> 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
next prev parent reply other threads:[~2022-09-21 14:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1509.1663752344@localhost>
2022-09-21 10:15 ` bug#57974: 2022-08-30; Enhancing help facility for function doc string Ikumi Keita
2022-09-21 11:56 ` Lars Ingebrigtsen
2022-09-21 14:21 ` Ikumi Keita [this message]
2022-09-22 11:13 ` Lars Ingebrigtsen
2022-09-22 14:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-22 15:22 ` Ikumi Keita
2022-09-22 16:47 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-23 15:10 ` Lars Ingebrigtsen
2022-09-24 6:04 ` Ikumi Keita
2022-09-24 12:06 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6232.1663770080@localhost \
--to=ikumi@ikumi.que.jp \
--cc=57974@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).