From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Cherti Newsgroups: gmane.emacs.devel Subject: Re: Suggestion of enhancement by adding a hyphen to sh-imenu-generic-expression Date: Sun, 24 Nov 2024 12:21:04 -0500 Message-ID: References: <183cd0f5-4d8d-401d-8a27-503ee4061cb1@jamescherti.com> <86h67xj7f0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------lvGFbLDJxTsYi5bvKn5hAoAe" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2567"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 24 18:22:05 2024 Return-path: Envelope-to: ged-emacs-devel@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 1tFGJA-0000Ww-Ho for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Nov 2024 18:22:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFGIP-0001IB-CY; Sun, 24 Nov 2024 12:21:17 -0500 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 1tFGIO-0001I3-BJ for emacs-devel@gnu.org; Sun, 24 Nov 2024 12:21:16 -0500 Original-Received: from fly.ash.relay.mailchannels.net ([23.83.222.61]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFGIM-0006tD-EU; Sun, 24 Nov 2024 12:21:16 -0500 X-Sender-Id: dreamhost|x-authsender|contact@jamescherti.com Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id E2285843F78; Sun, 24 Nov 2024 17:21:10 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a316.dreamhost.com (trex-1.trex.outbound.svc.cluster.local [100.124.131.42]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 7BECD843ED8; Sun, 24 Nov 2024 17:21:10 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1732468870; a=rsa-sha256; cv=none; b=RhUCd0fkzpX1G5jWGVCLKZb5X4va+ASQeM8bywkfmPCC7QXkx9E4xGD9xAhUuKWsIn31rP tv1wV5RarR7q0SQhEh7N2udXzipw2FglNQLjzvm057BoTzZ2nWF5BLuJ2773nvWdLOjR0U oJeRp+Q/CjYHYRnQj+5iQp5Q8ZQ98/vH3vKEWX73a20Ky1j/gCLXvgEZbolx/g9i9UZBar 5biq2x/pVmdQU4zAz3JHVvYxupQShg3/qkVgGHN0ohj1FzdoACupi8yf+f8gtHLTwFj2TV wguEHni0h3pig4MXac5tHBQh/ZOV6Xw8u+h0hjU/JQC42TTawdq8TvRKxmlmFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1732468870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=d2R4UzGNKJRhYCupv+bBRY4NUs+L8aQxbeZNB5EROns=; b=msJ7awWNL899C1gpwois+YbNcSch/v3GVd4nzvKc/TNAvUyXsfGl3FIJIsTxAam65XLIFb LJDOP42BtQ2R/tAnW4qsvMnEXjGFrrwAaJ4gpoWa4Q5e8bwEvJj3v6Qfqdd2TqbOOMKYnR hNzi20jLp6RxcwYCWb8+MPewFc0fiOL4KzUePy84a4Tv/Ji1sB13DiikYShXg6eGgykgdT f0jcGYMPOryhOdfskNbxgnbJ4fPceGbgXT+eUXY8bA+vkfOT6I+bfSE+13zfmCbL3uP3c5 anu1SC5QxrA+auRGJeFATDYDe+ui/e/cnvi1y/cl2+VzEmCcJ6g/mpgm+P6AWg== ARC-Authentication-Results: i=1; rspamd-868968d99d-k88tk; auth=pass smtp.auth=dreamhost smtp.mailfrom=contact@jamescherti.com X-Sender-Id: dreamhost|x-authsender|contact@jamescherti.com X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|contact@jamescherti.com X-MailChannels-Auth-Id: dreamhost X-Supply-Trouble: 447dbebf37bf957d_1732468870719_3806939908 X-MC-Loop-Signature: 1732468870719:322288579 X-MC-Ingress-Time: 1732468870719 Original-Received: from pdx1-sub0-mail-a316.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.124.131.42 (trex/7.0.2); Sun, 24 Nov 2024 17:21:10 +0000 Original-Received: from [192.168.5.23] (bras-base-toroon0648w-grc-39-184-146-163-190.dsl.bell.ca [184.146.163.190]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: contact@jamescherti.com) by pdx1-sub0-mail-a316.dreamhost.com (Postfix) with ESMTPSA id 4XxFx20PRnzn2; Sun, 24 Nov 2024 09:21:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jamescherti.com; s=dreamhost; t=1732468870; bh=d2R4UzGNKJRhYCupv+bBRY4NUs+L8aQxbeZNB5EROns=; h=Content-Type:Date:From:Subject:To:Cc; b=l39qLBiVlo8ja5hXYkkI1I9QSz8UjkMRbntsWeJmIyVIpuqsJai6OIGq6Z9sxRJGX ZKGP5W/LOz1cfRXr+bMZ7dn5zKB0gE68VZdqLnGAwrpme2mrESGzCPFQ9kOkNZj09c hGgOmQd3L+gn3GYtKHGQQkzeLgpOYCbO5cORNqePMclb7jju08km3HNZ02YwpbQIjQ DEVomUY+W6d8CVHP4r6fRFoUJ/6o2yGtQUQ57DnaTo97qgYu7ho2uL6nYqiKXG/99N jlLDwguBrWJOJGSX9Vy36ARQZ9EW4b1Nc4ZCSI0dFtWWBrlMKXrnYNa4tvVfI1hsEd Gs/bSWaEYORpg== Content-Language: en-US In-Reply-To: <86h67xj7f0.fsf@gnu.org> Received-SPF: pass client-ip=23.83.222.61; envelope-from=contact@jamescherti.com; helo=fly.ash.relay.mailchannels.net 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325670 Archived-At: This is a multi-part message in MIME format. --------------lvGFbLDJxTsYi5bvKn5hAoAe Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello Eli, Attached is the patch you requested for sh-script.el. The patch enables the use of hyphens in Bash function names by adding a regular expression for Bash to `sh-imenu-generic-expression`. -- James Cherti GitHub: https://github.com/jamescherti Website: https://www.jamescherti.com/ On 2024-11-24 04:41, Eli Zaretskii wrote: >> Date: Sat, 23 Nov 2024 16:04:17 -0500 >> From: James Cherti >> >> Hello, >> >> While editing a Bash shell script today, I discovered that imenu does >> not include functions with hyphens in their names. >> >> While it is true that sh does not allow hyphens in function names, Bash >> does permit them. >> >> My suggestion is to add a hyphen '-' to the sh-imenu-generic-expression >> (sh-script.el) regular expression to make imenu include these functions, > > Would you like to submit a patch along these lines? > > Thanks. --------------lvGFbLDJxTsYi5bvKn5hAoAe Content-Type: text/x-patch; charset=UTF-8; name="bash-imenu-hyphen.patch" Content-Disposition: attachment; filename="bash-imenu-hyphen.patch" Content-Transfer-Encoding: base64 RnJvbSA2ZjRkNDUzZTBlYWZlMWUwODFkN2YxZGJlZjdkMTI4NDk3ODQwZGMwIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKYW1lcyBDaGVydGkgPGNvbnRhY3RAamFtZXNjaGVy dGkuY29tPgpEYXRlOiBTdW4sIDI0IE5vdiAyMDI0IDEyOjA5OjMzIC0wNTAwClN1YmplY3Q6 IFtQQVRDSF0gQWRkIGh5cGhlbiB0byBCYXNoIGZ1bmN0aW9uIG5hbWVzIGluCiBgc2gtaW1l bnUtZ2VuZXJpYy1leHByZXNzaW9uYAoKLS0tCiBsaXNwL3Byb2dtb2Rlcy9zaC1zY3JpcHQu ZWwgfCAxMiArKysrKysrKysrKysKIDEgZmlsZSBjaGFuZ2VkLCAxMiBpbnNlcnRpb25zKCsp CgpkaWZmIC0tZ2l0IGEvbGlzcC9wcm9nbW9kZXMvc2gtc2NyaXB0LmVsIGIvbGlzcC9wcm9n bW9kZXMvc2gtc2NyaXB0LmVsCmluZGV4IDhiYTY0MTAwMjAzLi4wNGQ5OTVkMDQwNCAxMDA2 NDQKLS0tIGEvbGlzcC9wcm9nbW9kZXMvc2gtc2NyaXB0LmVsCisrKyBiL2xpc3AvcHJvZ21v ZGVzL3NoLXNjcmlwdC5lbApAQCAtMzAwLDYgKzMwMCwxOCBAQCBzaC1pbWVudS1nZW5lcmlj LWV4cHJlc3Npb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