From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.bugs Subject: bug#69720: 29.2; `shortdoc-copy-function-as-kill' copies the ')' for some functions Date: Sun, 10 Mar 2024 14:47:52 -0400 Message-ID: <8734sx2aav.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24524"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 69720@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 11 03:46:54 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rjVgj-0006Et-Gj for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Mar 2024 03:46:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rjVgM-0000gS-Qo; Sun, 10 Mar 2024 22:46:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rjVgL-0000fl-BZ for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 22:46:29 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjVgL-0000PO-3C for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 22:46:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rjVgr-0005NE-UK for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 22:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Mar 2024 02:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69720 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171012517920577 (code B ref -1); Mon, 11 Mar 2024 02:47:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Mar 2024 02:46:19 +0000 Original-Received: from localhost ([127.0.0.1]:38221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjVgA-0005Lm-Bg for submit@debbugs.gnu.org; Sun, 10 Mar 2024 22:46:19 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:50768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjODz-0001Zg-3V for submit@debbugs.gnu.org; Sun, 10 Mar 2024 14:48:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rjODH-0000BN-9g for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 14:48:00 -0400 Original-Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjODF-00058I-NV for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 14:47:58 -0400 Original-Received: by mail-qt1-x82c.google.com with SMTP id d75a77b69052e-42a0ba5098bso29636511cf.0 for ; Sun, 10 Mar 2024 11:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710096474; x=1710701274; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=poEGt5wPxWOM6dDivLtUbM5lJQxb4abm7VmHBNvDaJY=; b=B3ohBQvUKDoyqJNMSNOXUPnak8l4szqdKxcI91ldeU3V8qD4iBCEVEo+Bnhk1ejwpd j5cNTcsF3m9/uxJuWxhM/fWlWWYJyAaSE+AiUVUpC2C+zm/kpcJr3ahhmoL8MfslczvV qmShcY0VVJYMGbLn9kwlUVlk9ICre19owxysg8lWK0AsJXyx1KhP72Z87xiHCOm7/EeW LyOTH7nEI6tAcZMWtfkY3lZhQ63c7FAt/LkU7lpSsUsAU1VJVkRAOBOdJWET6UhI7gvG 9aiFpivZ3KvLcRSHeryOdpXdTnKZC9Q3+cenet5eUmcTxZtNppsT3oX6abNcBYJ/Vjaz 3FwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710096474; x=1710701274; h=content-transfer-encoding:mime-version:user-agent:message-id:date :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=poEGt5wPxWOM6dDivLtUbM5lJQxb4abm7VmHBNvDaJY=; b=ZdC/McvSVByP34NWuDB51tRdzUXcF7GkW8e4oYXOE/PBq70eLBAXEn1ERrY0ryOVot odMq6/xvoEHsTaTHwEEqaa6EOVoNcphhSvz9EvRYc/+fen32X4mc+8dmoRbGtfpa7vWY AUFLytpIOo6ll2bGWoxRyIwOT5+ALlTNQ5Z3lwUmM7v4JnQ5hPxbb/8ar5uaj3KnSgox SUEMM+iixQwUXHlINGpyIgGxjWoyBvh01Q2luvX8vBkjfh4pwxJfFtLD/RUgLvb7wigX 25TSMIF18Ft69VFlxkGlPumuNWs5YmDviq1u40HrS/4tvQNOQdcI/Llu5v8KJtSb7NG6 Lr3A== X-Gm-Message-State: AOJu0YxOOAyPW1hCT/bzNabLX7GYs3XD1ppRQmDZ2KaiCfwfsI0y/DY9 cY9BlXuR2mtCFiKvmU09e+9CCZm4b8ltcNBkWr3NGDHCTlqBDkgp X-Google-Smtp-Source: AGHT+IGNJmvvk4Vp/d4I1adnlBHt8bP4VtE2t8+9mHjAng48B2jvh7Ta846gOhzmYjdrcVJmB/oOgw== X-Received: by 2002:ac8:5a0b:0:b0:42f:3096:c4d3 with SMTP id n11-20020ac85a0b000000b0042f3096c4d3mr7081014qta.20.1710096473891; Sun, 10 Mar 2024 11:47:53 -0700 (PDT) Original-Received: from t530.local ([2600:8806:a821:2b00::ec00]) by smtp.gmail.com with ESMTPSA id ju2-20020a05622aa04200b0042ef50235e7sm2025535qtb.47.2024.03.10.11.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Mar 2024 11:47:53 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::82c; envelope-from=tpeplt@gmail.com; helo=mail-qt1-x82c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 10 Mar 2024 22:46:17 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281448 Archived-At: Emacs Maintainers, The function =E2=80=98shortdoc-copy-function-as-kill=E2=80=99 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 =E2=80=98shortdoc-copy-function-as-kill=E2=80=99 copies the trailing parenthesis (that is, the =E2=80=98)=E2=80=99). So, for example in the shortdoc function summary for =E2=80=98buffer=E2=80=99, when point is in the item for =E2=80=98current-bu= ffer=E2=80=99, then =E2=80=98shortdoc-copy-function-as-kill=E2=80=99 (mapped to =E2=80=98w= =E2=80=99) will copy the text "current-buffer)", rather than the expected "current-buffer". The same error occurs for =E2=80=98point=E2=80=99, =E2=80=98point-min=E2=80=99, =E2=80=98point-max=E2=80=99, and so on. In the definition of =E2=80=98shortdoc-copy-function-as-kill=E2=80=99, 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 =E2=80=98when-let*=E2=80=99 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 " )"))))))... --