0

Running Doom Emacs 2.0.9 on emacs 27.1.

When I try org-agenda-schedule for a TODO in the agenda buffer, I get a weird message as follows:

Press key for agenda command:
apply: Wrong number of arguments: #[(arg &optional time) "ÆÇÈÉÊË%ˆÌ ˆÍÎ!ƒ&\0ƒ&\0Ï ƒ&\0ÐÑ Ò Ó    ÇÔ&‡ÕÖ× \"²†3\0Ø Ù
!Ú
!Û
!Ô'Ü
Ç\"ˆÔŠ‰ƒQ\0‰bˆnƒY\0Ý‚Z\0ÞßÝ`\"\\)²(p)rqˆ))Ô‰*+,-./01rqˆ~ˆ
bˆà 2\"')á
'â#ˆ3ƒó\0ã-r/qˆ))\"+ã,r.qˆ))\"*+„Ä\0*ƒó\0+ƒÒ\0r/qˆä ˆ)*ƒà\0r.qˆä ˆ)01/+.*¯4B4.åæ'\"-‡" [org-agenda-loop-over-headlines-in-active-region arg marker type buffer pos org-agenda-check-type t agenda todo ...] 8 ("/home/user/.emacs.d/.local/straight/build/org-mode/org-agenda.elc" . 346998) "P"], 0

On toggle-debug-on-error, it produced the following:

Debugger entered--Lisp error: (wrong-number-of-arguments #f(compiled-function (arg &optional time) (interactive "P") #<bytecode 0x157295f0b9b9>) 0)
  #f(compiled-function (arg &optional time) (interactive "P") #<bytecode 0x157295f0b9b9>)()
  apply(#f(compiled-function (arg &optional time) (interactive "P") #<bytecode 0x157295f0b9b9>) nil)
  org-agenda-schedule()
  funcall-interactively(org-agenda-schedule)
  call-interactively(org-agenda-schedule nil nil)
  command-execute(org-agenda-schedule)

After loading the uncompiled org-mode uncompiled C-u M-x org-reload the debugger output is as follows:

Debugger entered--Lisp error: (wrong-number-of-arguments (lambda (arg &optional time) "Schedule the item at point.\nARG is passed through ..." (interactive "P") (org-agenda-check-type t 'agenda 'todo 'tags 'search) (org-agenda-check-no-diary) (if (and (called-interactively-p 'any) org-agenda-loop-over-headlines-in-active-region (org-region-active-p)) (org-agenda-do-in-region (region-beginning) (region-end) #'org-agenda-schedule arg t nil) (let* ((marker (or (org-get-at-bol ...) (org-agenda-error))) (type (marker-insertion-type marker)) (buffer (marker-buffer marker)) (pos (marker-position marker)) ts) (set-marker-insertion-type marker t) (let ((--cline (org-current-line)) (--cmd this-command) (--buf1 (current-buffer)) (--buf2 buffer) (--undo1 buffer-undo-list) (--undo2 (save-current-buffer ... buffer-undo-list)) --c1 --c2) (save-current-buffer (set-buffer buffer) (widen) (goto-char pos) (setq ts (org-schedule arg time))) (org-agenda-show-new-time marker ts " S") (if org-agenda-allow-remote-undo (progn (setq --c1 ... --c2 ...) (if ... ...)))) (message "%s" ts)))) 0)
  (lambda (arg &optional time) "Schedule the item at point.\nARG is passed through ..." (interactive "P") (org-agenda-check-type t 'agenda 'todo 'tags 'search) (org-agenda-check-no-diary) (if (and (called-interactively-p 'any) org-agenda-loop-over-headlines-in-active-region (org-region-active-p)) (org-agenda-do-in-region (region-beginning) (region-end) #'org-agenda-schedule arg t nil) (let* ((marker (or (org-get-at-bol 'org-marker) (org-agenda-error))) (type (marker-insertion-type marker)) (buffer (marker-buffer marker)) (pos (marker-position marker)) ts) (set-marker-insertion-type marker t) (let ((--cline (org-current-line)) (--cmd this-command) (--buf1 (current-buffer)) (--buf2 buffer) (--undo1 buffer-undo-list) (--undo2 (save-current-buffer (set-buffer buffer) buffer-undo-list)) --c1 --c2) (save-current-buffer (set-buffer buffer) (widen) (goto-char pos) (setq ts (org-schedule arg time))) (org-agenda-show-new-time marker ts " S") (if org-agenda-allow-remote-undo (progn (setq --c1 (org-verify-change-for-undo --undo1 ...) --c2 (org-verify-change-for-undo --undo2 ...)) (if (or --c1 --c2) (progn ... ... ...))))) (message "%s" ts))))()
  apply((lambda (arg &optional time) "Schedule the item at point.\nARG is passed through ..." (interactive "P") (org-agenda-check-type t 'agenda 'todo 'tags 'search) (org-agenda-check-no-diary) (if (and (called-interactively-p 'any) org-agenda-loop-over-headlines-in-active-region (org-region-active-p)) (org-agenda-do-in-region (region-beginning) (region-end) #'org-agenda-schedule arg t nil) (let* ((marker (or (org-get-at-bol ...) (org-agenda-error))) (type (marker-insertion-type marker)) (buffer (marker-buffer marker)) (pos (marker-position marker)) ts) (set-marker-insertion-type marker t) (let ((--cline (org-current-line)) (--cmd this-command) (--buf1 (current-buffer)) (--buf2 buffer) (--undo1 buffer-undo-list) (--undo2 (save-current-buffer ... buffer-undo-list)) --c1 --c2) (save-current-buffer (set-buffer buffer) (widen) (goto-char pos) (setq ts (org-schedule arg time))) (org-agenda-show-new-time marker ts " S") (if org-agenda-allow-remote-undo (progn (setq --c1 ... --c2 ...) (if ... ...)))) (message "%s" ts)))) nil)
  org-agenda-schedule()
  funcall-interactively(org-agenda-schedule)
  call-interactively(org-agenda-schedule nil nil)
  command-execute(org-agenda-schedule)

What is going wrong? How do I set it right?

1
  • M-x toggle-debug-on-error and post the backtrace. You might want to reload Org mode in uncompiled form: that gives more information in the backtrace. See Feedback in the manual. In some cases, the emacs state is curdled somehow and this kind of weird error shows up: restarting emacs usually clears it up, but of course that will throw away the curdled state without any hope of figuring out what happened. – NickD Jan 6 at 14:51

Your Answer

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

Browse other questions tagged or ask your own question.