From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: OS X quick-access to Emacs Date: Fri, 18 Mar 2016 16:50:33 -0400 Message-ID: References: Reply-To: mu-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Sender: mu-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org In-reply-to: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: "emacs-orgmode@gnu.org" , mu-discuss List-Id: emacs-orgmode.gnu.org On 2016-03-15 at 10:55, Ken Mankoff wrote: > I've created a BitBar plugin for quick-access to Emacs, such as a new > *scratch* buffer or a new "Compose Email" buffer. I thought these > might be useful to others, hence this post. One last follow-up to this. The following script gives you quick-access to top-level headings in all Or= g files from the OS X Menu Bar. Each file is a menu item, and each top-leve= l header is a sub-menu under the file. Clicking on one raises it in a new e= macs client with the cursor positioned at the heading. -k. IFS=3D$'\n' cd ~/Org if [ "$#" -eq 2 ]; then # called with param1 and param2 emacsclient +$2 $1 & # open file at line number of heading exit fi echo '=F0=9F=90=B4' echo "---"; for v in *.org; do echo ${v%.*} # filename as menu for h in `grep -n "^\*\ .*" $v`; do n=3D`echo $h | cut -d":" -f1` hh=3D`echo $h | cut -d":" -f2 | cut -c3-` echo "-- $hh | bash=3D$0 param1=3D$v param2=3D$n terminal=3Dfalse" # ^ headers as submenus done done --=20 You received this message because you are subscribed to the Google Groups "= mu-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to mu-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout.