emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Oleh <ohwoeowho@gmail.com>
To: Giacomo M <jackjackk@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Get to next NEXT headline with one key
Date: Fri, 7 Mar 2014 15:44:02 +0100	[thread overview]
Message-ID: <CAA01p3phM7P6UfKg9KRyJu_E-7N4ufKqzf4BMxMgySu-nHzb3w@mail.gmail.com> (raw)
In-Reply-To: <CA+GKSr4kQ6hVuiDuJm-eGGN_bMHofN5+jW5o1Mohk1We1p-OjQ@mail.gmail.com>

Hi Giacomo,

> Sorry for having been ambiguous, I meant the next headline with a "NEXT"
> todo keyword.

If you're feeling adventurous, you can try my new minor mode:
https://github.com/abo-abo/worf.

It's basically the same thing as speed commands, except it's got
different keys and different commands.
And commands work from start of #+... as well.

Here's how I've implemented the functionality that you want:

"j"/"k" are bound move down/up just like in vim, but they move by
headings or #+ markers.
But "K" can change their behavior temporarily: it will prompt you for
a char that corresponds to a keyword:
t - TODO
d - DONE
n - NEXT
c - CANCELLED

After a keyword is set, "j"/"k" will move by this keyword instead,
until any command other than "j"/"k" is issued (for instance "m",
which reveals heading). After that "j"/"k" will return to their
regular behavior.

As an example:

    So to move to the next NEXT, you can issue "Knj".
    One NEXT down after this: "j".
    Five NEXTs down: "5j".
    Back to the first NEXT: "6k".

Same thing, but with DONE:

    So to move to the next DONE, you can issue "Kdj".
    One DONE down after this: "j".
    Five NEXTs down: "5j".
    Back to the first DONE: "6k".

And if you're trying out the mode, make sure to try "g" and "h" - those
are my two favorites. `helm` and `ace-jump-mode` respectively are required
in order for these commands to work. I'm planning to add the package to MELPA,
so the dependencies would be downloaded automatically, but I don't want to add
it until I've assigned all the alphanumeric keys:)

regards,
Oleh

  parent reply	other threads:[~2014-03-07 14:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07 12:13 Get to next NEXT headline with one key Giacomo M
2014-03-07 12:37 ` John Kitchin
2014-03-07 12:44   ` Giacomo M
2014-03-07 13:54     ` Matt Lundin
2014-03-07 14:28       ` Giacomo M
2014-03-07 14:44     ` Oleh [this message]
2014-03-07 16:23       ` Giacomo M
2014-03-09 12:39         ` Oleh

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=CAA01p3phM7P6UfKg9KRyJu_E-7N4ufKqzf4BMxMgySu-nHzb3w@mail.gmail.com \
    --to=ohwoeowho@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jackjackk@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).