GNU bug report logs - #69720
29.2; `shortdoc-copy-function-as-kill' copies the ')' for some functions

Previous Next

Package: emacs;

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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: <tpeplt <at> gmail.com>
Subject: bug#69720: closed (Re: bug#69720: 29.2; `shortdoc-copy-function-as-kill'
 copies the ')' for some functions)
Date: Sat, 16 Mar 2024 11:10:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#69720: 29.2; `shortdoc-copy-function-as-kill' copies the ')' for some functions

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 69720 <at> debbugs.gnu.org.

-- 
69720: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69720
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: <tpeplt <at> gmail.com>
Cc: 69720-done <at> debbugs.gnu.org
Subject: Re: bug#69720: 29.2;
 `shortdoc-copy-function-as-kill' copies the ')' for some functions
Date: Sat, 16 Mar 2024 13:08:57 +0200
> 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.

[Message part 3 (message/rfc822, inline)]
From: <tpeplt <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.2; `shortdoc-copy-function-as-kill' copies the ')' for some
 functions
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 " )"))))))...

--



This bug report was last modified 1 year and 126 days ago.

Previous Next


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