alphapapa / org-super-agenda

Supercharge your Org daily/weekly agenda by grouping items
GNU General Public License v3.0
1.38k stars 108 forks source link

auto-group causes `wrong-type-argument buffer-or-string-p` with `org-todo-list` #253

Closed Simon-chevolleau closed 9 months ago

Simon-chevolleau commented 10 months ago

Issue

I'm trying to use auto-* functionalities, here auto-group, after adding the property agenda-group and calling org-todo-list I have this long error output. Surprisingly, there is no error when calling org-agenda. I have no idea what's going on.

TODO

* test 1
:PROPERTIES:
:agenda-group: test 1
:END:
** TODO task A
SCHEDULED: <2024-01-17 Wed>
** TODO task B
SCHEDULED: <2024-01-18 Thu>
* test 2
:PROPERTIES:
:agenda-group: test 2
:END:
** TODO task C
SCHEDULED: <2024-01-19 Thu>
** TODO task D
SCHEDULED: <2024-01-20 Thu>

Config

#+begin_src elisp
(use-package! org-super-agenda
  :after org-agenda
  :config
  (setq org-super-agenda-groups
        '((:auto-group t)
          ))
  (setq org-super-agenda-header-map (make-sparse-keymap))
  (setq org-super-agenda-keep-order 0)
  :init
  (org-super-agenda-mode)
  )

Environment

Org-super-agenda 20231121.344 GNU Emacs v29.1 Doom core v3.0.0-pre Doom modules v23.09.0-pre

Error

Debugger entered--Lisp error: (wrong-type-argument buffer-or-string-p (:name "Group: test 2" :items (#("  todo:              TODO task C" 0 21 (todo-state #("TODO" 0 4 ...) type "todo" ts-date nil effort-minutes nil effort nil urgency 2001 priority 2000 org-hd-marker #<marker (moves after insertion) at 337 in todo.org> org-marker #<marker (moves after insertion) at 337 in todo.org> help-echo "mouse-2 or RET jump to org file ~/org/..." mouse-face highlight org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPUTING\\|DONE\\|..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KILL\\|MAYBE\\|N..." org-not-done-regexp "\\(BUY\\|COMPUTING\\|MAYBE\\|NEXT\\|PROJECT..." done-face org-agenda-done face nil dotime t format (... ...) extra "" ...) 21 25 (org-heading t effort-minutes nil effort nil fontified nil org-category "todo" tags nil org-priority-highest 65 org-priority-lowest 69 time-of-day nil duration nil breadcrumbs nil txt #("TODO task C" 0 11 ...) level "  " time "" extra "" format (... ...) dotime t face org-todo done-face org-agenda-done ...) 25 26 (org-category "todo" tags nil org-priority-highest 65 org-priority-lowest 69 time-of-day nil duration nil breadcrumbs nil txt #("TODO task C" 0 11 ...) level "  " time "" extra "" format (... ...) dotime t face nil done-face org-agenda-done org-not-done-regexp "\\(BUY\\|COMPUTING\\|MAYBE\\|NEXT\\|PROJECT..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KILL\\|MAYBE\\|N..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPUTING\\|DONE\\|..." mouse-face highlight ...) 26 32 (todo-state #("TODO" 0 4 ...) type "todo" ts-date nil urgency 2001 priority 2000 org-hd-marker #<marker (moves after insertion) at 337 in todo.org> org-marker #<marker (moves after insertion) at 337 in todo.org> help-echo "mouse-2 or RET jump to org file ~/org/..." mouse-face highlight org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPUTING\\|DONE\\|..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KILL\\|MAYBE\\|N..." org-not-done-regexp "\\(BUY\\|COMPUTING\\|MAYBE\\|NEXT\\|PROJECT..." done-face org-agenda-done face nil dotime t format (... ...) extra "" time "" level "  " ...)) #("  todo:              TODO task D" 0 21 (todo-state #("TODO" 0 4 ...) type "todo" ts-date nil effort-minutes nil effort nil urgency 2001 priority 2000 org-hd-marker #<marker (moves after insertion) at 380 in todo.org> org-marker #<marker (moves after insertion) at 380 in todo.org> help-echo "mouse-2 or RET jump to org file ~/org/..." mouse-face highlight org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPUTING\\|DONE\\|..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KILL\\|MAYBE\\|N..." org-not-done-regexp "\\(BUY\\|COMPUTING\\|MAYBE\\|NEXT\\|PROJECT..." done-face org-agenda-done face nil dotime t format (... ...) extra "" ...) 21 25 (org-heading t effort-minutes nil effort nil fontified nil org-category "todo" tags nil org-priority-highest 65 org-priority-lowest 69 time-of-day nil duration nil breadcrumbs nil txt #("TODO task D" 0 11 ...) level "  " time "" extra "" format (... ...) dotime t face org-todo done-face org-agenda-done ...) 25 26 (org-category "todo" tags nil org-priority-highest 65 org-priority-lowest 69 time-of-day nil duration nil breadcrumbs nil txt #("TODO task D" 0 11 ...) level "  " time "" extra "" format (... ...) dotime t face nil done-face org-agenda-done org-not-done-regexp "\\(BUY\\|COMPUTING\\|MAYBE\\|NEXT\\|PROJECT..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KILL\\|MAYBE\\|N..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPUTING\\|DONE\\|..." mouse-face highlight ...) 26 32 (todo-state #("TODO" 0 4 ...) type "todo" ts-date nil urgency 2001 priority 2000 org-hd-marker #<marker (moves after insertion) at 380 in todo.org> org-marker #<marker (moves after insertion) at 380 in todo.org> help-echo "mouse-2 or RET jump to org file ~/org/..." mouse-face highlight org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPUTING\\|DONE\\|..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KILL\\|MAYBE\\|N..." org-not-done-regexp "\\(BUY\\|COMPUTING\\|MAYBE\\|NEXT\\|PROJECT..." done-face org-agenda-done face nil dotime t format (... ...) extra "" time "" level "  " ...)))))
  get-text-property(3 priority (:name "Group: test 2" :items (#("  todo:              TODO task C" 0 21 (todo-state #("TODO" 0 4 ...) type "todo" ts-date nil effort-minutes nil effort nil urgency 2001 priority 2000 org-hd-marker #<marker (moves after insertion) at 337 in todo.org> org-marker #<marker (moves after insertion) at 337 in todo.org> help-echo "mouse-2 or RET jump to org file ~/org/..." mouse-face highlight org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPUTING\\|DONE\\|..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KILL\\|MAYBE\\|N..." org-not-done-regexp "\\(BUY\\|COMPUTING\\|MAYBE\\|NEXT\\|PROJECT..." done-face org-agenda-done face nil dotime t format (... ...) extra "" ...) 21 25 (org-heading t effort-minutes nil effort nil fontified nil org-category "todo" tags nil org-priority-highest 65 org-priority-lowest 69 time-of-day nil duration nil breadcrumbs nil txt #("TODO task C" 0 11 ...) level "  " time "" extra "" format (... ...) dotime t face org-todo done-face org-agenda-done ...) 25 26 (org-category "todo" tags nil org-priority-highest 65 org-priority-lowest 69 time-of-day nil duration nil breadcrumbs nil txt #("TODO task C" 0 11 ...) level "  " time "" extra "" format (... ...) dotime t face nil done-face org-agenda-done org-not-done-regexp "\\(BUY\\|COMPUTING\\|MAYBE\\|NEXT\\|PROJECT..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KILL\\|MAYBE\\|N..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPUTING\\|DONE\\|..." mouse-face highlight ...) 26 32 (todo-state #("TODO" 0 4 ...) type "todo" ts-date nil urgency 2001 priority 2000 org-hd-marker #<marker (moves after insertion) at 337 in todo.org> org-marker #<marker (moves after insertion) at 337 in todo.org> help-echo "mouse-2 or RET jump to org file ~/org/..." mouse-face highlight org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPUTING\\|DONE\\|..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KILL\\|MAYBE\\|N..." org-not-done-regexp "\\(BUY\\|COMPUTING\\|MAYBE\\|NEXT\\|PROJECT..." done-face org-agenda-done face nil dotime t format (... ...) extra "" time "" level "  " ...)) #("  todo:              TODO task D" 0 21 (todo-state #("TODO" 0 4 ...) type "todo" ts-date nil effort-minutes nil effort nil urgency 2001 priority 2000 org-hd-marker #<marker (moves after insertion) at 380 in todo.org> org-marker #<marker (moves after insertion) at 380 in todo.org> help-echo "mouse-2 or RET jump to org file ~/org/..." mouse-face highlight org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPUTING\\|DONE\\|..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KILL\\|MAYBE\\|N..." org-not-done-regexp "\\(BUY\\|COMPUTING\\|MAYBE\\|NEXT\\|PROJECT..." done-face org-agenda-done face nil dotime t format (... ...) extra "" ...) 21 25 (org-heading t effort-minutes nil effort nil fontified nil org-category "todo" tags nil org-priority-highest 65 org-priority-lowest 69 time-of-day nil duration nil breadcrumbs nil txt #("TODO task D" 0 11 ...) level "  " time "" extra "" format (... ...) dotime t face org-todo done-face org-agenda-done ...) 25 26 (org-category "todo" tags nil org-priority-highest 65 org-priority-lowest 69 time-of-day nil duration nil breadcrumbs nil txt #("TODO task D" 0 11 ...) level "  " time "" extra "" format (... ...) dotime t face nil done-face org-agenda-done org-not-done-regexp "\\(BUY\\|COMPUTING\\|MAYBE\\|NEXT\\|PROJECT..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KILL\\|MAYBE\\|N..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPUTING\\|DONE\\|..." mouse-face highlight ...) 26 32 (todo-state #("TODO" 0 4 ...) type "todo" ts-date nil urgency 2001 priority 2000 org-hd-marker #<marker (moves after insertion) at 380 in todo.org> org-marker #<marker (moves after insertion) at 380 in todo.org> help-echo "mouse-2 or RET jump to org file ~/org/..." mouse-face highlight org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPUTING\\|DONE\\|..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KILL\\|MAYBE\\|N..." org-not-done-regexp "\\(BUY\\|COMPUTING\\|MAYBE\\|NEXT\\|PROJECT..." done-face org-agenda-done face nil dotime t format (... ...) extra "" time "" level "  " ...)))))
  (or (get-text-property (1- (length a)) property a) 0)
  (let ((pa (or (get-text-property (1- (length a)) property a) 0)) (pb (or (get-text-property (1- (length b)) property b) 0))) (cond ((> pa pb) 1) ((< pa pb) -1)))
  org-cmp-values((:name "Group: test 2" :items (#("  todo:              TODO ..." 0 21 ... 21 25 ... 25 26 ... 26 32 ...) #("  todo:              TODO ..." 0 21 ... 21 25 ... 25 26 ... 26 32 ...))) (:name "Group: test 1" :items (#("  todo:              TODO ..." 0 21 ... 21 25 ... 25 26 ... 26 32 ...) #("  todo:              TODO ..." 0 21 ... 21 25 ... 25 26 ... 26 32 ...))) priority)
  (and (org-em 'priority-up 'priority-down ss) (org-cmp-values a b 'priority))
  (let* ((timestamp-up (and (org-em 'timestamp-up 'timestamp-down ss) (org-cmp-ts a b ""))) (timestamp-down (if timestamp-up (- timestamp-up) nil)) (scheduled-up (and (org-em 'scheduled-up 'scheduled-down ss) (org-cmp-ts a b "scheduled"))) (scheduled-down (if scheduled-up (- scheduled-up) nil)) (deadline-up (and (org-em 'deadline-up 'deadline-down ss) (org-cmp-ts a b "deadline"))) (deadline-down (if deadline-up (- deadline-up) nil)) (tsia-up (and (org-em 'tsia-up 'tsia-down ss) (org-cmp-ts a b "timestamp_ia"))) (tsia-down (if tsia-up (- tsia-up) nil)) (ts-up (and (org-em 'ts-up 'ts-down ss) (org-cmp-ts a b "timestamp"))) (ts-down (if ts-up (- ts-up) nil)) (time-up (and (org-em 'time-up 'time-down ss) (org-cmp-time a b))) (time-down (if time-up (- time-up) nil)) (stats-up (and (org-em 'stats-up 'stats-down ss) (org-cmp-values a b 'org-stats))) (stats-down (if stats-up (- stats-up) nil)) (priority-up (and (org-em 'priority-up 'priority-down ss) (org-cmp-values a b 'priority))) (priority-down (if priority-up (- priority-up) nil)) (urgency-up (and (org-em 'urgency-up 'urgency-down ss) (org-cmp-values a b 'urgency))) (urgency-down (if urgency-up (- urgency-up) nil)) (effort-up (and (org-em 'effort-up 'effort-down ss) (org-cmp-effort a b))) (effort-down (if effort-up (- effort-up) nil)) (category-up (and (or (org-em 'category-up 'category-down ss) (memq 'category-keep ss)) (org-cmp-category a b))) (category-down (if category-up (- category-up) nil)) (category-keep (if category-up 1 nil)) (tag-up (and (org-em 'tag-up 'tag-down ss) (org-cmp-tag a b))) (tag-down (if tag-up (- tag-up) nil)) (todo-state-up (and (org-em 'todo-state-up 'todo-state-down ss) (org-cmp-todo-state a b))) (todo-state-down (if todo-state-up (- todo-state-up) nil)) (habit-up (and (org-em 'habit-up 'habit-down ss) (org-cmp-habit-p a b))) (habit-down (if habit-up (- habit-up) nil)) (alpha-up (and (org-em 'alpha-up 'alpha-down ss) (org-cmp-alpha a b))) (alpha-down (if alpha-up (- alpha-up) nil)) (need-user-cmp (org-em 'user-defined-up 'user-defined-down ss)) user-defined-up user-defined-down) (if (and need-user-cmp org-agenda-cmp-user-defined (functionp org-agenda-cmp-user-defined)) (progn (progn (setq user-defined-up (funcall org-agenda-cmp-user-defined a b)) (setq user-defined-down (if user-defined-up (- user-defined-up) nil))))) (cdr (assoc (eval (cons 'or org-agenda-sorting-strategy-selected) t) '((-1 . t) (1) (nil)))))
  (progn (with-no-warnings (defvar timestamp-up) (defvar timestamp-down) (defvar scheduled-up) (defvar scheduled-down) (defvar deadline-up) (defvar deadline-down) (defvar tsia-up) (defvar tsia-down) (defvar ts-up) (defvar ts-down) (defvar time-up) (defvar time-down) (defvar stats-up) (defvar stats-down) (defvar priority-up) (defvar priority-down) (defvar urgency-up) (defvar urgency-down) (defvar effort-up) (defvar effort-down) (defvar category-up) (defvar category-down) (defvar category-keep) (defvar tag-up) (defvar tag-down) (defvar todo-state-up) (defvar todo-state-down) (defvar habit-up) (defvar habit-down) (defvar alpha-up) (defvar alpha-down) (defvar need-user-cmp) (defvar user-defined-up) (defvar user-defined-down)) (let* ((timestamp-up (and (org-em 'timestamp-up 'timestamp-down ss) (org-cmp-ts a b ""))) (timestamp-down (if timestamp-up (- timestamp-up) nil)) (scheduled-up (and (org-em 'scheduled-up 'scheduled-down ss) (org-cmp-ts a b "scheduled"))) (scheduled-down (if scheduled-up (- scheduled-up) nil)) (deadline-up (and (org-em 'deadline-up 'deadline-down ss) (org-cmp-ts a b "deadline"))) (deadline-down (if deadline-up (- deadline-up) nil)) (tsia-up (and (org-em 'tsia-up 'tsia-down ss) (org-cmp-ts a b "timestamp_ia"))) (tsia-down (if tsia-up (- tsia-up) nil)) (ts-up (and (org-em 'ts-up 'ts-down ss) (org-cmp-ts a b "timestamp"))) (ts-down (if ts-up (- ts-up) nil)) (time-up (and (org-em 'time-up 'time-down ss) (org-cmp-time a b))) (time-down (if time-up (- time-up) nil)) (stats-up (and (org-em 'stats-up 'stats-down ss) (org-cmp-values a b 'org-stats))) (stats-down (if stats-up (- stats-up) nil)) (priority-up (and (org-em 'priority-up 'priority-down ss) (org-cmp-values a b 'priority))) (priority-down (if priority-up (- priority-up) nil)) (urgency-up (and (org-em 'urgency-up 'urgency-down ss) (org-cmp-values a b 'urgency))) (urgency-down (if urgency-up (- urgency-up) nil)) (effort-up (and (org-em 'effort-up 'effort-down ss) (org-cmp-effort a b))) (effort-down (if effort-up (- effort-up) nil)) (category-up (and (or (org-em 'category-up 'category-down ss) (memq 'category-keep ss)) (org-cmp-category a b))) (category-down (if category-up (- category-up) nil)) (category-keep (if category-up 1 nil)) (tag-up (and (org-em 'tag-up 'tag-down ss) (org-cmp-tag a b))) (tag-down (if tag-up (- tag-up) nil)) (todo-state-up (and (org-em 'todo-state-up 'todo-state-down ss) (org-cmp-todo-state a b))) (todo-state-down (if todo-state-up (- todo-state-up) nil)) (habit-up (and (org-em 'habit-up 'habit-down ss) (org-cmp-habit-p a b))) (habit-down (if habit-up (- habit-up) nil)) (alpha-up (and (org-em 'alpha-up 'alpha-down ss) (org-cmp-alpha a b))) (alpha-down (if alpha-up (- alpha-up) nil)) (need-user-cmp (org-em 'user-defined-up 'user-defined-down ss)) user-defined-up user-defined-down) (if (and need-user-cmp org-agenda-cmp-user-defined (functionp org-agenda-cmp-user-defined)) (progn (progn (setq user-defined-up (funcall org-agenda-cmp-user-defined a b)) (setq user-defined-down (if user-defined-up (- user-defined-up) nil))))) (cdr (assoc (eval (cons 'or org-agenda-sorting-strategy-selected) t) '((-1 . t) (1) (nil))))))
  (let ((ss org-agenda-sorting-strategy-selected)) (progn (with-no-warnings (defvar timestamp-up) (defvar timestamp-down) (defvar scheduled-up) (defvar scheduled-down) (defvar deadline-up) (defvar deadline-down) (defvar tsia-up) (defvar tsia-down) (defvar ts-up) (defvar ts-down) (defvar time-up) (defvar time-down) (defvar stats-up) (defvar stats-down) (defvar priority-up) (defvar priority-down) (defvar urgency-up) (defvar urgency-down) (defvar effort-up) (defvar effort-down) (defvar category-up) (defvar category-down) (defvar category-keep) (defvar tag-up) (defvar tag-down) (defvar todo-state-up) (defvar todo-state-down) (defvar habit-up) (defvar habit-down) (defvar alpha-up) (defvar alpha-down) (defvar need-user-cmp) (defvar user-defined-up) (defvar user-defined-down)) (let* ((timestamp-up (and (org-em 'timestamp-up 'timestamp-down ss) (org-cmp-ts a b ""))) (timestamp-down (if timestamp-up (- timestamp-up) nil)) (scheduled-up (and (org-em 'scheduled-up 'scheduled-down ss) (org-cmp-ts a b "scheduled"))) (scheduled-down (if scheduled-up (- scheduled-up) nil)) (deadline-up (and (org-em 'deadline-up 'deadline-down ss) (org-cmp-ts a b "deadline"))) (deadline-down (if deadline-up (- deadline-up) nil)) (tsia-up (and (org-em 'tsia-up 'tsia-down ss) (org-cmp-ts a b "timestamp_ia"))) (tsia-down (if tsia-up (- tsia-up) nil)) (ts-up (and (org-em 'ts-up 'ts-down ss) (org-cmp-ts a b "timestamp"))) (ts-down (if ts-up (- ts-up) nil)) (time-up (and (org-em 'time-up 'time-down ss) (org-cmp-time a b))) (time-down (if time-up (- time-up) nil)) (stats-up (and (org-em 'stats-up 'stats-down ss) (org-cmp-values a b 'org-stats))) (stats-down (if stats-up (- stats-up) nil)) (priority-up (and (org-em 'priority-up 'priority-down ss) (org-cmp-values a b 'priority))) (priority-down (if priority-up (- priority-up) nil)) (urgency-up (and (org-em 'urgency-up 'urgency-down ss) (org-cmp-values a b 'urgency))) (urgency-down (if urgency-up (- urgency-up) nil)) (effort-up (and (org-em 'effort-up 'effort-down ss) (org-cmp-effort a b))) (effort-down (if effort-up (- effort-up) nil)) (category-up (and (or (org-em ... ... ss) (memq ... ss)) (org-cmp-category a b))) (category-down (if category-up (- category-up) nil)) (category-keep (if category-up 1 nil)) (tag-up (and (org-em 'tag-up 'tag-down ss) (org-cmp-tag a b))) (tag-down (if tag-up (- tag-up) nil)) (todo-state-up (and (org-em 'todo-state-up 'todo-state-down ss) (org-cmp-todo-state a b))) (todo-state-down (if todo-state-up (- todo-state-up) nil)) (habit-up (and (org-em 'habit-up 'habit-down ss) (org-cmp-habit-p a b))) (habit-down (if habit-up (- habit-up) nil)) (alpha-up (and (org-em 'alpha-up 'alpha-down ss) (org-cmp-alpha a b))) (alpha-down (if alpha-up (- alpha-up) nil)) (need-user-cmp (org-em 'user-defined-up 'user-defined-down ss)) user-defined-up user-defined-down) (if (and need-user-cmp org-agenda-cmp-user-defined (functionp org-agenda-cmp-user-defined)) (progn (progn (setq user-defined-up (funcall org-agenda-cmp-user-defined a b)) (setq user-defined-down (if user-defined-up ... nil))))) (cdr (assoc (eval (cons 'or org-agenda-sorting-strategy-selected) t) '((-1 . t) (1) (nil)))))))
  (closure (diary-display-function diary-file-name-prefix diary-modify-entry-list-string-function diary-time-regexp diary-list-entries-hook crm-separator org-agenda-show-log-scoped org-depend-tag-blocked org-local-columns-format org-mobile-creating-agendas org-agenda-multi org-agenda-menu original-date org-agenda-overriding-header org-habit-scheduled-past-days org-habit-show-all-today org-habit-show-habits-only-for-today org-habit-show-habits org-mobile-force-id-on-agenda-items t) (a b) "Predicate for sorting agenda entries." (let ((ss org-agenda-sorting-strategy-selected)) (progn (with-no-warnings (defvar timestamp-up) (defvar timestamp-down) (defvar scheduled-up) (defvar scheduled-down) (defvar deadline-up) (defvar deadline-down) (defvar tsia-up) (defvar tsia-down) (defvar ts-up) (defvar ts-down) (defvar time-up) (defvar time-down) (defvar stats-up) (defvar stats-down) (defvar priority-up) (defvar priority-down) (defvar urgency-up) (defvar urgency-down) (defvar effort-up) (defvar effort-down) (defvar category-up) (defvar category-down) (defvar category-keep) (defvar tag-up) (defvar tag-down) (defvar todo-state-up) (defvar todo-state-down) (defvar habit-up) (defvar habit-down) (defvar alpha-up) (defvar alpha-down) (defvar need-user-cmp) (defvar user-defined-up) (defvar user-defined-down)) (let* ((timestamp-up ...) (timestamp-down ...) (scheduled-up ...) (scheduled-down ...) (deadline-up ...) (deadline-down ...) (tsia-up ...) (tsia-down ...) (ts-up ...) (ts-down ...) (time-up ...) (time-down ...) (stats-up ...) (stats-down ...) (priority-up ...) (priority-down ...) (urgency-up ...) (urgency-down ...) (effort-up ...) (effort-down ...) (category-up ...) (category-down ...) (category-keep ...) (tag-up ...) (tag-down ...) (todo-state-up ...) (todo-state-down ...) (habit-up ...) (habit-down ...) (alpha-up ...) (alpha-down ...) (need-user-cmp ...) user-defined-up user-defined-down) (if (and need-user-cmp org-agenda-cmp-user-defined ...) (progn ...)) (cdr (assoc ... ...))))))((:name "Group: test 2" :items (... ...)) (:name "Group: test 1" :items (... ...)))
  sort(((:name "Group: test 1" :items (#("  todo:              TODO task A" 0 21 ... 21 25 ... 25 26 ... 26 32 ...) #("  todo:              TODO task B" 0 21 ... 21 25 ... 25 26 ... 26 32 ...))) (:name "Group: test 2" :items (#("  todo:              TODO task C" 0 21 ... 21 25 ... 25 26 ... 26 32 ...) #("  todo:              TODO task D" 0 21 ... 21 25 ... 25 26 ... 26 32 ...)))) org-entries-lessp)
  (setq matching (sort matching #'org-entries-lessp))
  (progn (setq matching (sort matching #'org-entries-lessp)))
  (if org-super-agenda-keep-order (progn (setq matching (sort matching #'org-entries-lessp))))
  (while (consp --cl-var--) (setq filter (car --cl-var--)) (setq custom-section-name (plist-get filter :name)) (setq order (or (plist-get filter :order) 0)) (progn (setq --cl-var-- (org-super-agenda--group-dispatch all-items filter)) (setq auto-section-name (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--))))) (setq non-matching (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--))))) (setq matching (car --cl-var--))) (if org-super-agenda-keep-order (progn (setq matching (sort matching #'org-entries-lessp)))) (setq transformer (plist-get filter :transformer)) (let ((it transformer)) (if it (progn (setq matching (-map (let* (...) (cond ... ... ...)) matching))))) (setq face (plist-get filter :face)) (let ((it face)) (if it (progn (let ((append (plist-get face :append))) (if append (progn (if ... ... ...))) (let ((list matching) (i 0)) (while list (let ... ... ...) (setq i ...))))))) (if (memql auto-section-name org-super-agenda-auto-selector-keywords) (progn (setq section-name (or custom-section-name "Auto category/group")) (setq sections (append sections (let* ((--cl-var-- matching) (group nil) (--cl-var-- nil)) (while (consp --cl-var--) (setq group ...) (setq --cl-var-- ...) (setq --cl-var-- ...)) (nreverse --cl-var--)))) (setq all-items non-matching)) (setq section-name (or custom-section-name auto-section-name)) (setq sections (nconc sections (list (list :name section-name :items matching :order order)))) (setq all-items non-matching)) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil))
  (let* ((section-name nil) (--cl-var-- org-super-agenda-groups) (filter nil) (custom-section-name nil) (order nil) (auto-section-name nil) (non-matching nil) (matching nil) (--cl-var--) (transformer nil) (face nil) (sections nil) (--cl-var-- t)) (while (consp --cl-var--) (setq filter (car --cl-var--)) (setq custom-section-name (plist-get filter :name)) (setq order (or (plist-get filter :order) 0)) (progn (setq --cl-var-- (org-super-agenda--group-dispatch all-items filter)) (setq auto-section-name (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--))))) (setq non-matching (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--))))) (setq matching (car --cl-var--))) (if org-super-agenda-keep-order (progn (setq matching (sort matching #'org-entries-lessp)))) (setq transformer (plist-get filter :transformer)) (let ((it transformer)) (if it (progn (setq matching (-map (let* ... ...) matching))))) (setq face (plist-get filter :face)) (let ((it face)) (if it (progn (let ((append ...)) (if append (progn ...)) (let (... ...) (while list ... ...)))))) (if (memql auto-section-name org-super-agenda-auto-selector-keywords) (progn (setq section-name (or custom-section-name "Auto category/group")) (setq sections (append sections (let* (... ... ...) (while ... ... ... ...) (nreverse --cl-var--)))) (setq all-items non-matching)) (setq section-name (or custom-section-name auto-section-name)) (setq sections (nconc sections (list (list :name section-name :items matching :order order)))) (setq all-items non-matching)) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil)) (setq non-matching (list :name org-super-agenda-unmatched-name :items non-matching :order org-super-agenda-unmatched-order)) (setq sections (-sort #'(lambda (it other) (ignore it other) (let ((o-it ...) (o-other ...)) (cond (... ...) (... ...) (t nil)))) (setq sections (cons non-matching sections)))) (let* ((--cl-var-- sections) (name nil) (items nil) (--cl-var--) (--cl-var--) (--cl-var--) (--cl-var-- nil)) (while (consp --cl-var--) (progn (setq --cl-var-- (car --cl-var--)) (setq --cl-var-- (car-safe (prog1 --cl-var-- (setq --cl-var-- ...)))) (setq name (car-safe (prog1 --cl-var-- (setq --cl-var-- ...)))) (setq --cl-var-- (car-safe (prog1 --cl-var-- (setq --cl-var-- ...)))) (setq items (car --cl-var--))) (if items (progn (setq --cl-var-- (cons (org-super-agenda--make-agenda-header name) --cl-var--)) (setq --cl-var-- (nconc (reverse items) --cl-var--)))) (setq --cl-var-- (cdr --cl-var--))) (nreverse --cl-var--)))
  (let ((org-super-agenda-groups (org-super-agenda--transform-groups org-super-agenda-groups))) (let* ((section-name nil) (--cl-var-- org-super-agenda-groups) (filter nil) (custom-section-name nil) (order nil) (auto-section-name nil) (non-matching nil) (matching nil) (--cl-var--) (transformer nil) (face nil) (sections nil) (--cl-var-- t)) (while (consp --cl-var--) (setq filter (car --cl-var--)) (setq custom-section-name (plist-get filter :name)) (setq order (or (plist-get filter :order) 0)) (progn (setq --cl-var-- (org-super-agenda--group-dispatch all-items filter)) (setq auto-section-name (car-safe (prog1 --cl-var-- (setq --cl-var-- ...)))) (setq non-matching (car-safe (prog1 --cl-var-- (setq --cl-var-- ...)))) (setq matching (car --cl-var--))) (if org-super-agenda-keep-order (progn (setq matching (sort matching #'org-entries-lessp)))) (setq transformer (plist-get filter :transformer)) (let ((it transformer)) (if it (progn (setq matching (-map ... matching))))) (setq face (plist-get filter :face)) (let ((it face)) (if it (progn (let (...) (if append ...) (let ... ...))))) (if (memql auto-section-name org-super-agenda-auto-selector-keywords) (progn (setq section-name (or custom-section-name "Auto category/group")) (setq sections (append sections (let* ... ... ...))) (setq all-items non-matching)) (setq section-name (or custom-section-name auto-section-name)) (setq sections (nconc sections (list (list :name section-name :items matching :order order)))) (setq all-items non-matching)) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil)) (setq non-matching (list :name org-super-agenda-unmatched-name :items non-matching :order org-super-agenda-unmatched-order)) (setq sections (-sort #'(lambda (it other) (ignore it other) (let (... ...) (cond ... ... ...))) (setq sections (cons non-matching sections)))) (let* ((--cl-var-- sections) (name nil) (items nil) (--cl-var--) (--cl-var--) (--cl-var--) (--cl-var-- nil)) (while (consp --cl-var--) (progn (setq --cl-var-- (car --cl-var--)) (setq --cl-var-- (car-safe (prog1 --cl-var-- ...))) (setq name (car-safe (prog1 --cl-var-- ...))) (setq --cl-var-- (car-safe (prog1 --cl-var-- ...))) (setq items (car --cl-var--))) (if items (progn (setq --cl-var-- (cons ... --cl-var--)) (setq --cl-var-- (nconc ... --cl-var--)))) (setq --cl-var-- (cdr --cl-var--))) (nreverse --cl-var--))))
  (if (and (boundp 'org-super-agenda-groups) org-super-agenda-groups) (let ((org-super-agenda-groups (org-super-agenda--transform-groups org-super-agenda-groups))) (let* ((section-name nil) (--cl-var-- org-super-agenda-groups) (filter nil) (custom-section-name nil) (order nil) (auto-section-name nil) (non-matching nil) (matching nil) (--cl-var--) (transformer nil) (face nil) (sections nil) (--cl-var-- t)) (while (consp --cl-var--) (setq filter (car --cl-var--)) (setq custom-section-name (plist-get filter :name)) (setq order (or (plist-get filter :order) 0)) (progn (setq --cl-var-- (org-super-agenda--group-dispatch all-items filter)) (setq auto-section-name (car-safe (prog1 --cl-var-- ...))) (setq non-matching (car-safe (prog1 --cl-var-- ...))) (setq matching (car --cl-var--))) (if org-super-agenda-keep-order (progn (setq matching (sort matching ...)))) (setq transformer (plist-get filter :transformer)) (let ((it transformer)) (if it (progn (setq matching ...)))) (setq face (plist-get filter :face)) (let ((it face)) (if it (progn (let ... ... ...)))) (if (memql auto-section-name org-super-agenda-auto-selector-keywords) (progn (setq section-name (or custom-section-name "Auto category/group")) (setq sections (append sections ...)) (setq all-items non-matching)) (setq section-name (or custom-section-name auto-section-name)) (setq sections (nconc sections (list ...))) (setq all-items non-matching)) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil)) (setq non-matching (list :name org-super-agenda-unmatched-name :items non-matching :order org-super-agenda-unmatched-order)) (setq sections (-sort #'(lambda (it other) (ignore it other) (let ... ...)) (setq sections (cons non-matching sections)))) (let* ((--cl-var-- sections) (name nil) (items nil) (--cl-var--) (--cl-var--) (--cl-var--) (--cl-var-- nil)) (while (consp --cl-var--) (progn (setq --cl-var-- (car --cl-var--)) (setq --cl-var-- (car-safe ...)) (setq name (car-safe ...)) (setq --cl-var-- (car-safe ...)) (setq items (car --cl-var--))) (if items (progn (setq --cl-var-- ...) (setq --cl-var-- ...))) (setq --cl-var-- (cdr --cl-var--))) (nreverse --cl-var--)))) all-items)
  org-super-agenda--group-items((#("  todo:             ..." 0 21 ... 21 25 ... 25 26 ... 26 32 ...) #("  todo:             ..." 0 21 ... 21 25 ... 25 26 ... 26 32 ...) #("  todo:             ..." 0 21 ... 21 25 ... 25 26 ... 26 32 ...) #("  todo:             ..." 0 21 ... 21 25 ... 25 26 ... 26 32 ...)))
  (let ((it (org-super-agenda--group-items it))) (let ((it (-remove #'s-blank-str? it))) (let ((it (s-join "\n" it))) (concat it (cond ((natnump org-super-agenda-final-group-separator) (concat "\n" (make-string ... org-super-agenda-final-group-separator))) ((stringp org-super-agenda-final-group-separator) org-super-agenda-final-group-separator) ((error "cl-etypecase failed: %s, %s" org-super-agenda-final-group-separator '...) nil))))))
  (let ((it (split-string it "\n" 'omit-nulls))) (let ((it (org-super-agenda--group-items it))) (let ((it (-remove #'s-blank-str? it))) (let ((it (s-join "\n" it))) (concat it (cond ((natnump org-super-agenda-final-group-separator) (concat "\n" ...)) ((stringp org-super-agenda-final-group-separator) org-super-agenda-final-group-separator) ((error "cl-etypecase failed: %s, %s" org-super-agenda-final-group-separator ...) nil)))))))
  (let ((it string)) (let ((it (split-string it "\n" 'omit-nulls))) (let ((it (org-super-agenda--group-items it))) (let ((it (-remove #'s-blank-str? it))) (let ((it (s-join "\n" it))) (concat it (cond (... ...) (... org-super-agenda-final-group-separator) (... nil))))))))
  org-super-agenda--filter-finalize-entries(#("  todo:              TODO ..." 0 21 (org-category "todo" tags nil org-priority-highest 65 org-priority-lowest 69 time-of-day nil duration nil breadcrumbs nil txt #("TODO task A" 0 11 ...) level "  " time "" extra "" format (... ...) dotime t ...) 21 25 (todo-state #("TODO" 0 4 ...) type "todo" ts-date nil urgency 2001 priority 2000 org-hd-marker #<marker (moves after insertion) at 201 in todo.org> org-marker #<marker (moves after insertion) at 201 in todo.org> help-echo "mouse-2 or RET jump to org..." mouse-face highlight org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPU..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KI..." org-not-done-regexp "\\(BUY\\|COMPUTING\\|MAYBE\\|N..." done-face org-agenda-done ...) 25 26 (todo-state #("TODO" 0 4 ...) type "todo" ts-date nil effort-minutes nil effort nil urgency 2001 priority 2000 org-hd-marker #<marker (moves after insertion) at 201 in todo.org> org-marker #<marker (moves after insertion) at 201 in todo.org> help-echo "mouse-2 or RET jump to org..." mouse-face highlight org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPU..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KI..." ...) 26 32 (org-heading t effort-minutes nil effort nil fontified nil org-category "todo" tags nil org-priority-highest 65 org-priority-lowest 69 time-of-day nil duration nil breadcrumbs nil txt #("TODO task A" 0 11 ...) level "  " ...) 33 54 (org-category "todo" tags nil org-priority-highest 65 org-priority-lowest 69 time-of-day nil duration nil breadcrumbs nil txt #("TODO task B" 0 11 ...) level "  " time "" extra "" format (... ...) dotime t ...) 54 58 (todo-state #("TODO" 0 4 ...) type "todo" ts-date nil urgency 2001 priority 2000 org-hd-marker #<marker (moves after insertion) at 244 in todo.org> org-marker #<marker (moves after insertion) at 244 in todo.org> help-echo "mouse-2 or RET jump to org..." mouse-face highlight org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPU..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KI..." org-not-done-regexp "\\(BUY\\|COMPUTING\\|MAYBE\\|N..." done-face org-agenda-done ...) 58 59 (todo-state #("TODO" 0 4 ...) type "todo" ts-date nil effort-minutes nil effort nil urgency 2001 priority 2000 org-hd-marker #<marker (moves after insertion) at 244 in todo.org> org-marker #<marker (moves after insertion) at 244 in todo.org> help-echo "mouse-2 or RET jump to org..." mouse-face highlight org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(BUY\\|COMPU..." org-todo-regexp "\\(BUY\\|COMPUTING\\|DONE\\|KI..." ...) 59 65 (org-heading t effort-minutes nil effort nil fontified nil org-category "todo" tags nil org-priority-highest 65 org-priority-lowest 69 time-of-day nil duration nil breadcrumbs nil txt #("TODO task B" 0 11 ...) level "  " ...) ...))
  org-agenda-finalize-entries((#("  todo:             ..." 0 21 ... 21 26 ... 26 32 ...) #("  todo:             ..." 0 21 ... 21 26 ... 26 32 ...) #("  todo:             ..." 0 21 ... 21 26 ... 26 32 ...) #("  todo:             ..." 0 21 ... 21 26 ... 26 32 ...)) todo)
  (insert (org-agenda-finalize-entries rtnall 'todo) "\n")
  (progn (insert (org-agenda-finalize-entries rtnall 'todo) "\n"))
  (if rtnall (progn (insert (org-agenda-finalize-entries rtnall 'todo) "\n")))
  (catch 'exit (setq org-agenda-buffer-name (org-agenda--get-buffer-name (and org-agenda-sticky (if (stringp org-select-this-todo-keyword) (format "*Org Agenda(%s:%s)*" (or org-keys "t") org-select-this-todo-keyword) (format "*Org Agenda(%s)*" (or org-keys "t")))))) (org-agenda-prepare "TODO") (progn (setq kwds org-todo-keywords-for-agenda) (setq org-select-this-todo-keyword (if (stringp arg) arg (and (integerp arg) (> arg 0) (nth (1- arg) kwds))))) (if (equal arg '(4)) (progn (setq org-select-this-todo-keyword (mapconcat #'identity (let ((crm-separator "|")) (completing-read-multiple "Keyword (or KWD1|KWD2|...): " (mapcar ... kwds) nil nil)) "|")))) (and (equal 0 arg) (setq org-select-this-todo-keyword nil)) (org-compile-prefix-format 'todo) (org-set-sorting-strategy 'todo) (setq org-agenda-redo-command (list 'org-todo-list (list 'or '(and (numberp current-prefix-arg) current-prefix-arg) org-select-this-todo-keyword 'current-prefix-arg arg))) (progn (setq files (org-agenda-files nil 'ifmode)) (setq rtnall nil)) (while (setq file (car-safe (prog1 files (setq files (cdr files))))) (catch 'nextfile (org-check-agenda-file file) (setq rtn (org-agenda-get-day-entries file date :todo)) (setq rtnall (append rtnall rtn)))) (cond ((not org-agenda-overriding-header) (insert (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ... ... ... ... ... ...) (and ... ...)))))) ((equal org-agenda-overriding-header "") nil) ((stringp org-agenda-overriding-header) (insert (propertize org-agenda-overriding-header 'face 'org-agenda-structure) "\n")) ((functionp org-agenda-overriding-header) (insert (funcall org-agenda-overriding-header))) (t (user-error "Invalid value for `org-agenda-overriding-header': ..." org-agenda-overriding-header))) (org-agenda-mark-header-line (point-min)) (if rtnall (progn (insert (org-agenda-finalize-entries rtnall 'todo) "\n"))) (goto-char (point-min)) (or org-agenda-multi (org-agenda-fit-window-to-buffer)) (add-text-properties (point-min) (point-max) (list 'org-agenda-type 'todo 'org-last-args arg 'org-redo-cmd org-agenda-redo-command 'org-series-cmd org-cmd)) (org-agenda-finalize) (setq buffer-read-only t))
  (let* ((today (org-today)) (date (calendar-gregorian-from-absolute today)) (completion-ignore-case t) kwds org-select-this-todo-keyword rtn rtnall files file pos) (catch 'exit (setq org-agenda-buffer-name (org-agenda--get-buffer-name (and org-agenda-sticky (if (stringp org-select-this-todo-keyword) (format "*Org Agenda(%s:%s)*" (or org-keys "t") org-select-this-todo-keyword) (format "*Org Agenda(%s)*" (or org-keys "t")))))) (org-agenda-prepare "TODO") (progn (setq kwds org-todo-keywords-for-agenda) (setq org-select-this-todo-keyword (if (stringp arg) arg (and (integerp arg) (> arg 0) (nth (1- arg) kwds))))) (if (equal arg '(4)) (progn (setq org-select-this-todo-keyword (mapconcat #'identity (let (...) (completing-read-multiple "Keyword (or KWD1|KWD2|...): " ... nil nil)) "|")))) (and (equal 0 arg) (setq org-select-this-todo-keyword nil)) (org-compile-prefix-format 'todo) (org-set-sorting-strategy 'todo) (setq org-agenda-redo-command (list 'org-todo-list (list 'or '(and (numberp current-prefix-arg) current-prefix-arg) org-select-this-todo-keyword 'current-prefix-arg arg))) (progn (setq files (org-agenda-files nil 'ifmode)) (setq rtnall nil)) (while (setq file (car-safe (prog1 files (setq files (cdr files))))) (catch 'nextfile (org-check-agenda-file file) (setq rtn (org-agenda-get-day-entries file date :todo)) (setq rtnall (append rtnall rtn)))) (cond ((not org-agenda-overriding-header) (insert (let ((temp-buffer ...)) (save-current-buffer (set-buffer temp-buffer) (unwind-protect ... ...))))) ((equal org-agenda-overriding-header "") nil) ((stringp org-agenda-overriding-header) (insert (propertize org-agenda-overriding-header 'face 'org-agenda-structure) "\n")) ((functionp org-agenda-overriding-header) (insert (funcall org-agenda-overriding-header))) (t (user-error "Invalid value for `org-agenda-overriding-header': ..." org-agenda-overriding-header))) (org-agenda-mark-header-line (point-min)) (if rtnall (progn (insert (org-agenda-finalize-entries rtnall 'todo) "\n"))) (goto-char (point-min)) (or org-agenda-multi (org-agenda-fit-window-to-buffer)) (add-text-properties (point-min) (point-max) (list 'org-agenda-type 'todo 'org-last-args arg 'org-redo-cmd org-agenda-redo-command 'org-series-cmd org-cmd)) (org-agenda-finalize) (setq buffer-read-only t)))
  org-todo-list(nil)
  funcall-interactively(org-todo-list nil)
  call-interactively(org-todo-list nil nil)
  command-execute(org-todo-list)
alphapapa commented 10 months ago

Well, I don't know if this is the cause, but this is yet another example of a DOOM user misusing the customization system. (setq org-super-agenda-keep-order 0) does not set a valid value.

Beyond that, please report the version of Org you are using, and please try to reproduce in a clean Emacs config, e.g. using https://github.com/alphapapa/with-emacs.sh

Simon-chevolleau commented 9 months ago

Yes, I still understand to learn emacs/elisp stuff. Anyway, I have clean my config file and I didn't not get that error back, everything is working. Presumably, this error was due to misconfiguration and possibly doom broken usage. Sorry for the fake issue.

alphapapa commented 9 months ago

No problem. Thanks for following up.