From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#21477: 24.4; Imenu - improper parse of shell function names Date: Tue, 11 Aug 2020 21:15:38 -0700 Message-ID: References: <55F6D62E02050314003904F5_0_77779@p057> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23968"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 21477@debbugs.gnu.org To: "Matthew Persico (BLOOMBERG/ 731 LEX)" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 12 06:16:11 2020 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 1k5iBP-0006A9-JJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Aug 2020 06:16:11 +0200 Original-Received: from localhost ([::1]:43966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k5iBO-0002sg-JC for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Aug 2020 00:16:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5iBG-0002s2-JV for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 00:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59254) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k5iBG-0003S2-AP for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 00:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k5iBG-00076R-2U for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 00:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Aug 2020 04:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21477 X-GNU-PR-Package: emacs Original-Received: via spool by 21477-submit@debbugs.gnu.org id=B21477.159720574527273 (code B ref 21477); Wed, 12 Aug 2020 04:16:02 +0000 Original-Received: (at 21477) by debbugs.gnu.org; 12 Aug 2020 04:15:45 +0000 Original-Received: from localhost ([127.0.0.1]:42567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5iAz-00075k-Jx for submit@debbugs.gnu.org; Wed, 12 Aug 2020 00:15:45 -0400 Original-Received: from mail-yb1-f196.google.com ([209.85.219.196]:39521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5iAy-00075N-2m for 21477@debbugs.gnu.org; Wed, 12 Aug 2020 00:15:44 -0400 Original-Received: by mail-yb1-f196.google.com with SMTP id q16so648873ybk.6 for <21477@debbugs.gnu.org>; Tue, 11 Aug 2020 21:15:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=XLRQS1Yqiwdxpj6EIco3UIqDI/v18wRe2gjWnLH1Btg=; b=dgdcabC2Cte2tuIknJ4XOmMovkFijj/3lOtXHTnRe4ShQQ2IgM58OyhZitWP32mbDj 3Ya4yZRZiHu4m5FvUxd104INxYpFeZmIvrdx87CBcrlxQ0NOfuMF90+ItAVxhDJ95iXR 7YUm1P3SZ/exKjnwGVN6hMnrt6RBA3GMnDVYGN8/IUcKHjoLvhJwlfHNPAfdI70pdIVd HjUoYVNSTZI3vTmeUENSuexSC1d7hkrsELlFwUqUyIvK9quQPCRiQ50aYejtfMUpljPb PrMTs36hdF0ph3Qcr8vNhEaCRq5um5Rm3a/MPlcCBa9Cu6EIXQBgVL9yWfJbqdX+U6oc fnog== X-Gm-Message-State: AOAM530vdME2cPZ5uLnQ1PPOVP47lcySxzCueRcww+jHLStE6+n8y0I8 VZuHgIdy6IwG2aidd+ShWKqlA3A7Bw04hWVn28Q= X-Google-Smtp-Source: ABdhPJyQJg1CEWbe12Mry5RVMUcvpPLFGUvPeon8/gfsrmqMjk45MgsQXG3porn/4vLE/UOYOvHp+A6V6/au+/O45z8= X-Received: by 2002:a25:b290:: with SMTP id k16mr22038885ybj.389.1597205738684; Tue, 11 Aug 2020 21:15:38 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 11 Aug 2020 21:15:38 -0700 In-Reply-To: <55F6D62E02050314003904F5_0_77779@p057> (Matthew Persico's message of "Mon, 14 Sep 2015 14:14:06 -0000") 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" Xref: news.gmane.io gmane.emacs.bugs:184746 Archived-At: tags 21477 + moreinfo thanks "Matthew Persico (BLOOMBERG/ 731 LEX)" writes: > 1) Create a file with this text: > # -*- sh -*- > this_is_parsed () > { > echo 1 > } > > function this_is_also_parsed > { > echo 1 > } > > this-is-not-parsed () > { > echo 1 > } > > function this-is-also-not-parsed > { > echo 1 > } > > 2) Load it into emacs that has imenu. > > 3) Look for functions in the imenu list. Only the ones with '_' show up. The ones with '-' do not. I can reproduce this behaviour, but is it really a bug? Aren't the names with '-' invalid? The Bash Reference Manual says: name A word consisting solely of letters, numbers, and underscores, and beginning with a letter or underscore. Names are used as shell variable and function names. Also referred to as an identifier. https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html Best regards, Stefan Kangas