all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: goncholden <goncholden@protonmail.com>
To: Kevin Vigouroux <ke.vigouroux@laposte.net>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Functions in bash do not always show in speedbar.
Date: Thu, 26 May 2022 11:17:20 +0000	[thread overview]
Message-ID: <8vmQtzomzVrcULIOTdXJl9e4icggxUJiTNcxaTqtDhDVu8c2GnEJakYxQAa70FT-cIpYaiH5rwZpcoCaDX_unYQlWxfyLwVchdm-XInWqX4=@protonmail.com> (raw)
In-Reply-To: <874k5bcnl6.fsf@laposte.net>

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



      reply	other threads:[~2022-05-26 11:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='8vmQtzomzVrcULIOTdXJl9e4icggxUJiTNcxaTqtDhDVu8c2GnEJakYxQAa70FT-cIpYaiH5rwZpcoCaDX_unYQlWxfyLwVchdm-XInWqX4=@protonmail.com' \
    --to=goncholden@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=ke.vigouroux@laposte.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.