GNU bug report logs - #52319
imenu not detecting every bash function

Previous Next

Package: emacs;

Reported by: fatiparty <at> tutanota.com

Date: Sun, 5 Dec 2021 22:03:02 UTC

Severity: normal

Merged with 21477, 52928, 54265, 56003, 57255, 58554

Found in version 24.4

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 52319 <at> debbugs.gnu.org (full text, mbox):

From: fatiparty <at> tutanota.com
To: Daniel Martín <mardani29 <at> yahoo.es>
Cc: 52319 <52319 <at> debbugs.gnu.org>
Subject: bug#52319: imenu not detecting every bash function
Date: Sat, 18 Dec 2021 21:13:34 +0100 (CET)
[Message part 1 (text/plain, inline)]
No updates on this yet?



Dec 6, 2021, 10:48 by mardani29 <at> yahoo.es:

> fatiparty--- via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs <at> gnu.org> writes:
>
>> I am loading the attached bash file but imenu is not showing all the
>> declared bash functions in the file, it only shows PF(), PFB(), PF2(),
>> and pfm.  This has also the consequence of not displaying all
>> functions in speedbar.
>>
>> File is attached.
>>
>> Fati
>>
>
> The problem lies in that some of the functions have a hyphen in their
> name (for example "linge-newline ()").  Something like "linge_newline
> ()" should be detected correctly.  If I'm not mistaken, POSIX requires
> that shell function names only contain alphanumeric characters or an
> underscore; support for hyphens could be a Bash extension.
>
> One way to fix the issue could be to extend the
> sh-imenu-generic-expression alist in sh-script.el with a specific regexp
> for bash that accounts for hyphens (and any other character that Bash
> may support in function names).
>

[Message part 2 (text/html, inline)]

This bug report was last modified 170 days ago.

Previous Next


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