emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Xebar Saram <zeltakc@gmail.com>
Cc: org mode <emacs-orgmode@gnu.org>
Subject: Re: multi letter agenda commands
Date: Sun, 11 Oct 2015 12:49:29 -0400	[thread overview]
Message-ID: <m28u79nyee.fsf@andrew.cmu.edu> (raw)
In-Reply-To: <CAOQHXPp+ceQvRA7da6YKfEiLoGV3wq5o+wf2KTcjOfxqdLCChg@mail.gmail.com>

I didn't try Eric's advice but it is probably a good idea ;)

This is pretty easy to do with a hydra menu. Here is a super simple
example. See https://github.com/abo-abo/hydra.

(defhydra hydra-agenda (:color red :hint nil)
  "Agenda hydra"
  ("fd" (org-tags-view nil "TODO=\"DONE\"") "DONE")
  ("ft" (org-tags-view nil "TODO=\"TODO\"") "TODO")
  ("fa" (org-tags-view nil "TODO=\"ASSIGNED\"") "ASSIGNED"))

This creates a command hydra-agenda/body that will give you a menu with
hints. I love hydras for this kind of thing.

Xebar Saram writes:

> Hi all
>
> im wondering if anyone knows a way (or if its possible at all) to have
> multi letter agenda commands, for example
>
> ("fc" "to cook"  tags "Cuisine=\"American\""
>           (
>          (org-agenda-files '("~/org/files/agenda/food.org"))
>     (org-agenda-sorting-strategy '(priority-down)) ;;  Sort by priority
> where priority goes first.
>
> )
> )
>
> ("fa" "to cook"  tags "Cuisine=\"Asian\""
>           (
>          (org-agenda-files '("~/org/files/agenda/food.org"))
>     (org-agenda-sorting-strategy '(priority-down)) ;;  Sort by priority
> where priority goes first.
>
> )
> )
>
> where i would press f then a or c to launch the appropriate agenda command
>
> thx so much
>
> Z

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

  parent reply	other threads:[~2015-10-11 16:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-11 16:00 multi letter agenda commands Xebar Saram
2015-10-11 16:04 ` Eric S Fraga
2015-10-11 16:49 ` John Kitchin [this message]
2015-10-11 17:34   ` Xebar Saram
2015-10-11 22:17     ` Subhan Michael Tindall
2015-10-21 21:28       ` Matt Lundin

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=m28u79nyee.fsf@andrew.cmu.edu \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=zeltakc@gmail.com \
    /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).