1

I am doing a bit of keyboard rebinding and I have found that:

(org-todo "DONE")
(org-todo "TODO")
(org-todo "")

all work, but in the documentation, it says that I should be able to also use the symbols nextset and previousset as such:

(org-todo 'nextset)
(org-todo 'previousset)

I have searched the source code of org-mode.el and some of the require files too, but I cannot find the definition of nextset or previousset.

Below is my code:

(setq org-support-shift-select 'always)

(defun org-mode-todo-done-cycling-replacements ()
  (define-key org-mode-map (kbd "M-9") (lambda ()
                     (interactive)
                     (org-call-with-arg 'org-todo 'previousset)))
  (define-key org-mode-map (kbd "M-0") 'org-todo))

(add-hook 'org-mode-hook 'org-mode-todo-done-cycling-replacements)

M-0 works but M-9 does not.

Am I supposed to require a library before? (Org-mode version is 8.3.3).

2

If what you want is simply replace the keyword with the next one, (org-todo) does it.

org-todo-keyword can contain several sequences (or sets) of keywords:

org-todo-keywords is a variable defined in `org.el'. Its value is ((sequence "TODO" "DONE"))

Documentation: List of TODO entry keyword sequences and their interpretation. This is a list of sequences.

If I understand correctly, nextset and previousset are intended to select one of these sets. So in your example M-9 does work, it's just by default there's only one set of keywords.

nextset and previousset do not have to be defined anywhere, since they're just symbols.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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