* bug#52319: imenu not detecting every bash function
@ 2021-12-05 21:58 fatiparty--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-05 22:48 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <m1k0gieki9.fsf@yahoo.es-MqBmNpQ----2>
0 siblings, 2 replies; 4+ messages in thread
From: fatiparty--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-12-05 21:58 UTC (permalink / raw)
To: 52319
[-- Attachment #1.1: Type: text/plain, Size: 258 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 509 bytes --]
[-- Attachment #2: linge-copy.sh --]
[-- Type: application/x-shellscript, Size: 67228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#52319: imenu not detecting every bash function
2021-12-05 21:58 bug#52319: imenu not detecting every bash function fatiparty--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-12-05 22:48 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-18 20:13 ` fatiparty--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <m1k0gieki9.fsf@yahoo.es-MqBmNpQ----2>
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-12-05 22:48 UTC (permalink / raw)
To: 52319; +Cc: fatiparty
fatiparty--- via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@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).
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#52319: imenu not detecting every bash function
[not found] ` <m1k0gieki9.fsf@yahoo.es-MqBmNpQ----2>
@ 2021-12-08 7:29 ` fatiparty--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 4+ messages in thread
From: fatiparty--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-12-08 7:29 UTC (permalink / raw)
To: Daniel Martín; +Cc: 52319
[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]
Dec 5, 2021, 22:48 by bug-gnu-emacs@gnu.org:
> fatiparty--- via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs@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.
[-- Attachment #2: Type: text/html, Size: 1833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#52319: imenu not detecting every bash function
2021-12-05 22:48 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-12-18 20:13 ` fatiparty--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 4+ messages in thread
From: fatiparty--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-12-18 20:13 UTC (permalink / raw)
To: Daniel Martín; +Cc: 52319
[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]
No updates on this yet?
Dec 6, 2021, 10:48 by mardani29@yahoo.es:
> fatiparty--- via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs@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).
>
[-- Attachment #2: Type: text/html, Size: 1697 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-18 20:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-05 21:58 bug#52319: imenu not detecting every bash function fatiparty--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-05 22:48 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-18 20:13 ` fatiparty--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <m1k0gieki9.fsf@yahoo.es-MqBmNpQ----2>
2021-12-08 7:29 ` fatiparty--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.