emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ken Mankoff <mankoff-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "emacs-orgmode@gnu.org"
	<emacs-orgmode-mXXj517/zsQ@public.gmane.org>,
	mu-discuss <mu-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: OS X quick-access to Emacs
Date: Fri, 18 Mar 2016 16:50:33 -0400	[thread overview]
Message-ID: <m260wjik86.fsf@gmail.com> (raw)
In-Reply-To: <m27fh3u6y4.fsf-znviHmThZAxxLDvJzV1XNOtIE3FrmNSFT3ZHGVWHZibgpn9g0Uvcdg@public.gmane.org>


On 2016-03-15 at 10:55, Ken Mankoff <mankoff-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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.

  -k.




IFS=$'\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 '🐴'
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
    done
done

-- 
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 email to mu-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

      parent reply	other threads:[~2016-03-18 20:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15 14:55 OS X quick-access to Emacs Ken Mankoff
     [not found] ` <m27fh3u6y4.fsf-znviHmThZAxxLDvJzV1XNOtIE3FrmNSFT3ZHGVWHZibgpn9g0Uvcdg@public.gmane.org>
2016-03-18 20:50   ` Ken Mankoff [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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=m260wjik86.fsf@gmail.com \
    --to=mankoff-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    --cc=mu-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).