* Functions in bash do not always show in speedbar.
@ 2022-02-07 2:37 goncholden via Users list for the GNU Emacs text editor
2022-02-07 3:35 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 4+ messages in thread
From: goncholden via Users list for the GNU Emacs text editor @ 2022-02-07 2:37 UTC (permalink / raw)
To: goncholden via Users list for the GNU Emacs text editor
Have noticed that functions in bash do not always show in speedbar. Is there some setup I can do
for them to show up? I am simply using
(add-to-list 'auto-mode-alist '("\\.sh\\'" . sh-mode))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Functions in bash do not always show in speedbar.
2022-02-07 2:37 Functions in bash do not always show in speedbar goncholden via Users list for the GNU Emacs text editor
@ 2022-02-07 3:35 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-02-07 4:22 ` Kevin Vigouroux via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-02-07 3:35 UTC (permalink / raw)
To: help-gnu-emacs
goncholden via Users list for the GNU Emacs text editor [2022-02-07 02:37:23] wrote:
> Have noticed that functions in bash do not always show in speedbar. Is there some setup I can do
> for them to show up?
M-x report-emacs-bug RET
and give enough details for someone else to reproduce the problem?
I strongly suspect that you can reduce the problem to:
emacs -q .../my/foo.sh
M-x imenu TAB
where the completions given after this TAB don't include some of the
functions you have in that `foo.sh`.
So trim the file down to just those functions and included it in your
bug report, so we can see what they look like.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Functions in bash do not always show in speedbar.
2022-02-07 3:35 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2022-02-07 4:22 ` Kevin Vigouroux via Users list for the GNU Emacs text editor
2022-05-26 11:17 ` goncholden
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Vigouroux via Users list for the GNU Emacs text editor @ 2022-02-07 4:22 UTC (permalink / raw)
To: help-gnu-emacs
Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> goncholden via Users list for the GNU Emacs text editor [2022-02-07 02:37:23] wrote:
>> Have noticed that functions in bash do not always show in speedbar. Is there some setup I can do
>> for them to show up?
Note that `speedbar-supported-extension-expressions' may not match the
“.sh” extension.
>
> M-x report-emacs-bug RET
>
> and give enough details for someone else to reproduce the problem?
> I strongly suspect that you can reduce the problem to:
>
> emacs -q .../my/foo.sh
> M-x imenu TAB
>
> where the completions given after this TAB don't include some of the
> functions you have in that `foo.sh`.
#+begin_quote
When you change the contents of a buffer, if you add or delete
definitions, you can update the buffer’s index based on the new contents
by invoking the ‘*Rescan*’ item in the menu. Rescanning happens
automatically if you set ‘imenu-auto-rescan’ to a non-‘nil’ value.
There is no need to rescan because of small changes in the text.
#+end_quote
> So trim the file down to just those functions and included it in your
> bug report, so we can see what they look like.
>
>
> Stefan
>
--
Kevin Vigouroux
Best regards
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Functions in bash do not always show in speedbar.
2022-02-07 4:22 ` Kevin Vigouroux via Users list for the GNU Emacs text editor
@ 2022-05-26 11:17 ` goncholden
0 siblings, 0 replies; 4+ messages in thread
From: goncholden @ 2022-05-26 11:17 UTC (permalink / raw)
To: Kevin Vigouroux; +Cc: help-gnu-emacs
I have included a fem examples of the misbehaving functions that do not show up in speedbar, so you can see what they look like.
Bash does allow functions to use a dash (-). But this is not reflected in speedbar.
coreutils-rehash ()
{
local exec_rc=0
case $1 in
("-V"|"--version")
local -r etdate="V01 Jul 2021 Wk27"
return 0
;;
("-h"|"--help")
echo "Set aliases for utilities."
return 0
;;
("-e"|"--exec") exec_rc=1 ; shift ;;
# .................
(*)
echo "Invoke \`linge-cmd-util -h' for details."
esac
if (( exec_rc == 1 )); then
# recursive listing of directories and files
# list directories only with display depth `-L LEVEL`
alias tdl='tree -d -L'
# ---------------------------------------------------
alias ld='ls -d */' # list directories
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias lt='ls -lt' # sort by date
alias lx='ls -lXB' # sort by extension
alias la='ls -A'
alias la='ls -aF' # List all and file types
alias ll='ls -alF'
alias ll='ls -lF' # List <dir> style
alias lr='ls -lR' # recursive ls
alias ltr='ls -ltr' # sort by date recursively
alias lcr='ls -lcr' # sort by change time
alias lur='ls -lur' # sort by access time
alias lsr='ls -lSr' # sort by size
# ---------------------------------------------------
# remove each given file
alias rmi='rm -i' # prompt before every removal
alias rmf='rm -f' # ignore non-existent files, never prompt
# view text files, `less' does not read entire file before display
alias l='less' # faster than `more' with backward movement
alias m='more' # reads entire file before display
fi
}
opcon-dirpaths ()
{
local exec_rc=0
case $1 in
("-V"|"--version")
local -r etdate="V01 Jul 2021 Wk27"
return 0
;;
("-h"|"--help")
echo "Set aliases for path locations.n"
echo " agenda: HOME/Agenda"
echo " gnupa: HOME/ActiveJobs/Books/Infocs/Gnupa"
echo " tdr: HOME/ActiveJobs/Reports/Tdr"
return 0
;;
# .................
("-e"|"--exec") exec_rc=1 ; shift ;;
# .................
(*)
echo "Invoke \`linge-action -h' for details."
esac # case ends here
# --------------------------------
# Set shortcuts to specific directories
if (( exec_rc == 1 )); then
alias agenda=${HOME}/Agenda
alias gnupa=${HOME}/ActiveJobs/Books/Infocs/Gnupa
alias tdr=${HOME}/ActiveJobs/Reports/Tdr
alias tdrdev=${HOME}/05-Development
alias hagbard='echo agenda gnupa tdrdev'
fi
}
------- Original Message -------
On Monday, February 7th, 2022 at 4:22 PM, Kevin Vigouroux via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> Stefan Monnier via Users list for the GNU Emacs text editor
> help-gnu-emacs@gnu.org writes:
>
> > goncholden via Users list for the GNU Emacs text editor [2022-02-07 02:37:23] wrote:
> >
> > > Have noticed that functions in bash do not always show in speedbar. Is there some setup I can do
> > > for them to show up?
>
>
> Note that `speedbar-supported-extension-expressions' may not match the
> “.sh” extension.
>
> > M-x report-emacs-bug RET
> >
> > and give enough details for someone else to reproduce the problem?
> > I strongly suspect that you can reduce the problem to:
> >
> > emacs -q .../my/foo.sh
> > M-x imenu TAB
> >
> > where the completions given after this TAB don't include some of the
> > functions you have in that `foo.sh`.
>
>
> #+begin_quote
> When you change the contents of a buffer, if you add or delete
> definitions, you can update the buffer’s index based on the new contents
> by invoking the ‘Rescan’ item in the menu. Rescanning happens
> automatically if you set ‘imenu-auto-rescan’ to a non-‘nil’ value.
> There is no need to rescan because of small changes in the text.
> #+end_quote
>
> > So trim the file down to just those functions and included it in your
> > bug report, so we can see what they look like.
> >
> > Stefan
>
> --
> Kevin Vigouroux
> Best regards
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-26 11:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-07 2:37 Functions in bash do not always show in speedbar goncholden via Users list for the GNU Emacs text editor
2022-02-07 3:35 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-02-07 4:22 ` Kevin Vigouroux via Users list for the GNU Emacs text editor
2022-05-26 11:17 ` goncholden
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.