justinbarclay / elegant-agenda-mode

My only agenda is to be more elegant.
GNU Affero General Public License v3.0
55 stars 3 forks source link

Lisp error: void-function nil #3

Closed robstewart57 closed 3 years ago

robstewart57 commented 3 years ago

Hi,

I'm trying out elegant-agenda-mode from melpa.

(require 'elegant-agenda-mode)
(add-hook 'org-agenda-mode-hook elegant-agenda-mode)

When I run agenda-mode I get the following backtrace:

Debugger entered--Lisp error: (void-function nil)
  nil()
  run-hooks(change-major-mode-after-body-hook org-agenda-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook org-agenda-mode-hook))
  run-mode-hooks(org-agenda-mode-hook)
  apply(run-mode-hooks org-agenda-mode-hook)
  org-agenda-mode()
  org-agenda-prepare("TODO")
  org-todo-list(nil)
  funcall-interactively(org-todo-list nil)
  #<subr call-interactively>(org-todo-list)
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> org-todo-list)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> org-todo-list)
  call-interactively(org-todo-list)
  org-agenda(nil)
  funcall-interactively(org-agenda nil)
  #<subr call-interactively>(org-agenda record nil)
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> org-agenda record nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (org-agenda record nil))
  call-interactively(org-agenda record nil)
  command-execute(org-agenda record)
  execute-extended-command(nil "org-agenda" "org-agenda")
  funcall-interactively(execute-extended-command nil "org-agenda" "org-agenda")
  #<subr call-interactively>(execute-extended-command nil nil)
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> execute-extended-command nil nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (execute-extended-command nil nil))
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)
justinbarclay commented 3 years ago

Thanks for the issue :)

This made me check my docs and they are, like, way wrong. If the add-hook function call, you need to quote the symbol elegant-agenda-mode: 'elegant-agenda-mode

Or for ease of copying and pasting

  (require 'elegant-agenda-mode)
  (add-hook 'org-agenda-mode-hook 'elegant-agenda-mode)
justinbarclay commented 3 years ago

Hey, just checking in... have you had any luck resolving this?

robstewart57 commented 3 years ago

Hi @justinbarclay yes, this worked:

(require 'elegant-agenda-mode)
(add-hook 'org-agenda-mode-hook 'elegant-agenda-mode)

Thanks fort this mode!