[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] OS X quick-access to Emacs

From: Ken Mankoff
Subject: Re: [O] OS X quick-access to Emacs
Date: Fri, 18 Mar 2016 16:50:33 -0400
User-agent: mu4e 0.9.17; emacs 24.5.1

On 2016-03-15 at 10:55, Ken Mankoff <address@hidden> 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 Org 
files from the OS X Menu Bar. Each file is a menu item, and each top-level 
header is a sub-menu under the file. Clicking on one raises it in a new emacs 
client with the cursor positioned at the heading.


cd ~/Org
if [ "$#" -eq 2 ]; then     # called with param1 and param2
    emacsclient +$2 $1 &    # open file at line number of heading
echo '🐴'
echo "---";
for v in *.org; do
    echo ${v%.*}                          # filename as menu
    for h in `grep -n "^\*\ .*" $v`; do
        n=`echo $h | cut -d":" -f1`
        hh=`echo $h | cut -d":" -f2 | cut -c3-`
        echo "-- $hh | bash=$0 param1=$v param2=$n terminal=false"
        # ^ headers as submenus

reply via email to

[Prev in Thread] Current Thread [Next in Thread]