8

This keybinding was working on my Spacemacs with evil mode, org-mode, and ivy:

t   org-todo

and is listed in the Spacemacs bindings: http://spacemacs.org/layers/+emacs/org/README.html#key-bindings

Then it disappeared:

SPC h d b org-todo  (not listed here)
SPC h d f org-todo  (listed but *Help* page shows no binding)

So I reinstalled Spacemacs, but the key binding is still missing. Here is how I reinstalled Spacemaces:

delete .spacemacs file
restart Emacs
answered Spacemacs questions:
  What is your preferred editing style? vim
  What distribution of spacemacs would you like to start with? spacemacs
  What type of completion framework do you want? ivy
Emacs says: Skipping check for new version (reason: dotfile)
SPC f e d   (dotspacemacs-configuration-layers)
uncomment 'org' in .spacemacs dotspacemacs-configuration-layers and save
SPC f e R   (dotspacemacs/sync-configuration-layers)

Is that the correct way to reinstalled Spacemaces? I am new to Emacs so maybe I missed something.

This might be related: "<t> is undefined" error on first keypress

I am running Emacs 25.2.1, with Spacemacs, evil mode, org-mode, and ivy on Fedora 25.

UPDATE

I reopened my Emacs and 't' worked again. So 't' works intermittently.

I did the following in hopes of making 't' work consistently.

Open dotspacemacs-configuration-layers:

SPC f e d

Add this to ~/.spacemacs file, at top of defun dotspacemacs/user-config ():

;; Single key command execution when at beginning of a headline
(setq org-use-speed-commands t) ; ? speed-key opens Speed Keys help

and dotspacemacs/sync-configuration-layers:

SPC f e R

But typing '?' does not open Speed Keys help. 't' works, but it was working intermittently, so the above install may have effected nothing.

Is that the correct way to install speed keys?

Is there a list of other speed keys compatible with evil mode?

MORE QUESTIONS

Where in dotspacemacs-configuration-layers should the (setq org-use-speed-commands t) be pasted to? I put it in Add this to ~/.spacemacs file, at top of defun dotspacemacs/user-config ().

Does the 't' in (setq org-use-speed-commands t) only bind 't' to org-todo, or does it bind other commands as well?

The single-key bindings in http://spacemacs.org/layers/+emacs/org/README.html#tree all work for Spacemacs evil mode, except that H and L are bound to evil-window-top and evil-window-bottom respectively.

Most of bindings from http://notesyoujustmightwanttosave.blogspot.com/2011/12/org-speed-keys.html would conflict with evil mode, but probably work with holy mode.

Pressing '?' does not list anything.

FINAL_UPDATE

t (org-todo) has been working for over a week now. Apparently it was fixed by the issue Jon linked to.

As Kaushal Modi, Alexandro de Oliveira, and Jon suggested, I am NOT using speed keys because I am using Evil-mode.

1
  • If you are using Evil mode the speed keys is not a suitable choice. There are other options to optimize your workflow with Org-mode. Commented Jun 10, 2017 at 19:26

4 Answers 4

5

If you're using the Spacemacs develop branch with vim editing style, then apparently t has been removed as a normal-mode keybinding for org-mode (see this issue). To get it back, you can set this variable in your .spacemacs:

(setq evil-org-key-theme '(textobjects navigation additional insert todo))

You'll probably want to remove the org-speed-keys settings, since they don't really apply (and could conflict) with evil-mode (vim style) bindings.

17

You're referring to the org-mode speed commands. They are not well documented.

Org-mode speed commands, also called speed keys, are single-key keybindings that perform actions on org-mode subtrees (or navigate between them). Speed commands are enabled when the cursor is placed on the first asterisk in an org-mode heading:

org-mode speed command position

You should also ensure that the variable org-use-speed-commands is non-nil:

(setq org-use-speed-commands t)

If you place your cursor at the beginning of an org-mode heading as shown above and then press t, it will call org-todo. There are other commands available and you can also define your own.

You can see a list of available speed commands by pressing ?.

Here are the speed commands that are enabled by default:

Outline Navigation

n Jump to the next visible outline heading
p Jump to the previous visible outline heading
f Jump to the next same-level heading (i.e. the next heading preceded by the same number of stars as the current one)
b Jump to the previous same-level heading
u Go up one level: Jump to the closest previous heading one-level higher in your outline

Outline Visibility

c Cycle visibility of the structure below the current headline
C Cycle visibility of the entire buffer / outline structure

Outline Structure Editing

U Move current headline up
D Move current headline down
r Demote current headline
l Promote current headline
R Demote current headline, including subtree
L Promote current headline, including subtree
i Insert a new same-level heading below the current subtree
^ Sort the children of the current subtree; this will bring up a list of sorting parameters to choose from
w Refile the current subtree: Move the current subtree to a different heading
. Mark the current subtree

Clock Commands

I Clock in to the task defined by the current headline
O Clock out of the task defined by the current headline

Meta Data Editing

t Cycle through available TODO states
0 Erase priority cookie of current headline
1 Set priority of current headline to [#A]
2 Set priority of current headline to [#B]
3 Set priority of current headline to [#C]
; Set tags for current headline

Agenda

v Bring up the agenda

Misc

< Set restrictions lock: limits all agendas to headings from the selected subtree
> Remove the restriction lock
o If the current headline contains a link, open it
? Get a list of all Speed Keys (default and user-defined) currently available

Source: Org Speed Keys | scratch and org-speed-command-help

3
  • Thanks incandescentman. I could have never figured that out on my own. I added an UPDATE to the answer. Is there a list of other speed keys available in Spacemacs?
    – wolfv
    Commented Jun 6, 2017 at 8:50
  • 1
    Yes, the speed commands available in Spacemacs are listed in the documentation about org-mode keybindings under the confusing header Tree. Here you go: spacemacs.org/layers/+emacs/org/README.html#tree. You can also get a list of available speed commands by placing the cursor at the beginning of an org-mode heading and pressing ?. Commented Jun 6, 2017 at 19:03
  • Speed keys are starting to make more sense. Just a few MORE QUESTIONS appended to end of the main question. Thanks.
    – wolfv
    Commented Jun 6, 2017 at 22:27
7

Do M-x org-speed-command-help.. it will print a well-formatted list of the default and user-defined Org Speed commands.

Here's a little snapshot: enter image description here


Update (2017/06/07)

The Speed Keys section of the Org Info manual has now been updated with the reference to org-speed-command-help, in the maint branch. That update will show up in the next update of org from Melpa or Org Elpa (usually updated on each Monday).

4
  • My Emacs install does not have org-speed-command-help. I am running Emacs 25.2.1, with Spacemacs, evil mode, org-mode, and ivy on Linux.
    – wolfv
    Commented Jun 7, 2017 at 22:48
  • @user2867994 The version of org-mode that ships with emacs 25.2.1 is too old. I would suggest that you update to the latest stable version available via Melpa or Org Elpa. Commented Jun 7, 2017 at 23:02
  • My .spacemacs file was broken, now it's fixed and org-speed-command-help works as advertised. Very nice. Unfortunately stackexchange only allows one "accept this answer".
    – wolfv
    Commented Jun 8, 2017 at 4:43
  • @user2867994 Glad you got it resolved. I didn't care to check which org version introduced this function, but I knew that this wasn't a very new feature either. Of course, there can be only one answer, the answer that you eventually adopt. You can change the accepted answer any time you like. Commented Jun 8, 2017 at 9:43
2

Where in dotspacemacs-configuration-layers should the (setq org-use-speed-commands t) be pasted to?

Declare it as a layer configuration variable where you usually define any layer variable, as follows:

(defun dotspacemacs/layers ()
  (setq-default
   dotspacemacs-configuration-layers
   '(
     ...
     (org :variables
          org-use-speed-commands t)
          )))

The reload your dotfile with SPC f e R and check the configuration/bindings with:

M-x org-speed-command-help RET

Does the 't' in (setq org-use-speed-commands t) only bind 't' to org-todo, or does it bind other commands as well?

  • As an org variables it shoul works only on org-mode.

Most of bindings from http://notesyoujustmightwanttosave.blogspot.com/2011/12/org-speed-keys.html would conflict with evil mode, but probably work with holy mode.

  • That's true! If are using Spacemacs with Evil mode(Vim style) using org speed keys will conflict with a lot of Evil mode keys.

In my opinion you are better off using the shortcuts already provided in Evil mode.

For example, there are a lot of speed keys after pressing ,(comma) and g like:

g l (org-next-visible-heading)

g j (org-forward-heading-same-level)

...

, I (org-clock-in)

, O (org-clock-out)

...

etc...

Suggestion: if you are using Evil-mode/Vim Style type g or ,(comma), see the options shown in which-key, practice them and forget about org speed keys which is just useful for those using Emacs keybinding style.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.