GNU bug report logs -
#52319
imenu not detecting every bash function
Previous Next
To reply to this bug, email your comments to 52319 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52319
; Package
emacs
.
(Sun, 05 Dec 2021 22:03:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
fatiparty <at> tutanota.com
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 05 Dec 2021 22:03:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]
[linge-copy.sh (application/x-shellscript, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52319
; Package
emacs
.
(Sun, 05 Dec 2021 22:49:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 52319 <at> debbugs.gnu.org (full text, mbox):
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).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52319
; Package
emacs
.
(Wed, 08 Dec 2021 09:28:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 52319 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Dec 5, 2021, 22:48 by bug-gnu-emacs <at> gnu.org:
> 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).
>
It would help me a lot if I can see all supported bash function names in the speedbar.
Currently this is slowing me down when going through the code base.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52319
; Package
emacs
.
(Sat, 18 Dec 2021 22:41:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 52319 <at> debbugs.gnu.org (full text, mbox):
[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)]
Merged 52319 52928.
Request was from
Glenn Morris <rgm <at> fencepost.gnu.org>
to
control <at> debbugs.gnu.org
.
(Sat, 01 Jan 2022 20:38:01 GMT)
Full text and
rfc822 format available.
Forcibly Merged 21477 52319 52928.
Request was from
Glenn Morris <rgm <at> fencepost.gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 12 Jan 2022 02:09:01 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 191 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.