GNU bug report logs -
#69720
29.2; `shortdoc-copy-function-as-kill' copies the ')' for some functions
Previous Next
Reported by: <tpeplt <at> gmail.com>
Date: Mon, 11 Mar 2024 02:47:01 UTC
Severity: normal
Found in version 29.2
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 69720 in the body.
You can then email your comments to 69720 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#69720
; Package
emacs
.
(Mon, 11 Mar 2024 02:47:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
<tpeplt <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 11 Mar 2024 02:47:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Emacs Maintainers,
The function ‘shortdoc-copy-function-as-kill’ copies the
function name of the function of the shortdoc item in
which point is located. This works as expected when a
function has arguments, but when a function does not have
arguments, then ‘shortdoc-copy-function-as-kill’ copies the
trailing parenthesis (that is, the ‘)’).
So, for example in the shortdoc function summary for
‘buffer’, when point is in the item for ‘current-buffer’,
then ‘shortdoc-copy-function-as-kill’ (mapped to ‘w’) will
copy the text "current-buffer)", rather than the expected
"current-buffer". The same error occurs for ‘point’,
‘point-min’, ‘point-max’, and so on.
In the definition of ‘shortdoc-copy-function-as-kill’,
the specification of the regular expression that is used to
match the function name searches for a space (" ") to find
the end of the name, rather than searching for a space or
right parenthesis (" )"). That is, the expression (in " ")
in the ‘when-let*’ expression:
(when-let* ((re (rx bol "(" (group (+ (not (in " "))))))...
A possible fix is to change (in " ") to (in " )"):
(when-let* ((re (rx bol "(" (group (+ (not (in " )"))))))...
--
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#69720
; Package
emacs
.
(Thu, 14 Mar 2024 16:24:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
Here is a recipe for reproducing this error:
1. Start Emacs from a shell prompt with ‘emacs -Q’.
2. Run the ‘shortdoc’ command: M-x shortdoc
3. At the prompt "Show summary for functions in: ", type: buffer RET
4. In the buffer "*Shortdoc buffer*", position point on the line that
begins description of the ‘current-buffer’ entry, (current-buffer).
5. Type ‘w’ to copy the name of the function (w runs the command
‘shortdoc-copy-function-as-kill’).
6. Switch to the *scratch* buffer.
7. Type C-y to yank the name of the function ‘current-buffer’ into the
buffer. Note that the text that is inserted is "current-buffer)", with
a trailing parenthesis instead of "current-buffer".
8. Repeat the sequence of operations above to copy the names of
functions that have at least one argument. The function name is copied
correctly.
9. Repeat the sequence of operations above to copy the names of other
functions in the *Shortdoc buffer* that have no arguments (such as
‘point’, ‘point-min’, and so on). Note that when the function name is
yanked into the *scratch* buffer, a trailing parenthesis is
(incorrectly) included in the text.
--
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 16 Mar 2024 11:10:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
<tpeplt <at> gmail.com>
:
bug acknowledged by developer.
(Sat, 16 Mar 2024 11:10:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 69720-done <at> debbugs.gnu.org (full text, mbox):
> From: <tpeplt <at> gmail.com>
> Date: Sun, 10 Mar 2024 14:47:52 -0400
>
> Emacs Maintainers,
>
> The function ‘shortdoc-copy-function-as-kill’ copies the
> function name of the function of the shortdoc item in
> which point is located. This works as expected when a
> function has arguments, but when a function does not have
> arguments, then ‘shortdoc-copy-function-as-kill’ copies the
> trailing parenthesis (that is, the ‘)’).
>
> So, for example in the shortdoc function summary for
> ‘buffer’, when point is in the item for ‘current-buffer’,
> then ‘shortdoc-copy-function-as-kill’ (mapped to ‘w’) will
> copy the text "current-buffer)", rather than the expected
> "current-buffer". The same error occurs for ‘point’,
> ‘point-min’, ‘point-max’, and so on.
>
> In the definition of ‘shortdoc-copy-function-as-kill’,
> the specification of the regular expression that is used to
> match the function name searches for a space (" ") to find
> the end of the name, rather than searching for a space or
> right parenthesis (" )"). That is, the expression (in " ")
> in the ‘when-let*’ expression:
>
> (when-let* ((re (rx bol "(" (group (+ (not (in " "))))))...
>
> A possible fix is to change (in " ") to (in " )"):
>
> (when-let* ((re (rx bol "(" (group (+ (not (in " )"))))))...
Thanks, fixed 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
.
(Sat, 13 Apr 2024 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 125 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.