GNU bug report logs -
#79469
31.0.50; Ungrammatical sentence from describe-function
Previous Next
To reply to this bug, email your comments to 79469 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Thu, 18 Sep 2025 16:42:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stephen Berman <stephen.berman <at> gmx.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 18 Sep 2025 16:42:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Calling `describe-function' on a noninteractive non-byte-compiled
function produces an ungrammatical sentence in the *Help* buffer:
0. emacs -Q
1. Load a non-byte-compiled file that contains a noninteractive function
definition, e.g. edt-user.el from the Emacs "etc" directory.
2. Call `describe-function' on a noninteractive function from that file,
e.g. `C-h f edt-setup-user-bindings RET'.
==> The *Help* buffer now begins with this sentence:
edt-setup-user-bindings is a interpreted-function in
‘~/src/emacs/emacs-master/etc/edt-user.el’.
It should say "...is an interpreted-function...".
Here are three possible fixes:
[Message part 2 (text/x-patch, attachment)]
[Message part 3 (text/x-patch, attachment)]
[Message part 4 (text/x-patch, attachment)]
[Message part 5 (text/plain, inline)]
Of these three I prefer the first, since it directly generates the
correct string, while the other two change an incorrect string to the
correct one.
While all three are ad hoc fixes, I think the undoubted complexity of a
more general fix is unjustified here, because (unless I've overlooked
something) `interpreted-function' is the only function type symbol
returned by `cl-type-of' in `help-fns-function-description-header' that
results in the problem (since it begins with a vowel).
In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.49, cairo version 1.18.4) of 2025-09-18 built on strobelfs2
Repository revision: 3415fa15e4f0a146d1f08df981dc9894bf2ff320
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101016
System Description: Linux From Scratch r12.3-20
Configured using:
'configure -C 'CFLAGS=-Og -g3' PKG_CONFIG_PATH=/opt/qt6/lib/pkgconfig'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Thu, 18 Sep 2025 16:56:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 79469 <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 18 Sep 2025 18:41:16 +0200
> From: Stephen Berman via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Calling `describe-function' on a noninteractive non-byte-compiled
> function produces an ungrammatical sentence in the *Help* buffer:
>
> 0. emacs -Q
> 1. Load a non-byte-compiled file that contains a noninteractive function
> definition, e.g. edt-user.el from the Emacs "etc" directory.
> 2. Call `describe-function' on a noninteractive function from that file,
> e.g. `C-h f edt-setup-user-bindings RET'.
> ==> The *Help* buffer now begins with this sentence:
>
> edt-setup-user-bindings is a interpreted-function in
> ‘~/src/emacs/emacs-master/etc/edt-user.el’.
>
> It should say "...is an interpreted-function...".
>
> Here are three possible fixes:
Thanks.
I think this splits hair, but if we want to do that, let's do it
right: instead of hard-coding specific words, implement a function
that produces "a" or "an" depending on the following word. Because
tomorrow someone will add yet another function qualifier, and what
will we do then? add one more hard-coded phrase?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Thu, 18 Sep 2025 21:28:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 79469 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, 18 Sep 2025 19:55:24 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
>> Date: Thu, 18 Sep 2025 18:41:16 +0200
>> From: Stephen Berman via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>> Calling `describe-function' on a noninteractive non-byte-compiled
>> function produces an ungrammatical sentence in the *Help* buffer:
>>
>> 0. emacs -Q
>> 1. Load a non-byte-compiled file that contains a noninteractive function
>> definition, e.g. edt-user.el from the Emacs "etc" directory.
>> 2. Call `describe-function' on a noninteractive function from that file,
>> e.g. `C-h f edt-setup-user-bindings RET'.
>> ==> The *Help* buffer now begins with this sentence:
>>
>> edt-setup-user-bindings is a interpreted-function in
>> ‘~/src/emacs/emacs-master/etc/edt-user.el’.
>>
>> It should say "...is an interpreted-function...".
>>
>> Here are three possible fixes:
>
> Thanks.
>
> I think this splits hair, but if we want to do that, let's do it
> right: instead of hard-coding specific words, implement a function
> that produces "a" or "an" depending on the following word. Because
> tomorrow someone will add yet another function qualifier, and what
> will we do then? add one more hard-coded phrase?
How's this?
[Message part 2 (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
Steve Berman
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Thu, 18 Sep 2025 22:48:01 GMT)
Full text and
rfc822 format available.
Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
On Thu, Sep 18 2025, Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
> On Thu, 18 Sep 2025 19:55:24 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>>> Date: Thu, 18 Sep 2025 18:41:16 +0200
>>> From: Stephen Berman via "Bug reports for GNU Emacs,
>>> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>>
>>> Calling `describe-function' on a noninteractive non-byte-compiled
>>> function produces an ungrammatical sentence in the *Help* buffer:
>>>
>>> 0. emacs -Q
>>> 1. Load a non-byte-compiled file that contains a noninteractive function
>>> definition, e.g. edt-user.el from the Emacs "etc" directory.
>>> 2. Call `describe-function' on a noninteractive function from that file,
>>> e.g. `C-h f edt-setup-user-bindings RET'.
>>> ==> The *Help* buffer now begins with this sentence:
>>>
>>> edt-setup-user-bindings is a interpreted-function in
>>> ‘~/src/emacs/emacs-master/etc/edt-user.el’.
>>>
>>> It should say "...is an interpreted-function...".
>>>
>>> Here are three possible fixes:
>>
>> Thanks.
>>
>> I think this splits hair, but if we want to do that, let's do it
>> right: instead of hard-coding specific words, implement a function
>> that produces "a" or "an" depending on the following word. Because
>> tomorrow someone will add yet another function qualifier, and what
>> will we do then? add one more hard-coded phrase?
>
> How's this?
> + (concat (if (string-match-p "\\`[aeiou]" (symbol-name type))
Potentially problematic, because not every word that starts with "u" gets
"an". And sometimes words starting with "h" also need "an".
--
Joost Kremers
Life has its moments
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Thu, 18 Sep 2025 22:48:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Thu, 18 Sep 2025 23:02:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 79469 <at> debbugs.gnu.org (full text, mbox):
On Fri, 19 Sep 2025 00:46:53 +0200 Joost Kremers <joostkremers <at> fastmail.fm> wrote:
> On Thu, Sep 18 2025, Stephen Berman via "Bug reports for GNU Emacs, the Swiss
> army knife of text editors" wrote:
>> On Thu, 18 Sep 2025 19:55:24 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
>>
>>>> Date: Thu, 18 Sep 2025 18:41:16 +0200
>>>> From: Stephen Berman via "Bug reports for GNU Emacs,
>>>> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>>>
>>>> Calling `describe-function' on a noninteractive non-byte-compiled
>>>> function produces an ungrammatical sentence in the *Help* buffer:
>>>>
>>>> 0. emacs -Q
>>>> 1. Load a non-byte-compiled file that contains a noninteractive function
>>>> definition, e.g. edt-user.el from the Emacs "etc" directory.
>>>> 2. Call `describe-function' on a noninteractive function from that file,
>>>> e.g. `C-h f edt-setup-user-bindings RET'.
>>>> ==> The *Help* buffer now begins with this sentence:
>>>>
>>>> edt-setup-user-bindings is a interpreted-function in
>>>> ‘~/src/emacs/emacs-master/etc/edt-user.el’.
>>>>
>>>> It should say "...is an interpreted-function...".
>>>>
>>>> Here are three possible fixes:
>>>
>>> Thanks.
>>>
>>> I think this splits hair, but if we want to do that, let's do it
>>> right: instead of hard-coding specific words, implement a function
>>> that produces "a" or "an" depending on the following word. Because
>>> tomorrow someone will add yet another function qualifier, and what
>>> will we do then? add one more hard-coded phrase?
>>
>> How's this?
>
>> + (concat (if (string-match-p "\\`[aeiou]" (symbol-name type))
>
> Potentially problematic, because not every word that starts with "u" gets
> "an". And sometimes words starting with "h" also need "an".
Yes, that's why I wrote in my OP: "While all three are ad hoc fixes, I
think the undoubted complexity of a more general fix is unjustified
here, because (unless I've overlooked something) `interpreted-function'
is the only function type symbol returned by `cl-type-of' in
`help-fns-function-description-header' that results in the problem
(since it begins with a vowel)."
Steve Berman
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Thu, 18 Sep 2025 23:03:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Fri, 19 Sep 2025 06:00:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 79469 <at> debbugs.gnu.org (full text, mbox):
> From: Joost Kremers <joostkremers <at> fastmail.fm>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, Stephen Berman <stephen.berman <at> gmx.net>,
> 79469 <at> debbugs.gnu.org
> Date: Fri, 19 Sep 2025 00:46:53 +0200
>
> > How's this?
>
> > + (concat (if (string-match-p "\\`[aeiou]" (symbol-name type))
>
> Potentially problematic, because not every word that starts with "u" gets
> "an". And sometimes words starting with "h" also need "an".
Right. And how harder would it be to write a more generally correct
function?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Fri, 19 Sep 2025 06:01:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 79469 <at> debbugs.gnu.org (full text, mbox):
> From: Stephen Berman <stephen.berman <at> gmx.net>
> Cc: Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org>,
> 79469 <at> debbugs.gnu.org
> Date: Fri, 19 Sep 2025 01:01:29 +0200
>
> On Fri, 19 Sep 2025 00:46:53 +0200 Joost Kremers <joostkremers <at> fastmail.fm> wrote:
>
> > Potentially problematic, because not every word that starts with "u" gets
> > "an". And sometimes words starting with "h" also need "an".
>
> Yes, that's why I wrote in my OP: "While all three are ad hoc fixes, I
> think the undoubted complexity of a more general fix is unjustified
> here, because (unless I've overlooked something) `interpreted-function'
> is the only function type symbol returned by `cl-type-of' in
> `help-fns-function-description-header' that results in the problem
> (since it begins with a vowel)."
If we don't care about being wrong in some cases, then why fix this to
begin with?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Fri, 19 Sep 2025 07:11:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 79469 <at> debbugs.gnu.org (full text, mbox):
On Fri, Sep 19 2025, Eli Zaretskii wrote:
>> From: Joost Kremers <joostkremers <at> fastmail.fm>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>, Stephen Berman <stephen.berman <at> gmx.net>,
>> 79469 <at> debbugs.gnu.org
>> Date: Fri, 19 Sep 2025 00:46:53 +0200
>>
>> > How's this?
>>
>> > + (concat (if (string-match-p "\\`[aeiou]" (symbol-name type))
>>
>> Potentially problematic, because not every word that starts with "u" gets
>> "an". And sometimes words starting with "h" also need "an".
>
> Right. And how harder would it be to write a more generally correct
> function?
It's impossible if you only know the spelling of a word and not its
pronunciation, which is the case here. So you'd either have to hard-code a
bunch of exceptions, or go online and consult Wiktionary or some other
resource to get the pronunciation.
Which hardly seems worth the trouble...
--
Joost Kremers
Life has its moments
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Fri, 19 Sep 2025 07:16:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 79469 <at> debbugs.gnu.org (full text, mbox):
> From: Joost Kremers <joostkremers <at> fastmail.fm>
> Cc: stephen.berman <at> gmx.net, 79469 <at> debbugs.gnu.org
> Date: Fri, 19 Sep 2025 09:09:51 +0200
>
> On Fri, Sep 19 2025, Eli Zaretskii wrote:
> >> From: Joost Kremers <joostkremers <at> fastmail.fm>
> >> Cc: Eli Zaretskii <eliz <at> gnu.org>, Stephen Berman <stephen.berman <at> gmx.net>,
> >> 79469 <at> debbugs.gnu.org
> >> Date: Fri, 19 Sep 2025 00:46:53 +0200
> >>
> >> > How's this?
> >>
> >> > + (concat (if (string-match-p "\\`[aeiou]" (symbol-name type))
> >>
> >> Potentially problematic, because not every word that starts with "u" gets
> >> "an". And sometimes words starting with "h" also need "an".
> >
> > Right. And how harder would it be to write a more generally correct
> > function?
>
> It's impossible if you only know the spelling of a word and not its
> pronunciation, which is the case here.
You are saying that English pronunciation is determined by something
beyond the spelling?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Fri, 19 Sep 2025 07:53:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 79469 <at> debbugs.gnu.org (full text, mbox):
On Fri, Sep 19 2025, Eli Zaretskii wrote:
>> From: Joost Kremers <joostkremers <at> fastmail.fm>
> You are saying that English pronunciation is determined by something
> beyond the spelling?
Yes, I am. And not just for English, for every language that has a written
form. The pronunciation is an inherent property of a word, its spelling is
not.
Just consider "row" (a line of objects) vs. "row" (noisy argument). Same
spelling, different pronunciations.
Anyway, this is off-topic here, obviously, so I'll shut up now. ;-)
--
Joost Kremers
Life has its moments
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Fri, 19 Sep 2025 15:04:02 GMT)
Full text and
rfc822 format available.
Message #41 received at 79469 <at> debbugs.gnu.org (full text, mbox):
On Fri, 19 Sep 2025 09:00:32 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Stephen Berman <stephen.berman <at> gmx.net>
>> Cc: Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of
>> text editors" <bug-gnu-emacs <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org>,
>> 79469 <at> debbugs.gnu.org
>> Date: Fri, 19 Sep 2025 01:01:29 +0200
>>
>> On Fri, 19 Sep 2025 00:46:53 +0200 Joost Kremers <joostkremers <at> fastmail.fm> wrote:
>>
>> > Potentially problematic, because not every word that starts with "u" gets
>> > "an". And sometimes words starting with "h" also need "an".
>>
>> Yes, that's why I wrote in my OP: "While all three are ad hoc fixes, I
>> think the undoubted complexity of a more general fix is unjustified
>> here, because (unless I've overlooked something) `interpreted-function'
>> is the only function type symbol returned by `cl-type-of' in
>> `help-fns-function-description-header' that results in the problem
>> (since it begins with a vowel)."
>
> If we don't care about being wrong in some cases, then why fix this to
> begin with?
AFAIK there are no cases in the current code for which the fix I
proposed (in any of the variants) is wrong, and the last version is
likely to DTRT for many, if not all, plausible future additions to the
repertoire of functions type symbols. I think a fix that would work in
all possible cases would require consulting a large wordlist (that would
have to be continually updated) and I don't think this issue justifies
implementing and maintaining such a fix. But I do think it's better to
have a limited fix known to work with the current code base than to
leave such a silly bug in Emacs.
Steve Berman
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Fri, 19 Sep 2025 15:55:07 GMT)
Full text and
rfc822 format available.
Message #44 received at 79469 <at> debbugs.gnu.org (full text, mbox):
> From: Stephen Berman <stephen.berman <at> gmx.net>
> Cc: joostkremers <at> fastmail.fm, 79469 <at> debbugs.gnu.org
> Date: Fri, 19 Sep 2025 17:03:22 +0200
>
> > If we don't care about being wrong in some cases, then why fix this to
> > begin with?
>
> AFAIK there are no cases in the current code for which the fix I
> proposed (in any of the variants) is wrong, and the last version is
> likely to DTRT for many, if not all, plausible future additions to the
> repertoire of functions type symbols. I think a fix that would work in
> all possible cases would require consulting a large wordlist (that would
> have to be continually updated) and I don't think this issue justifies
> implementing and maintaining such a fix. But I do think it's better to
> have a limited fix known to work with the current code base than to
> leave such a silly bug in Emacs.
From where I stand, it is not a bug, and certainly isn't silly.
Don't we have anything better to do to improve Emacs?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79469
; Package
emacs
.
(Fri, 19 Sep 2025 18:36:02 GMT)
Full text and
rfc822 format available.
Message #47 received at 79469 <at> debbugs.gnu.org (full text, mbox):
On Fri, 19 Sep 2025 18:53:34 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Stephen Berman <stephen.berman <at> gmx.net>
>> Cc: joostkremers <at> fastmail.fm, 79469 <at> debbugs.gnu.org
>> Date: Fri, 19 Sep 2025 17:03:22 +0200
>>
>> > If we don't care about being wrong in some cases, then why fix this to
>> > begin with?
>>
>> AFAIK there are no cases in the current code for which the fix I
>> proposed (in any of the variants) is wrong, and the last version is
>> likely to DTRT for many, if not all, plausible future additions to the
>> repertoire of functions type symbols. I think a fix that would work in
>> all possible cases would require consulting a large wordlist (that would
>> have to be continually updated) and I don't think this issue justifies
>> implementing and maintaining such a fix. But I do think it's better to
>> have a limited fix known to work with the current code base than to
>> leave such a silly bug in Emacs.
>
> From where I stand, it is not a bug, and certainly isn't silly.
Are you saying that code that unintentionally (and not by design, as
with messages or doc strings that omit articles to save space) produces
ungrammatical English in the help system is not a bug? If so, that's a
surprising and rather disturbing statement coming from an Emacs
maintainer. And the bug is silly because if the ungrammatical string
were not generated by code but written by a human, it would rightly be
treated as a typo and corrected without hesitation or discussion.
> Don't we have anything better to do to improve Emacs?
Sure, but not everyone who wants to improve Emacs can tackle the biggest
issues; I hope you don't mean to imply that those who feel motivated to
make less important improvements should not do so. And in particular
fixes for less important bugs like this one should not be rejected just
because they are not as general as possible: that would be like
demanding disproportiate effort for small bug fixes, which in practice
would be like saying we don't care about fixing small bugs.
Steve Berman
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.