GNU bug report logs -
#67355
[PATCH] Add doc string to simple.el
Previous Next
Reported by: Jeremy Bryant <jb <at> jeremybryant.net>
Date: Tue, 21 Nov 2023 23:36:01 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.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 67355 in the body.
You can then email your comments to 67355 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67355
; Package
emacs
.
(Tue, 21 Nov 2023 23:36:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jeremy Bryant <jb <at> jeremybryant.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 21 Nov 2023 23:36:01 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)]
Tags: patch
This patch adds a doc string to simple.el where there was none.
Please confirm if this is good to install or if any refinements are
needed. Thanks in advance.
[0001-Add-doc-string-to-simple.el.patch (text/patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67355
; Package
emacs
.
(Wed, 22 Nov 2023 14:30:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 67355 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 21 Nov 2023 23:33:50 +0000
> From: Jeremy Bryant via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> This patch adds a doc string to simple.el where there was none.
Thanks.
> Please confirm if this is good to install or if any refinements are
> needed. Thanks in advance.
Below.
> (defun kill-buffer--possibly-save (buffer)
> + "Prompt user whether to kill BUFFER, possibly saving it first.
> +
> +This assumes the buffer is known to be modified."
This prefers the description of what function does to describing its
role. I think it is better to do the opposite:
Ask the user to confirm killing of a modified BUFFER.
If the user confirms, optionally save BUFFER that is about to be
killed.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67355
; Package
emacs
.
(Wed, 22 Nov 2023 22:25:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 67355 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
>
>> (defun kill-buffer--possibly-save (buffer)
>> + "Prompt user whether to kill BUFFER, possibly saving it first.
>> +
>> +This assumes the buffer is known to be modified."
>
> This prefers the description of what function does to describing its
> role. I think it is better to do the opposite:
>
> Ask the user to confirm killing of a modified BUFFER.
>
> If the user confirms, optionally save BUFFER that is about to be
> killed.
Style noted, revised patch attached.
[0001-Add-doc-string-to-simple.el.patch (text/x-diff, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67355
; Package
emacs
.
(Wed, 22 Nov 2023 22:39:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 67355 <at> debbugs.gnu.org (full text, mbox):
>
>> (defun kill-buffer--possibly-save (buffer)
>> + "Prompt user whether to kill BUFFER, possibly saving it first.
>> +
>> +This assumes the buffer is known to be modified."
>
> This prefers the description of what function does to describing its
> role. I think it is better to do the opposite:
>
> Ask the user to confirm killing of a modified BUFFER.
>
> If the user confirms, optionally save BUFFER that is about to be
> killed.
Is there any issue with a potential update to the manual at (elisp)
Documentation Tips, by adding a line to reflect this tip? Let me know
and I can prepare a separate patch.
From:
For a function, the first line should briefly answer the question,
“What does this function do?” For a variable, the first line should
briefly answer the question, “What does this value mean?”
Don’t limit the documentation string to one line; use as many lines
as you need to explain the details of how to use the function or
variable. Please use complete sentences for the rest of the text
too.
To:
For a function, the first line should briefly answer the question,
“What does this function do?” For a variable, the first line should
briefly answer the question, “What does this value mean?”
Don’t limit the documentation string to one line; use as many lines
as you need to explain the details of how to use the function or
variable. Please use complete sentences for the rest of the text
too.
+ In the longer description, prefer describing the role of a function
+ as opposed to strictly what it does.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67355
; Package
emacs
.
(Thu, 23 Nov 2023 15:28:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 67355 <at> debbugs.gnu.org (full text, mbox):
> From: Jeremy Bryant <jb <at> jeremybryant.net>
> Cc: 67355 <at> debbugs.gnu.org
> Date: Wed, 22 Nov 2023 22:33:17 +0000
>
> >
> >> (defun kill-buffer--possibly-save (buffer)
> >> + "Prompt user whether to kill BUFFER, possibly saving it first.
> >> +
> >> +This assumes the buffer is known to be modified."
> >
> > This prefers the description of what function does to describing its
> > role. I think it is better to do the opposite:
> >
> > Ask the user to confirm killing of a modified BUFFER.
> >
> > If the user confirms, optionally save BUFFER that is about to be
> > killed.
>
> Is there any issue with a potential update to the manual at (elisp)
> Documentation Tips, by adding a line to reflect this tip? Let me know
> and I can prepare a separate patch.
I added there something similar to your suggestion. Thanks.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Thu, 23 Nov 2023 15:31:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jeremy Bryant <jb <at> jeremybryant.net>
:
bug acknowledged by developer.
(Thu, 23 Nov 2023 15:31:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 67355-done <at> debbugs.gnu.org (full text, mbox):
> From: Jeremy Bryant <jb <at> jeremybryant.net>
> Cc: 67355 <at> debbugs.gnu.org
> Date: Wed, 22 Nov 2023 22:23:37 +0000
>
> Style noted, revised patch attached.
Thanks, installed on the emacs-29 branch, and closing the bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 22 Dec 2023 12:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 140 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.