GNU bug report logs - #39295
26.3; kbd-help property is undocumented

Previous Next

Package: emacs;

Reported by: Howard Melman <hmelman <at> gmail.com>

Date: Sun, 26 Jan 2020 17:04:01 UTC

Severity: normal

Tags: fixed

Found in version 26.3

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39295 in the body.
You can then email your comments to 39295 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#39295; Package emacs. (Sun, 26 Jan 2020 17:04:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Howard Melman <hmelman <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 26 Jan 2020 17:04:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Howard Melman <hmelman <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3; kbd-help property is undocumented
Date: Sun, 26 Jan 2020 12:03:12 -0500
The docstring for `help-at-pt-string' mentions a `kbd-help'
property, but this property is not mentioned in either the
emacs or elisp manuals.

The commentary to help-at-pt.el mentions that it is a new
property though it's not clear how new and it doesn't seem
to be used in the rest of emacs 26 lisp source. 

In GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109))
of 2019-09-02 built on builder10-14.porkrind.org

-- 

Howard




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39295; Package emacs. (Fri, 31 Jan 2020 14:05:02 GMT) Full text and rfc822 format available.

Message #8 received at 39295 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Howard Melman <hmelman <at> gmail.com>
Cc: 39295 <at> debbugs.gnu.org
Subject: Re: bug#39295: 26.3; kbd-help property is undocumented
Date: Fri, 31 Jan 2020 16:04:15 +0200
> From: Howard Melman <hmelman <at> gmail.com>
> Date: Sun, 26 Jan 2020 12:03:12 -0500
> 
> The docstring for `help-at-pt-string' mentions a `kbd-help'
> property, but this property is not mentioned in either the
> emacs or elisp manuals.
> 
> The commentary to help-at-pt.el mentions that it is a new
> property though it's not clear how new and it doesn't seem
> to be used in the rest of emacs 26 lisp source. 

It indeed is unused, so I'm not sure it should be documented at this
time.  As for "new": the help-at-pt.el file was added to Emacs 17
years ago, and its original version already included support for this
property.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39295; Package emacs. (Fri, 31 Jan 2020 17:12:02 GMT) Full text and rfc822 format available.

Message #11 received at 39295 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Howard Melman <hmelman <at> gmail.com>
Cc: 39295 <at> debbugs.gnu.org
Subject: Re: bug#39295: 26.3; kbd-help property is undocumented
Date: Fri, 31 Jan 2020 19:10:47 +0200
> From: Howard Melman <hmelman <at> gmail.com>
> Date: Fri, 31 Jan 2020 11:10:26 -0500

[Please keep the bug address on the CC list.]

> > It indeed is unused, so I'm not sure it should be documented at this
> > time.  As for "new": the help-at-pt.el file was added to Emacs 17
> > years ago, and its original version already included support for this
> > property.
> 
> Perhaps it should be deprecated? Without documentation it's unlikely to be used.

It is documented in the doc strings, isn't it?

> It would be nice if some place described it as unused (and perhaps as unused for a very long time). 

Unused in Emacs itself doesn't mean no one out there uses it.  A
feature that is unused doesn't do any harm.

> Since the code will use it, it should remain in the docstring. If you don't want to add it to the manual then may I suggest at a least a comment in the code saying so and what its intent was, perhaps in the package commentary, would be useful.

Not every feature is documented in the manual, only the important ones
are.  And I'm not sure I see the utility of stating in comments that
we don't document this in the manual: we don't say that about all the
other features not mentioned in the manual.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39295; Package emacs. (Fri, 31 Jan 2020 17:24:01 GMT) Full text and rfc822 format available.

Message #14 received at 39295 <at> debbugs.gnu.org (full text, mbox):

From: Howard Melman <hmelman <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 39295 <at> debbugs.gnu.org
Subject: Re: bug#39295: 26.3; kbd-help property is undocumented
Date: Fri, 31 Jan 2020 12:23:45 -0500

> On Jan 31, 2020, at 12:10 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>> From: Howard Melman <hmelman <at> gmail.com>
>> Date: Fri, 31 Jan 2020 11:10:26 -0500
> 
> [Please keep the bug address on the CC list.]
> 
>>> It indeed is unused, so I'm not sure it should be documented at this
>>> time.  As for "new": the help-at-pt.el file was added to Emacs 17
>>> years ago, and its original version already included support for this
>>> property.
>> 
>> Perhaps it should be deprecated? Without documentation it's unlikely to be used.
> 
> It is documented in the doc strings, isn't it?
> 
>> It would be nice if some place described it as unused (and perhaps as unused for a very long time). 
> 
> Unused in Emacs itself doesn't mean no one out there uses it.  A
> feature that is unused doesn't do any harm.

Well, just a little complexity. I've now forgotten what I was tracking down that led me to this code but it was an additional property I had to figure out if it was relevant to what I was looking for.

>> Since the code will use it, it should remain in the docstring. If you don't want to add it to the manual then may I suggest at a least a comment in the code saying so and what its intent was, perhaps in the package commentary, would be useful.
> 
> Not every feature is documented in the manual, only the important ones
> are.  And I'm not sure I see the utility of stating in comments that
> we don't document this in the manual: we don't say that about all the
> other features not mentioned in the manual.

I think some place should describe when code should use kbd-help as opposed to help-echo. 

The elisp manual section "Properties with Special Meanings" is incomplete without it. If it doesn't deserve a description there, then I do think a comment differentiating it from help-echo (even to say it's rarely used) would help.

Howard



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39295; Package emacs. (Fri, 31 Jan 2020 19:26:01 GMT) Full text and rfc822 format available.

Message #17 received at 39295 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Howard Melman <hmelman <at> gmail.com>
Cc: 39295 <at> debbugs.gnu.org
Subject: Re: bug#39295: 26.3; kbd-help property is undocumented
Date: Fri, 31 Jan 2020 21:24:51 +0200
> From: Howard Melman <hmelman <at> gmail.com>
> Date: Fri, 31 Jan 2020 12:23:45 -0500
> Cc: 39295 <at> debbugs.gnu.org
> 
> > Not every feature is documented in the manual, only the important ones
> > are.  And I'm not sure I see the utility of stating in comments that
> > we don't document this in the manual: we don't say that about all the
> > other features not mentioned in the manual.
> 
> I think some place should describe when code should use kbd-help as opposed to help-echo. 

I see it explained in the doc string of help-at-pt-display-when-idle,
and also in some other doc strings in help-at-pt.el.

> The elisp manual section "Properties with Special Meanings" is incomplete without it.

It doesn't try to be complete.  Eventually, one needs to read the doc
strings of the features one wants to use.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39295; Package emacs. (Mon, 03 Feb 2020 19:32:02 GMT) Full text and rfc822 format available.

Message #20 received at 39295 <at> debbugs.gnu.org (full text, mbox):

From: Howard Melman <hmelman <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 39295 <at> debbugs.gnu.org
Subject: Re: bug#39295: 26.3; kbd-help property is undocumented
Date: Mon, 3 Feb 2020 14:31:43 -0500
On Jan 31, 2020, at 2:24 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> From: Howard Melman <hmelman <at> gmail.com>
>> 
>>> Not every feature is documented in the manual, only the important ones
>>> are.  And I'm not sure I see the utility of stating in comments that
>>> we don't document this in the manual: we don't say that about all the
>>> other features not mentioned in the manual.
>> 
>> I think some place should describe when code should use kbd-help as opposed to help-echo. 
> 
> I see it explained in the doc string of help-at-pt-display-when-idle,
> and also in some other doc strings in help-at-pt.el.

I now see it in the :doc strings of that option. Specifically the lines: "The text printed from the `help-echo' property is often only relevant when using the mouse." and "The presence of a `kbd-help' property guarantees that non mouse specific help is available." That's all the information I wanted.

I still think if those were in the defcustom's docstring or a comment it would have been easier to find, but you're correct, it is in the code and if I had been more careful in reading all 13 occurrences I would have seen it.

>> The elisp manual section "Properties with Special Meanings" is incomplete without it.
> 
> It doesn't try to be complete.  Eventually, one needs to read the doc
> strings of the features one wants to use.

That's a fine stance to take, though I interpret the first paragraph of the "Properties with Special Meanings" section as saying it is attempting to be complete.

    Here is a table of text property names that have special built-in
    meanings.  The following sections list a few additional special property
    names that control filling and property inheritance.  All other names
    have no standard meaning, and you can use them as you like.

Howard



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39295; Package emacs. (Fri, 21 Aug 2020 14:35:02 GMT) Full text and rfc822 format available.

Message #23 received at 39295 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Howard Melman <hmelman <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 39295 <at> debbugs.gnu.org
Subject: Re: bug#39295: 26.3; kbd-help property is undocumented
Date: Fri, 21 Aug 2020 16:34:12 +0200
Howard Melman <hmelman <at> gmail.com> writes:

> I now see it in the :doc strings of that option. Specifically the
> lines: "The text printed from the `help-echo' property is often only
> relevant when using the mouse." and "The presence of a `kbd-help'
> property guarantees that non mouse specific help is available." That's
> all the information I wanted.
>
> I still think if those were in the defcustom's docstring or a comment
> it would have been easier to find,

Makes sense to me.  I've now made the suggested adjustment in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 21 Aug 2020 14:35:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 39295 <at> debbugs.gnu.org and Howard Melman <hmelman <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 21 Aug 2020 14:35:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 19 Sep 2020 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 220 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.