From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: goncholden Newsgroups: gmane.emacs.help Subject: Re: Functions in bash do not always show in speedbar. Date: Thu, 26 May 2022 11:17:20 +0000 Message-ID: <8vmQtzomzVrcULIOTdXJl9e4icggxUJiTNcxaTqtDhDVu8c2GnEJakYxQAa70FT-cIpYaiH5rwZpcoCaDX_unYQlWxfyLwVchdm-XInWqX4=@protonmail.com> References: <874k5bcnl6.fsf@laposte.net> Reply-To: goncholden Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16675"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Kevin Vigouroux Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 26 14:03:21 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nuCD3-00043h-8J for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 26 May 2022 14:03:21 +0200 Original-Received: from localhost ([::1]:35888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuCD1-0005st-Mo for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 26 May 2022 08:03:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuBUj-0000BB-2I for help-gnu-emacs@gnu.org; Thu, 26 May 2022 07:17:36 -0400 Original-Received: from mail-40140.protonmail.ch ([185.70.40.140]:13622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuBUg-0005zE-6q for help-gnu-emacs@gnu.org; Thu, 26 May 2022 07:17:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1653563847; x=1653823047; bh=M11NUGKv8OjEat9ppOZ/tpCO3OEs8pgn6Xu3y/GGD7k=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=QeLfWn28pzD8zmE9gJ/mieqzAb8GrDeQllIwMnxgmHwsZa3aLIYr+GyWS89l7z55f fadB343x0VCHPNy9CTusfZLwy/nuo+STl5pZOTickKCVvMfEKxOKPcpq/TfEtpDKOT 35dVVOsQ/+tK0hh7QI/2kNStCj/VdcZQEVMxcPgObyt7H1Q9xcjJBot79IbcQdd+Bk Ouf6Jwzce6KZU88qKRuVWmKrnvoG+arcQUvD4WtTrZh+MxaJc7ugH5/lJCYx6sB/ru QQveMTpkEsNeH6vzfR6og0SDHVJ2rSF5vcGTPkl4/NF6c/mh49mKEvbRklPZRRNk1q gff1GiNr25Xgw== In-Reply-To: <874k5bcnl6.fsf@laposte.net> Feedback-ID: 43053548:user:proton Received-SPF: pass client-ip=185.70.40.140; envelope-from=goncholden@protonmail.com; helo=mail-40140.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:137412 Archived-At: I have included a fem examples of the misbehaving functions that do not sho= w 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=3D0 case $1 in ("-V"|"--version") local -r etdate=3D"V01 Jul 2021 Wk27" return 0 ;; ("-h"|"--help") echo "Set aliases for utilities." return 0 ;; ("-e"|"--exec") exec_rc=3D1 ; shift ;; # ................. (*) echo "Invoke \`linge-cmd-util -h' for details." esac if (( exec_rc =3D=3D 1 )); then # recursive listing of directories and files # list directories only with display depth `-L LEVEL` alias tdl=3D'tree -d -L' # --------------------------------------------------- alias ld=3D'ls -d */' # list directories alias ll=3D'ls -alF' alias la=3D'ls -A' alias l=3D'ls -CF' alias lt=3D'ls -lt' # sort by date alias lx=3D'ls -lXB' # sort by extension alias la=3D'ls -A' alias la=3D'ls -aF' # List all and file types alias ll=3D'ls -alF' alias ll=3D'ls -lF' # List style alias lr=3D'ls -lR' # recursive ls alias ltr=3D'ls -ltr' # sort by date recursively alias lcr=3D'ls -lcr' # sort by change time alias lur=3D'ls -lur' # sort by access time alias lsr=3D'ls -lSr' # sort by size # --------------------------------------------------- # remove each given file alias rmi=3D'rm -i' # prompt before every removal alias rmf=3D'rm -f' # ignore non-existent files, never prompt # view text files, `less' does not read entire file before display alias l=3D'less' # faster than `more' with backward movement alias m=3D'more' # reads entire file before display fi } opcon-dirpaths () { local exec_rc=3D0 case $1 in ("-V"|"--version") local -r etdate=3D"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=3D1 ; shift ;; # ................. (*) echo "Invoke \`linge-action -h' for details." esac # case ends here # -------------------------------- # Set shortcuts to specific directories if (( exec_rc =3D=3D 1 )); then alias agenda=3D${HOME}/Agenda alias gnupa=3D${HOME}/ActiveJobs/Books/Infocs/Gnupa alias tdr=3D${HOME}/ActiveJobs/Reports/Tdr alias tdrdev=3D${HOME}/05-Development alias hagbard=3D'echo agenda gnupa tdrdev' fi } ------- Original Message ------- On Monday, February 7th, 2022 at 4:22 PM, Kevin Vigouroux via Users list fo= r the GNU Emacs text editor 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. I= s there some setup I can do > > > for them to show up? > > > Note that `speedbar-supported-extension-expressions' may not match the > =E2=80=9C.sh=E2=80=9D 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=E2=80=99s index based on the new c= ontents > by invoking the =E2=80=98Rescan=E2=80=99 item in the menu. Rescanning hap= pens > automatically if you set =E2=80=98imenu-auto-rescan=E2=80=99 to a non-= =E2=80=98nil=E2=80=99 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