Doom-emacs: Doom doesn't respect org-todo-keywords?

Created on 16 Apr 2020  Â·  1Comment  Â·  Source: hlissner/doom-emacs

What did you expect to happen?

I expect to open my org agenda and have it display items marked TODO, but not items marked CANCELED.

What actually happened?

It displays items marked CANCELED.

Additional details:

I think these are the relevant lines in my config:

(setq org-agenda-skip-scheduled-if-done t
         org-agenda-skip-deadline-if-done t
         org-todo-keywords '((sequence "TODO" "WAITING" "|" "DONE" "CANCELED"))
         org-todo-keywords-for-agenda '((sequence "TODO" "WAITING" "|" "DONE" "CANCELED"))
)
  • Include any warnings or errors logged to *Messages* (use M-x view-echo-area-messages to see it).

No relevant messages there, as far as I can tell.

I do, however, notice that org-todo-keywords-for-agenda gets set back to this after I run org-agenda. It has my custom value when it starts up, but after I run org-agenda, it gets set to this:

org-todo-keywords-for-agenda is a variable defined in ‘org.el’.
Its value is
("TODO" "PROJ" "STRT" "WAIT" "DONE" "KILL" "[ ]" "[-]" "[?]" "[X]" "FOUND" "READING" "CANCELED")

Steps to reproduce:

  1. Have items in your Org Agenda files that contain CANCELED items. Set org-agenda-skip-deadline-if-done and ...schedule-if-done.
  2. Open org-agenda
  3. Notice that you can see them.

System information:


jon@jon-laptop ~/.emacs.doom.d (develop)> ./bin/doom info
WARNING (:tools flycheck) module was moved to (:checkers syntax)
((emacs
(version . "26.3")
(features . "XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS GLIB NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD")
(build . "Apr 16, 2020")
(buildopts "--prefix=/nix/store/l0fqjrzdbhhdyh18jnqf34sr4zp6msqh-emacs-26.3 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200")
(windowsys . batch)
(daemonp . server-running))
(doom
(version . "2.0.9")
(build . "HEAD -> develop 1d6f0b3e4 2020-04-13 18:50:29 -0400")
(dir . "~/.doom.d/"))
(system
(type . gnu/linux)
(config . "x86_64-pc-linux-gnu")
(shell . "/run/current-system/sw/bin/fish")
(uname . "Linux 5.6.3 #1-NixOS SMP Wed Apr 8 07:11:10 UTC 2020 x86_64")
(path "/run/wrappers/bin" "~/.local/share/flatpak/exports/bin" "/var/lib/flatpak/exports/bin" "~/.nix-profile/bin" "/etc/profiles/per-user/jon/bin" "/nix/var/nix/profiles/default/bin" "/run/current-system/sw/bin" "/nix/store/l0fqjrzdbhhdyh18jnqf34sr4zp6msqh-emacs-26.3/libexec/emacs/26.3/x86_64-pc-linux-gnu"))
(config
(envfile . envvar-file)
(elc-files . 0)
(modules :completion company ivy :ui doom doom-dashboard doom-quit hl-todo modeline nav-flash ophints (popup +all +defaults) pretty-code treemacs unicode vc-gutter vi-tilde-fringe window-select workspaces :editor (evil +everywhere) file-templates fold multiple-cursors rotate-text snippets word-wrap :emacs dired electric ibuffer vc :term term :tools (eval +overlay) :checkers syntax :tools (lookup +docsets) magit :lang data emacs-lisp (haskell +intero) markdown nix (org +dragndrop +pandoc +pomodoro) python (sh +fish) :email (mu4e +gmail) :config (default +bindings +smartparens))
(packages (flycheck-vale) (evil-colemak-basics :recipe (:host github :repo "JonathanReeve/evil-colemak-basics")))
(unpin "n/a")
(elpa "s" "projectile-direnv" "projectile" "pkg-info" "epl" "direnv" "dash")))

invalid

Most helpful comment

You need to wrap your configuration in (after! X ...) blocks, where X is the name of the package you want to configure. In this case (after! org ...). Without this, your settings are evaluated too early (immediately), which are likely to be overwritten by Doom's own defaults. after! ensures the code runs after the package (and doom's defaults) are loaded.

The only exception are file and directory variables, like org-directory or org-attach-id-dir.

>All comments

You need to wrap your configuration in (after! X ...) blocks, where X is the name of the package you want to configure. In this case (after! org ...). Without this, your settings are evaluated too early (immediately), which are likely to be overwritten by Doom's own defaults. after! ensures the code runs after the package (and doom's defaults) are loaded.

The only exception are file and directory variables, like org-directory or org-attach-id-dir.

Was this page helpful?
0 / 5 - 0 ratings