haji-ali / calfw-blocks

Visual enhancements for the Emacs Calendar Framework (calfw)
GNU General Public License v3.0
7 stars 1 forks source link

Error when loading #3

Open agenbite opened 8 months ago

agenbite commented 8 months ago

Thanks for these forks, it's great that someone(tm) finally did it.

However, after using calfw-blocks flawlessly for a while, I've started getting this error: calfw-blocks-render-default-content-face: Wrong type argument: cfw:event, nil, and no calendar whatsoever. I don't know where to begin debugging, any idea?

ziova commented 6 months ago

hi have you found the answer?

agenbite commented 6 months ago

Not really, I gave up... :(

ziova commented 6 months ago

@haji-ali any updates?

haji-ali commented 6 months ago

@ziova, @agenbite. Apologies, I missed these messages somehow. I am not getting these errors at all. It would be very helpful if you can give me the call stack of the errors or let me know what your setup is.

ziova commented 6 months ago

Thanks for the reply @haji-ali. Here is what I get when I turn on toggle-on-debug (I am using gcal to import the events in my calendar):

Debugger entered--Lisp error: (wrong-type-argument cfw:event nil)
  calfw-blocks--status-face(#("09:00 Academic Personal Tutor Session" 0 37 (cfw:source #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "#788c9e" :period-bgcolor "#0c0e14" :period-fgcolor "#788c9e" :opt-face nil :opt-period-face nil :hidden nil) keymap (keymap (109 . cfw:org-jump-map) (3 keymap (15 . cfw:org-onclick)) (13 . cfw:org-onclick) (mouse-1 . cfw:org-onclick)) display nil calfw-blocks-interval ((9 0) 10.0 0.0) org-category "todo" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day 900 duration 60.0 breadcrumbs nil txt #("Academic Personal Tutor Session" 0 31 (org-heading t effort-minutes nil effort nil fontified nil)) level " " time " 9:00-10:00" extra nil format (((org-prefix-has-time nil) (org-prefix-has-tag nil) (org-prefix-category-length nil) (org-prefix-has-effort nil) (org-prefix-has-breadcrumbs nil)) (format " ")) dotime #("<2024-01-17 Wed 09:00-10:00>" 0 28 (isearch-open-invisible-temporary org-fold-core--isearch-show-temporary isearch-open-invisible org-fold-core--isearch-show org-fold--spec-org-fold-drawer--94869273637456887 org-fold-drawer fontified nil)) org-not-done-regexp "\\(CODE\\|ERND\\|M\\(?:EET\\|ISC\\)\\|PERS\\|TODO\\|UNIV\\|\\..." org-todo-regexp "\\(CODE\\|DONE\\|ERND\\|KILL\\|M\\(?:EET\\|ISC\\)\\|NO\\|OKA..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CODE\\|DONE\\|ERND\\|KILL\\|M\\(?:EET\\|..." mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/todo.org" urgency 1000 priority 1000 org-marker #<marker (moves after insertion) at 13733 in todo.org> ...)) background)
  calfw-blocks-render-default-content-face(#("09:00 Academic Personal Tutor Session" 0 37 (cfw:source #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "#788c9e" :period-bgcolor "#0c0e14" :period-fgcolor "#788c9e" :opt-face nil :opt-period-face nil :hidden nil) keymap (keymap (109 . cfw:org-jump-map) (3 keymap (15 . cfw:org-onclick)) (13 . cfw:org-onclick) (mouse-1 . cfw:org-onclick)) display nil calfw-blocks-interval ((9 0) 10.0 0.0) org-category "todo" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day 900 duration 60.0 breadcrumbs nil txt #("Academic Personal Tutor Session" 0 31 (org-heading t effort-minutes nil effort nil fontified nil)) level " " time " 9:00-10:00" extra nil format (((org-prefix-has-time nil) (org-prefix-has-tag nil) (org-prefix-category-length nil) (org-prefix-has-effort nil) (org-prefix-has-breadcrumbs nil)) (format " ")) dotime #("<2024-01-17 Wed 09:00-10:00>" 0 28 (isearch-open-invisible-temporary org-fold-core--isearch-show-temporary isearch-open-invisible org-fold-core--isearch-show org-fold--spec-org-fold-drawer--94869273637456887 org-fold-drawer fontified nil)) org-not-done-regexp "\\(CODE\\|ERND\\|M\\(?:EET\\|ISC\\)\\|PERS\\|TODO\\|UNIV\\|\\..." org-todo-regexp "\\(CODE\\|DONE\\|ERND\\|KILL\\|M\\(?:EET\\|ISC\\)\\|NO\\|OKA..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CODE\\|DONE\\|ERND\\|KILL\\|M\\(?:EET\\|..." mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/todo.org" urgency 1000 priority 1000 org-marker #<marker (moves after insertion) at 13733 in todo.org> ...)))
  calfw-blocks-render-calendar-cells-days(((init-date 1 17 2024) (contents-sources ...) (annotation-sources) (sorter . string-lessp) (begin-date 1 17 2024) (end-date 1 19 2024) (holidays ... ... ... ... ... ... ... ... ... ...) (annotations) (contents ... ... ...) (periods) (headers 3 4 5) (weeks ...)) ((cell-width . 51) (cell-height . 96) (total-width . 162) (columns . 3) (time-width . 5) (time-hline . "     ") (eol . "\n") (vl . ...) (hline . ...) (cline . ...)) #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_10> ((1 17 2024) (1 18 2024) (1 19 2024)) calfw-blocks-render-content t)
  calfw-blocks-render-calendar-cells-block-weeks(((init-date 1 17 2024) (contents-sources ...) (annotation-sources) (sorter . string-lessp) (begin-date 1 17 2024) (end-date 1 19 2024) (holidays ... ... ... ... ... ... ... ... ... ...) (annotations) (contents ... ... ...) (periods) (headers 3 4 5) (weeks ...)) ((cell-width . 51) (cell-height . 96) (total-width . 162) (columns . 3) (time-width . 5) (time-hline . "     ") (eol . "\n") (vl . ...) (hline . ...) (cline . ...)) #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_10>)
  calfw-blocks-view-block-nday-week(3 #s(cfw:component :dest #s(cfw:dest :type buffer :buffer #<buffer *cfw-calendar*> :min-func point-min :max-func point-max :width 164 :height 36 :clear-func #f(compiled-function () #<bytecode 0x1ba3b0d417e70a62>) :before-update-func nil :after-update-func nil :today-ol nil) :model ((init-date 1 17 2024) (contents-sources ...) (annotation-sources) (sorter . string-lessp) (begin-date 1 17 2024) (end-date 1 19 2024) (holidays ... ... ... ... ... ... ... ... ... ...) (annotations) (contents ... ... ...) (periods) (headers 3 4 5) (weeks ...)) :view block-3-day :update-hooks nil :click-hooks nil))
  calfw-blocks-view-block-3-day(#s(cfw:component :dest #s(cfw:dest :type buffer :buffer #<buffer *cfw-calendar*> :min-func point-min :max-func point-max :width 164 :height 36 :clear-func #f(compiled-function () #<bytecode 0x1ba3b0d417e70a62>) :before-update-func nil :after-update-func nil :today-ol nil) :model ((init-date 1 17 2024) (contents-sources ...) (annotation-sources) (sorter . string-lessp) (begin-date 1 17 2024) (end-date 1 19 2024) (holidays ... ... ... ... ... ... ... ... ... ...) (annotations) (contents ... ... ...) (periods) (headers 3 4 5) (weeks ...)) :view block-3-day :update-hooks nil :click-hooks nil))
  calfw-blocks--cfw-cp-update(#s(cfw:component :dest #s(cfw:dest :type buffer :buffer #<buffer *cfw-calendar*> :min-func point-min :max-func point-max :width 164 :height 36 :clear-func #f(compiled-function () #<bytecode 0x1ba3b0d417e70a62>) :before-update-func nil :after-update-func nil :today-ol nil) :model ((init-date 1 17 2024) (contents-sources ...) (annotation-sources) (sorter . string-lessp) (begin-date 1 17 2024) (end-date 1 19 2024) (holidays ... ... ... ... ... ... ... ... ... ...) (annotations) (contents ... ... ...) (periods) (headers 3 4 5) (weeks ...)) :view block-3-day :update-hooks nil :click-hooks nil))
  apply(calfw-blocks--cfw-cp-update #s(cfw:component :dest #s(cfw:dest :type buffer :buffer #<buffer *cfw-calendar*> :min-func point-min :max-func point-max :width 164 :height 36 :clear-func #f(compiled-function () #<bytecode 0x1ba3b0d417e70a62>) :before-update-func nil :after-update-func nil :today-ol nil) :model ((init-date 1 17 2024) (contents-sources #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "#788c9e" :period-bgcolor "#0c0e14" :period-fgcolor "#788c9e" :opt-face nil :opt-period-face nil :hidden nil)) (annotation-sources) (sorter . string-lessp) (begin-date 1 17 2024) (end-date 1 19 2024) (holidays (... "Hanukkah") (... "Winter Solstice 3:27am (UTC)") (... "Christmas") (... "New Year's Day") (... "Martin Luther King Day") (... "Groundhog Day") (... "Chinese New Year (Jia-Chen)") (... "Ash Wednesday") (... "Valentine's Day") (... "President's Day")) (annotations) (contents (... ... ... ... ... ...) (... ... ... ... ...) (... ... ... ...)) (periods) (headers 3 4 5) (weeks (... ... ...))) :view block-3-day :update-hooks nil :click-hooks nil))
  cfw:cp-update(#s(cfw:component :dest #s(cfw:dest :type buffer :buffer #<buffer *cfw-calendar*> :min-func point-min :max-func point-max :width 164 :height 36 :clear-func #f(compiled-function () #<bytecode 0x1ba3b0d417e70a62>) :before-update-func nil :after-update-func nil :today-ol nil) :model ((init-date 1 17 2024) (contents-sources #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "#788c9e" :period-bgcolor "#0c0e14" :period-fgcolor "#788c9e" :opt-face nil :opt-period-face nil :hidden nil)) (annotation-sources) (sorter . string-lessp) (begin-date 1 17 2024) (end-date 1 19 2024) (holidays (... "Hanukkah") (... "Winter Solstice 3:27am (UTC)") (... "Christmas") (... "New Year's Day") (... "Martin Luther King Day") (... "Groundhog Day") (... "Chinese New Year (Jia-Chen)") (... "Ash Wednesday") (... "Valentine's Day") (... "President's Day")) (annotations) (contents (... ... ... ... ... ...) (... ... ... ... ...) (... ... ... ...)) (periods) (headers 3 4 5) (weeks (... ... ...))) :view block-3-day :update-hooks nil :click-hooks nil))
  cfw:cp-set-view(#s(cfw:component :dest #s(cfw:dest :type buffer :buffer #<buffer *cfw-calendar*> :min-func point-min :max-func point-max :width 164 :height 36 :clear-func #f(compiled-function () #<bytecode 0x1ba3b0d417e70a62>) :before-update-func nil :after-update-func nil :today-ol nil) :model ((init-date 1 17 2024) (contents-sources #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "#788c9e" :period-bgcolor "#0c0e14" :period-fgcolor "#788c9e" :opt-face nil :opt-period-face nil :hidden nil)) (annotation-sources) (sorter . string-lessp) (begin-date 1 17 2024) (end-date 1 19 2024) (holidays (... "Hanukkah") (... "Winter Solstice 3:27am (UTC)") (... "Christmas") (... "New Year's Day") (... "Martin Luther King Day") (... "Groundhog Day") (... "Chinese New Year (Jia-Chen)") (... "Ash Wednesday") (... "Valentine's Day") (... "President's Day")) (annotations) (contents (... ... ... ... ... ...) (... ... ... ... ...) (... ... ... ...)) (periods) (headers 3 4 5) (weeks (... ... ...))) :view block-3-day :update-hooks nil :click-hooks nil) block-3-day)
  #f(compiled-function () (interactive nil) #<bytecode 0x19230588891fc0>)()
  funcall-interactively(#f(compiled-function () (interactive nil) #<bytecode 0x19230588891fc0>))
  command-execute(#f(compiled-function () (interactive nil) #<bytecode 0x19230588891fc0>))

This is my todo.org right now: https://0x0.st/H0qB.txt

haji-ali commented 6 months ago

Can you also share which version of calfw are you using? I am using my fork of it which implements certain features.

agenbite commented 2 months ago

I'm definitely using your fork, yes.

haji-ali commented 2 months ago

I'm definitely using your fork, yes.

@agenbite, just to confirm, is that both of calfw and calfw-blocks? Is your error similar to @ziova? If not can you include a backtrace?

I just cannot see how the function as implemented can give such an error if my fork is being used.

agenbite commented 2 months ago

Yeah, both are installed from github:

    (use-package calfw
      :straight (calfw
                 :host github
                 :repo "haji-ali/emacs-calfw")
      :ensure t)

    (use-package calfw-org
      :straight (calfw-org
                 :host github
                 :repo "haji-ali/emacs-calfw")
      :ensure t)

    (use-package calfw-blocks
      :straight (calfw-blocks
                 :host github
                 :repo "haji-ali/calfw-blocks")
      :ensure t)

This is the error trace:

Debugger entered--Lisp error: (wrong-type-argument cfw:event nil)
  signal(wrong-type-argument (cfw:event nil))
  (or (let* ((cl-x cl-x)) (progn (and (memq (type-of cl-x) cl-struct-cfw:event-tags) t))) (signal 'wrong-type-argument (list 'cfw:event cl-x)))
  (progn (or (let* ((cl-x cl-x)) (progn (and (memq (type-of cl-x) cl-struct-cfw:event-tags) t))) (signal 'wrong-type-argument (list 'cfw:event cl-x))) (aref cl-x 9))
  (let* ((cl-x event)) (progn (or (let* ((cl-x cl-x)) (progn (and (memq (type-of cl-x) cl-struct-cfw:event-tags) t))) (signal 'wrong-type-argument (list 'cfw:event cl-x))) (aref cl-x 9)))
  (let* ((temp (let* ((cl-x event)) (progn (or (let* (...) (progn ...)) (signal 'wrong-type-argument (list ... cl-x))) (aref cl-x 9))))) (cond ((eql temp 'cancelled) (if background 'calfw-blocks-cancelled-event-bg 'calfw-blocks-cancelled-event))))
  (let* ((event (get-text-property 0 'cfw:event text))) (let* ((temp (let* ((cl-x event)) (progn (or (let* ... ...) (signal ... ...)) (aref cl-x 9))))) (cond ((eql temp 'cancelled) (if background 'calfw-blocks-cancelled-event-bg 'calfw-blocks-cancelled-event)))))
  calfw-blocks--status-face(#("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (cfw:source #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil) keymap (keymap (109 . cfw:org-jump-map) (3 keymap (15 . cfw:org-onclick)) (13 . cfw:org-onclick) (mouse-1 . cfw:org-onclick)) display nil org-category "tareas" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day nil duration nil breadcrumbs nil txt #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (org-heading t effort-minutes nil effort nil fontified nil)) level "  " time "" extra "" format (((org-prefix-has-time nil) (org-prefix-has-tag nil) (org-prefix-category-length nil) (org-prefix-has-effort nil) (org-prefix-has-breadcrumbs nil)) (format " ")) dotime #("<%%(memq (calendar-day-of-week date) '(1))>" 0 43 (fontified nil)) org-not-done-regexp "\\(STARTED\\|TODO\\|WAITING\\)" org-todo-regexp "\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)" org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ \11]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \11]*$" mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/tareas.org" priority 1000 org-marker #<marker (moves after insertion) at 380 in tareas.org> org-hd-marker #<marker (moves after insertion) at 285 in tareas.org> date (5 6 2024) ...)) background)
  (or default-face (calfw-blocks--status-face str 'background) (cfw:render-get-face-content str 'cfw:face-default-content))
  (let* ((i 0) (--cl-var-- (length str)) (ret (substring str 0)) (face (or default-face (calfw-blocks--status-face str 'background) (cfw:render-get-face-content str 'cfw:face-default-content)))) (while (< i --cl-var--) (if (get-text-property i 'face ret) (progn) (put-text-property i (1+ i) 'face face ret) (put-text-property i (1+ i) 'font-lock-face face ret)) (setq i (+ i 1))) ret)
  calfw-blocks-render-default-content-face(#("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (cfw:source #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil) keymap (keymap (109 . cfw:org-jump-map) (3 keymap (15 . cfw:org-onclick)) (13 . cfw:org-onclick) (mouse-1 . cfw:org-onclick)) display nil org-category "tareas" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day nil duration nil breadcrumbs nil txt #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (org-heading t effort-minutes nil effort nil fontified nil)) level "  " time "" extra "" format (((org-prefix-has-time nil) (org-prefix-has-tag nil) (org-prefix-category-length nil) (org-prefix-has-effort nil) (org-prefix-has-breadcrumbs nil)) (format " ")) dotime #("<%%(memq (calendar-day-of-week date) '(1))>" 0 43 (fontified nil)) org-not-done-regexp "\\(STARTED\\|TODO\\|WAITING\\)" org-todo-regexp "\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)" org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ \11]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \11]*$" mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/tareas.org" priority 1000 org-marker #<marker (moves after insertion) at 380 in tareas.org> org-hd-marker #<marker (moves after insertion) at 285 in tareas.org> date (5 6 2024) ...)))
  mapcar(calfw-blocks-render-default-content-face (#("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (cfw:source #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil) keymap (keymap (109 . cfw:org-jump-map) (3 keymap (15 . cfw:org-onclick)) (13 . cfw:org-onclick) (mouse-1 . cfw:org-onclick)) display nil org-category "tareas" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day nil duration nil breadcrumbs nil txt #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (org-heading t effort-minutes nil effort nil fontified nil)) level "  " time "" extra "" format (((org-prefix-has-time nil) (org-prefix-has-tag nil) (org-prefix-category-length nil) (org-prefix-has-effort nil) (org-prefix-has-breadcrumbs nil)) (format " ")) dotime #("<%%(memq (calendar-day-of-week date) '(1))>" 0 43 (fontified nil)) org-not-done-regexp "\\(STARTED\\|TODO\\|WAITING\\)" org-todo-regexp "\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)" org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ \11]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \11]*$" mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/tareas.org" priority 1000 org-marker #<marker (moves after insertion) at 380 in tareas.org> org-hd-marker #<marker (moves after insertion) at 285 in tareas.org> date (5 6 2024) ...))))
  (append (if do-weeks (calfw-blocks-render-periods date raw-periods cell-width model) (calfw-blocks-render-periods-days date raw-periods cell-width)) (mapcar 'calfw-blocks-render-default-content-face raw-contents))
  (setq prs-contents (append (if do-weeks (calfw-blocks-render-periods date raw-periods cell-width model) (calfw-blocks-render-periods-days date raw-periods cell-width)) (mapcar 'calfw-blocks-render-default-content-face raw-contents)))
  (while (and (consp --cl-var--) (progn (setq date (car --cl-var--)) (< count --cl-var--))) (setq hday (car (cfw:contents-get date holidays))) (setq week-day (nth (% count 7) headers)) (setq ant (cfw:rt (cfw:contents-get date annotations) 'cfw:face-annotation)) (setq raw-periods (cfw:contents-get date raw-periods-all)) (setq raw-contents (sort (funcall content-fun (cfw:model-get-contents-by-date date model)) sorter)) (setq prs-contents (append (if do-weeks (calfw-blocks-render-periods date raw-periods cell-width model) (calfw-blocks-render-periods-days date raw-periods cell-width)) (mapcar 'calfw-blocks-render-default-content-face raw-contents))) (setq num-label (if prs-contents (format "(%s)" (+ (length raw-contents) (length raw-periods))) "")) (setq tday (concat " " (funcall title-func date week-day hday) (if num-label (concat " " num-label)) (if hday (concat " " (cfw:rt (substring hday 0) 'cfw:face-holiday))))) (setq --cl-var-- (cons (cons date (cons (cons tday ant) prs-contents)) --cl-var--)) (setq --cl-var-- (cdr --cl-var--)) (setq count (+ count 1)) (setq --cl-var-- nil))
  (let* ((cell-width (cfw:k 'cell-width param)) (days (or days (cfw:k 'days model))) (content-fun (or content-fun 'cfw:render-event-days-overview-content)) (holidays (cfw:k 'holidays model)) (annotations (cfw:k 'annotations model)) (headers (cfw:k 'headers model)) (raw-periods-all (calfw-blocks-render-periods-stacks model)) (sorter (cfw:model-get-sorter model)) (--cl-var-- days) (date nil) (count 0) (--cl-var-- (length days)) (hday nil) (week-day nil) (ant nil) (raw-periods nil) (raw-contents nil) (prs-contents nil) (num-label nil) (tday nil) (--cl-var-- nil) (--cl-var-- t)) (while (and (consp --cl-var--) (progn (setq date (car --cl-var--)) (< count --cl-var--))) (setq hday (car (cfw:contents-get date holidays))) (setq week-day (nth (% count 7) headers)) (setq ant (cfw:rt (cfw:contents-get date annotations) 'cfw:face-annotation)) (setq raw-periods (cfw:contents-get date raw-periods-all)) (setq raw-contents (sort (funcall content-fun (cfw:model-get-contents-by-date date model)) sorter)) (setq prs-contents (append (if do-weeks (calfw-blocks-render-periods date raw-periods cell-width model) (calfw-blocks-render-periods-days date raw-periods cell-width)) (mapcar 'calfw-blocks-render-default-content-face raw-contents))) (setq num-label (if prs-contents (format "(%s)" (+ (length raw-contents) (length raw-periods))) "")) (setq tday (concat " " (funcall title-func date week-day hday) (if num-label (concat " " num-label)) (if hday (concat " " (cfw:rt (substring hday 0) 'cfw:face-holiday))))) (setq --cl-var-- (cons (cons date (cons (cons tday ant) prs-contents)) --cl-var--)) (setq --cl-var-- (cdr --cl-var--)) (setq count (+ count 1)) (setq --cl-var-- nil)) (nreverse --cl-var--))
  (calfw-blocks-render-columns (let* ((cell-width (cfw:k 'cell-width param)) (days (or days (cfw:k 'days model))) (content-fun (or content-fun 'cfw:render-event-days-overview-content)) (holidays (cfw:k 'holidays model)) (annotations (cfw:k 'annotations model)) (headers (cfw:k 'headers model)) (raw-periods-all (calfw-blocks-render-periods-stacks model)) (sorter (cfw:model-get-sorter model)) (--cl-var-- days) (date nil) (count 0) (--cl-var-- (length days)) (hday nil) (week-day nil) (ant nil) (raw-periods nil) (raw-contents nil) (prs-contents nil) (num-label nil) (tday nil) (--cl-var-- nil) (--cl-var-- t)) (while (and (consp --cl-var--) (progn (setq date (car --cl-var--)) (< count --cl-var--))) (setq hday (car (cfw:contents-get date holidays))) (setq week-day (nth (% count 7) headers)) (setq ant (cfw:rt (cfw:contents-get date annotations) 'cfw:face-annotation)) (setq raw-periods (cfw:contents-get date raw-periods-all)) (setq raw-contents (sort (funcall content-fun (cfw:model-get-contents-by-date date model)) sorter)) (setq prs-contents (append (if do-weeks (calfw-blocks-render-periods date raw-periods cell-width model) (calfw-blocks-render-periods-days date raw-periods cell-width)) (mapcar 'calfw-blocks-render-default-content-face raw-contents))) (setq num-label (if prs-contents (format "(%s)" (+ (length raw-contents) (length raw-periods))) "")) (setq tday (concat " " (funcall title-func date week-day hday) (if num-label (concat " " num-label)) (if hday (concat " " (cfw:rt ... ...))))) (setq --cl-var-- (cons (cons date (cons (cons tday ant) prs-contents)) --cl-var--)) (setq --cl-var-- (cdr --cl-var--)) (setq count (+ count 1)) (setq --cl-var-- nil)) (nreverse --cl-var--)) param)
  calfw-blocks-render-calendar-cells-days(((init-date 5 10 2024) (contents-sources #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil)) (annotation-sources) (sorter . string-lessp) (begin-date 5 6 2024) (end-date 5 12 2024) (holidays ((4 1 2024) "April Fools' Day") ((4 21 2024) "First Day of Ridvan") ((4 23 2024) "Passover") ((4 29 2024) "Ninth Day of Ridvan") ((5 2 2024) "Twelfth Day of Ridvan") ((5 12 2024) "Mother's Day") ((5 23 2024) "Declaration of the Báb") ((5 27 2024) "Memorial Day") ((5 29 2024) "Ascension of Bahá’u’lláh") ((6 12 2024) "Shavuot") ((6 14 2024) "Flag Day") ((6 16 2024) "Father's Day") ((6 20 2024) "Summer Solstice 10:50pm (CEST)")) (annotations) (contents ((5 6 2024) #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (cfw:source #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil) keymap (keymap (109 . cfw:org-jump-map) (3 keymap ...) (13 . cfw:org-onclick) (mouse-1 . cfw:org-onclick)) display nil org-category "tareas" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day nil duration nil breadcrumbs nil txt #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (org-heading t effort-minutes nil effort nil fontified nil)) level "  " time "" extra "" format ((... ... ... ... ...) (format " ")) dotime #("<%%(memq (calendar-day-of-week date) '(1))>" 0 43 (fontified nil)) org-not-done-regexp "\\(STARTED\\|TODO\\|WAITING\\)" org-todo-regexp "\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)" org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ \11]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \11]*$" mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/tareas.org" priority 1000 org-marker #<marker (moves after insertion) at 380 in tareas.org> org-hd-marker #<marker (moves after insertion) at 285 in tareas.org> date (5 6 2024) ...)))) (periods) (headers 1 2 3 4 5 6 0) (weeks ((5 6 2024) (5 7 2024) (5 8 2024) (5 9 2024) (5 10 2024) (5 11 2024) (5 12 2024)))) ((cell-width . 20) (cell-height . 72) (total-width . 153) (columns . 7) (time-width . 5) (time-hline . "     ") (eol . "\n") (vl . #("|" 0 1 (font-lock-face cfw:face-grid face cfw:face-grid))) (hline . #("+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+\n" 0 149 (font-lock-face cfw:face-grid face cfw:face-grid))) (cline . #("+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+\n" 0 149 (font-lock-face cfw:face-grid face cfw:face-grid)))) (closure (t) (date week-day hday) (cfw:rt (format "%s" (calendar-extract-day date)) (if hday 'cfw:face-sunday (cfw:render-get-week-face week-day 'cfw:face-default-day)))) ((5 6 2024) (5 7 2024) (5 8 2024) (5 9 2024) (5 10 2024) (5 11 2024) (5 12 2024)) calfw-blocks-render-content t)
  (while (consp --cl-var--) (setq week (car --cl-var--)) (calfw-blocks-render-calendar-cells-days model param title-func week 'calfw-blocks-render-content t) (setq --cl-var-- (cdr --cl-var--)))
  (let* ((--cl-var-- (cfw:k 'weeks model)) (week nil)) (while (consp --cl-var--) (setq week (car --cl-var--)) (calfw-blocks-render-calendar-cells-days model param title-func week 'calfw-blocks-render-content t) (setq --cl-var-- (cdr --cl-var--))) nil)
  calfw-blocks-render-calendar-cells-block-weeks(((init-date 5 10 2024) (contents-sources #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil)) (annotation-sources) (sorter . string-lessp) (begin-date 5 6 2024) (end-date 5 12 2024) (holidays ((4 1 2024) "April Fools' Day") ((4 21 2024) "First Day of Ridvan") ((4 23 2024) "Passover") ((4 29 2024) "Ninth Day of Ridvan") ((5 2 2024) "Twelfth Day of Ridvan") ((5 12 2024) "Mother's Day") ((5 23 2024) "Declaration of the Báb") ((5 27 2024) "Memorial Day") ((5 29 2024) "Ascension of Bahá’u’lláh") ((6 12 2024) "Shavuot") ((6 14 2024) "Flag Day") ((6 16 2024) "Father's Day") ((6 20 2024) "Summer Solstice 10:50pm (CEST)")) (annotations) (contents ((5 6 2024) #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (cfw:source #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil) keymap (keymap (109 . cfw:org-jump-map) (3 keymap ...) (13 . cfw:org-onclick) (mouse-1 . cfw:org-onclick)) display nil org-category "tareas" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day nil duration nil breadcrumbs nil txt #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (org-heading t effort-minutes nil effort nil fontified nil)) level "  " time "" extra "" format ((... ... ... ... ...) (format " ")) dotime #("<%%(memq (calendar-day-of-week date) '(1))>" 0 43 (fontified nil)) org-not-done-regexp "\\(STARTED\\|TODO\\|WAITING\\)" org-todo-regexp "\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)" org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ \11]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \11]*$" mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/tareas.org" priority 1000 org-marker #<marker (moves after insertion) at 380 in tareas.org> org-hd-marker #<marker (moves after insertion) at 285 in tareas.org> date (5 6 2024) ...)))) (periods) (headers 1 2 3 4 5 6 0) (weeks ((5 6 2024) (5 7 2024) (5 8 2024) (5 9 2024) (5 10 2024) (5 11 2024) (5 12 2024)))) ((cell-width . 20) (cell-height . 72) (total-width . 153) (columns . 7) (time-width . 5) (time-hline . "     ") (eol . "\n") (vl . #("|" 0 1 (font-lock-face cfw:face-grid face cfw:face-grid))) (hline . #("+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+\n" 0 149 (font-lock-face cfw:face-grid face cfw:face-grid))) (cline . #("+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+\n" 0 149 (font-lock-face cfw:face-grid face cfw:face-grid)))) (closure (t) (date week-day hday) (cfw:rt (format "%s" (calendar-extract-day date)) (if hday 'cfw:face-sunday (cfw:render-get-week-face week-day 'cfw:face-default-day)))))
  (let* ((dest (let* ((cl-x component)) (progn (or (let* (...) (progn ...)) (signal 'wrong-type-argument (list ... cl-x))) (aref cl-x 1)))) (param (cfw:render-append-parts (calfw-blocks-view-nday-week-calc-param n dest))) (total-width (cfw:k 'total-width param)) (time-width (cfw:k 'time-width param)) (EOL (cfw:k 'eol param)) (VL (cfw:k 'vl param)) (time-hline (cfw:k 'time-hline param)) (hline (concat time-hline (cfw:k 'hline param))) (cline (concat time-hline (cfw:k 'cline param))) (model (if model model (calfw-blocks-view-block-nday-week-model n (let* ((cl-x component)) (progn (or ... ...) (aref cl-x 2)))))) (begin-date (cfw:k 'begin-date model)) (end-date (cfw:k 'end-date model)) day-of-week-names) (set (make-local-variable 'calfw-blocks-days-per-view) n) (let* ((cl-x component)) (or (let* ((cl-x cl-x)) (progn (and (memq (type-of cl-x) cl-struct-cfw:component-tags) t))) (signal 'wrong-type-argument (list 'cfw:component cl-x))) (let* ((v cl-x)) (aset v 2 model))) (setq day-of-week-names (let* ((date begin-date) (--cl-var-- (cfw:k 'headers model)) (i nil) (VL (cfw:k 'vl param)) (cell-width (cfw:k 'cell-width param)) (--cl-var-- "")) (while (consp --cl-var--) (setq i (car --cl-var--)) (setq --cl-var-- (concat --cl-var-- (concat VL (cfw:tp ... ... date)))) (setq date (cfw:date-after date 1)) (setq --cl-var-- (cdr --cl-var--))) --cl-var--)) (setq calfw-blocks-header-line-string (concat "  " (calendar-month-name (calendar-extract-month begin-date) t) " " day-of-week-names)) (setq header-line-format '((:eval (if (< (line-number-at-pos ...) 6) "" calfw-blocks-header-line-string)))) (insert "\n" (cfw:rt (cfw:render-title-period begin-date end-date) 'cfw:face-title) EOL (calfw-blocks-render-toolbar total-width (let* ((cl-x component)) (progn (or (let* (...) (progn ...)) (signal 'wrong-type-argument (list ... cl-x))) (aref cl-x 3))) (calfw-blocks-navi-previous-nday-week-command n) (calfw-blocks-navi-next-nday-week-command n)) EOL hline) (insert (cfw:rt (cfw:render-right time-width "Time") 'default)) (insert day-of-week-names) (insert VL EOL cline) (calfw-blocks-render-calendar-cells-block-weeks model param #'(lambda (date week-day hday) (cfw:rt (format "%s" (calendar-extract-day date)) (if hday 'cfw:face-sunday (cfw:render-get-week-face week-day 'cfw:face-default-day))))) (insert (cfw:render-footer total-width (cfw:model-get-contents-sources model))))
  calfw-blocks-view-block-nday-week(7 #s(cfw:component :dest #s(cfw:dest :type buffer :buffer #<buffer *cfw-calendar*> :min-func point-min :max-func point-max :width 159 :height 50 :clear-func #f(compiled-function () #<bytecode 0x1593c80a510cf6f4>) :before-update-func nil :after-update-func nil :today-ol nil) :model ((init-date 5 10 2024) (contents-sources #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil)) (annotation-sources) (sorter . string-lessp) (begin-date 5 6 2024) (end-date 5 12 2024) (holidays ((4 1 2024) "April Fools' Day") ((4 21 2024) "First Day of Ridvan") ((4 23 2024) "Passover") ((4 29 2024) "Ninth Day of Ridvan") ((5 2 2024) "Twelfth Day of Ridvan") ((5 12 2024) "Mother's Day") ((5 23 2024) "Declaration of the Báb") ((5 27 2024) "Memorial Day") ((5 29 2024) "Ascension of Bahá’u’lláh") ((6 12 2024) "Shavuot") ((6 14 2024) "Flag Day") ((6 16 2024) "Father's Day") ((6 20 2024) "Summer Solstice 10:50pm (CEST)")) (annotations) (contents ((5 6 2024) #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (cfw:source #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil) keymap (keymap ... ... ... ...) display nil org-category "tareas" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day nil duration nil breadcrumbs nil txt #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 ...) level "  " time "" extra "" format (... ...) dotime #("<%%(memq (calendar-day-of-week date) '(1))>" 0 43 ...) org-not-done-regexp "\\(STARTED\\|TODO\\|WAITING\\)" org-todo-regexp "\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)" org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ \11]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \11]*$" mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/tareas.org" priority 1000 org-marker #<marker (moves after insertion) at 380 in tareas.org> org-hd-marker #<marker (moves after insertion) at 285 in tareas.org> date (5 6 2024) ...)))) (periods) (headers 1 2 3 4 5 6 0) (weeks ((5 6 2024) (5 7 2024) (5 8 2024) (5 9 2024) (5 10 2024) (5 11 2024) (5 12 2024)))) :view block-week :update-hooks nil :click-hooks nil) ((init-date 5 10 2024) (contents-sources #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil)) (annotation-sources) (sorter . string-lessp) (begin-date 5 6 2024) (end-date 5 12 2024) (holidays ((4 1 2024) "April Fools' Day") ((4 21 2024) "First Day of Ridvan") ((4 23 2024) "Passover") ((4 29 2024) "Ninth Day of Ridvan") ((5 2 2024) "Twelfth Day of Ridvan") ((5 12 2024) "Mother's Day") ((5 23 2024) "Declaration of the Báb") ((5 27 2024) "Memorial Day") ((5 29 2024) "Ascension of Bahá’u’lláh") ((6 12 2024) "Shavuot") ((6 14 2024) "Flag Day") ((6 16 2024) "Father's Day") ((6 20 2024) "Summer Solstice 10:50pm (CEST)")) (annotations) (contents ((5 6 2024) #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (cfw:source #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil) keymap (keymap (109 . cfw:org-jump-map) (3 keymap ...) (13 . cfw:org-onclick) (mouse-1 . cfw:org-onclick)) display nil org-category "tareas" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day nil duration nil breadcrumbs nil txt #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (org-heading t effort-minutes nil effort nil fontified nil)) level "  " time "" extra "" format ((... ... ... ... ...) (format " ")) dotime #("<%%(memq (calendar-day-of-week date) '(1))>" 0 43 (fontified nil)) org-not-done-regexp "\\(STARTED\\|TODO\\|WAITING\\)" org-todo-regexp "\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)" org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ \11]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \11]*$" mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/tareas.org" priority 1000 org-marker #<marker (moves after insertion) at 380 in tareas.org> org-hd-marker #<marker (moves after insertion) at 285 in tareas.org> date (5 6 2024) ...)))) (periods) (headers 1 2 3 4 5 6 0) (weeks ((5 6 2024) (5 7 2024) (5 8 2024) (5 9 2024) (5 10 2024) (5 11 2024) (5 12 2024)))))
  calfw-blocks-view-block-week(#s(cfw:component :dest #s(cfw:dest :type buffer :buffer #<buffer *cfw-calendar*> :min-func point-min :max-func point-max :width 159 :height 50 :clear-func #f(compiled-function () #<bytecode 0x1593c80a510cf6f4>) :before-update-func nil :after-update-func nil :today-ol nil) :model ((init-date 5 10 2024) (contents-sources #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil)) (annotation-sources) (sorter . string-lessp) (begin-date 5 6 2024) (end-date 5 12 2024) (holidays ((4 1 2024) "April Fools' Day") ((4 21 2024) "First Day of Ridvan") ((4 23 2024) "Passover") ((4 29 2024) "Ninth Day of Ridvan") ((5 2 2024) "Twelfth Day of Ridvan") ((5 12 2024) "Mother's Day") ((5 23 2024) "Declaration of the Báb") ((5 27 2024) "Memorial Day") ((5 29 2024) "Ascension of Bahá’u’lláh") ((6 12 2024) "Shavuot") ((6 14 2024) "Flag Day") ((6 16 2024) "Father's Day") ((6 20 2024) "Summer Solstice 10:50pm (CEST)")) (annotations) (contents ((5 6 2024) #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (cfw:source #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil) keymap (keymap ... ... ... ...) display nil org-category "tareas" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day nil duration nil breadcrumbs nil txt #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 ...) level "  " time "" extra "" format (... ...) dotime #("<%%(memq (calendar-day-of-week date) '(1))>" 0 43 ...) org-not-done-regexp "\\(STARTED\\|TODO\\|WAITING\\)" org-todo-regexp "\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)" org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ \11]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \11]*$" mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/tareas.org" priority 1000 org-marker #<marker (moves after insertion) at 380 in tareas.org> org-hd-marker #<marker (moves after insertion) at 285 in tareas.org> date (5 6 2024) ...)))) (periods) (headers 1 2 3 4 5 6 0) (weeks ((5 6 2024) (5 7 2024) (5 8 2024) (5 9 2024) (5 10 2024) (5 11 2024) (5 12 2024)))) :view block-week :update-hooks nil :click-hooks nil))
  funcall(calfw-blocks-view-block-week #s(cfw:component :dest #s(cfw:dest :type buffer :buffer #<buffer *cfw-calendar*> :min-func point-min :max-func point-max :width 159 :height 50 :clear-func #f(compiled-function () #<bytecode 0x1593c80a510cf6f4>) :before-update-func nil :after-update-func nil :today-ol nil) :model ((init-date 5 10 2024) (contents-sources #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil)) (annotation-sources) (sorter . string-lessp) (begin-date 5 6 2024) (end-date 5 12 2024) (holidays ((4 1 2024) "April Fools' Day") ((4 21 2024) "First Day of Ridvan") ((4 23 2024) "Passover") ((4 29 2024) "Ninth Day of Ridvan") ((5 2 2024) "Twelfth Day of Ridvan") ((5 12 2024) "Mother's Day") ((5 23 2024) "Declaration of the Báb") ((5 27 2024) "Memorial Day") ((5 29 2024) "Ascension of Bahá’u’lláh") ((6 12 2024) "Shavuot") ((6 14 2024) "Flag Day") ((6 16 2024) "Father's Day") ((6 20 2024) "Summer Solstice 10:50pm (CEST)")) (annotations) (contents ((5 6 2024) #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (cfw:source #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil) keymap (keymap ... ... ... ...) display nil org-category "tareas" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day nil duration nil breadcrumbs nil txt #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 ...) level "  " time "" extra "" format (... ...) dotime #("<%%(memq (calendar-day-of-week date) '(1))>" 0 43 ...) org-not-done-regexp "\\(STARTED\\|TODO\\|WAITING\\)" org-todo-regexp "\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)" org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ \11]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \11]*$" mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/tareas.org" priority 1000 org-marker #<marker (moves after insertion) at 380 in tareas.org> org-hd-marker #<marker (moves after insertion) at 285 in tareas.org> date (5 6 2024) ...)))) (periods) (headers 1 2 3 4 5 6 0) (weeks ((5 6 2024) (5 7 2024) (5 8 2024) (5 9 2024) (5 10 2024) (5 11 2024) (5 12 2024)))) :view block-week :update-hooks nil :click-hooks nil))
  (save-restriction (narrow-to-region (cfw:dest-point-min g12) (cfw:dest-point-max g12)) (cfw:dest-clear dest) (funcall (cfw:cp-dispatch-view-impl (let* ((cl-x component)) (progn (or (let* (...) (progn ...)) (signal 'wrong-type-argument (list ... cl-x))) (aref cl-x 3)))) component))
  (save-current-buffer (set-buffer (let* ((cl-x g12)) (progn (or (let* ((cl-x cl-x)) (progn (and ... t))) (signal 'wrong-type-argument (list 'cfw:dest cl-x))) (aref cl-x 2)))) (save-restriction (narrow-to-region (cfw:dest-point-min g12) (cfw:dest-point-max g12)) (cfw:dest-clear dest) (funcall (cfw:cp-dispatch-view-impl (let* ((cl-x component)) (progn (or (let* ... ...) (signal ... ...)) (aref cl-x 3)))) component)))
  (let ((g12 dest)) (save-current-buffer (set-buffer (let* ((cl-x g12)) (progn (or (let* (...) (progn ...)) (signal 'wrong-type-argument (list ... cl-x))) (aref cl-x 2)))) (save-restriction (narrow-to-region (cfw:dest-point-min g12) (cfw:dest-point-max g12)) (cfw:dest-clear dest) (funcall (cfw:cp-dispatch-view-impl (let* ((cl-x component)) (progn (or ... ...) (aref cl-x 3)))) component))))
  (let* ((buffer-read-only nil)) (let ((g12 dest)) (save-current-buffer (set-buffer (let* ((cl-x g12)) (progn (or (let* ... ...) (signal ... ...)) (aref cl-x 2)))) (save-restriction (narrow-to-region (cfw:dest-point-min g12) (cfw:dest-point-max g12)) (cfw:dest-clear dest) (funcall (cfw:cp-dispatch-view-impl (let* (...) (progn ... ...))) component)))))
  (save-current-buffer (set-buffer buf) (cfw:dest-before-update dest) (cfw:dest-ol-today-clear dest) (let* ((buffer-read-only nil)) (let ((g12 dest)) (save-current-buffer (set-buffer (let* ((cl-x g12)) (progn (or ... ...) (aref cl-x 2)))) (save-restriction (narrow-to-region (cfw:dest-point-min g12) (cfw:dest-point-max g12)) (cfw:dest-clear dest) (funcall (cfw:cp-dispatch-view-impl (let* ... ...)) component))))) (if (eq (let* ((cl-x component)) (progn (or (let* (...) (progn ...)) (signal 'wrong-type-argument (list ... cl-x))) (aref cl-x 3))) 'block-week) (calfw-blocks-dest-ol-today-set dest) (if cfw:highlight-today (progn (cfw:dest-ol-today-set dest)))) (if initial-date (progn (cfw:cp-goto-date component initial-date))) (cfw:dest-after-update dest) (cfw:cp-fire-update-hooks component))
  (let* ((buf (cfw:cp-get-buffer component)) (dest (let* ((cl-x component)) (progn (or (let* (...) (progn ...)) (signal 'wrong-type-argument (list ... cl-x))) (aref cl-x 1))))) (save-current-buffer (set-buffer buf) (cfw:dest-before-update dest) (cfw:dest-ol-today-clear dest) (let* ((buffer-read-only nil)) (let ((g12 dest)) (save-current-buffer (set-buffer (let* (...) (progn ... ...))) (save-restriction (narrow-to-region (cfw:dest-point-min g12) (cfw:dest-point-max g12)) (cfw:dest-clear dest) (funcall (cfw:cp-dispatch-view-impl ...) component))))) (if (eq (let* ((cl-x component)) (progn (or (let* ... ...) (signal ... ...)) (aref cl-x 3))) 'block-week) (calfw-blocks-dest-ol-today-set dest) (if cfw:highlight-today (progn (cfw:dest-ol-today-set dest)))) (if initial-date (progn (cfw:cp-goto-date component initial-date))) (cfw:dest-after-update dest) (cfw:cp-fire-update-hooks component)))
  calfw-blocks--cfw-cp-update(#s(cfw:component :dest #s(cfw:dest :type buffer :buffer #<buffer *cfw-calendar*> :min-func point-min :max-func point-max :width 159 :height 50 :clear-func #f(compiled-function () #<bytecode 0x1593c80a510cf6f4>) :before-update-func nil :after-update-func nil :today-ol nil) :model ((init-date 5 10 2024) (contents-sources #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil)) (annotation-sources) (sorter . string-lessp) (begin-date 5 6 2024) (end-date 5 12 2024) (holidays ((4 1 2024) "April Fools' Day") ((4 21 2024) "First Day of Ridvan") ((4 23 2024) "Passover") ((4 29 2024) "Ninth Day of Ridvan") ((5 2 2024) "Twelfth Day of Ridvan") ((5 12 2024) "Mother's Day") ((5 23 2024) "Declaration of the Báb") ((5 27 2024) "Memorial Day") ((5 29 2024) "Ascension of Bahá’u’lláh") ((6 12 2024) "Shavuot") ((6 14 2024) "Flag Day") ((6 16 2024) "Father's Day") ((6 20 2024) "Summer Solstice 10:50pm (CEST)")) (annotations) (contents ((5 6 2024) #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (cfw:source #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil) keymap (keymap ... ... ... ...) display nil org-category "tareas" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day nil duration nil breadcrumbs nil txt #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 ...) level "  " time "" extra "" format (... ...) dotime #("<%%(memq (calendar-day-of-week date) '(1))>" 0 43 ...) org-not-done-regexp "\\(STARTED\\|TODO\\|WAITING\\)" org-todo-regexp "\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)" org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ \11]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \11]*$" mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/tareas.org" priority 1000 org-marker #<marker (moves after insertion) at 380 in tareas.org> org-hd-marker #<marker (moves after insertion) at 285 in tareas.org> date (5 6 2024) ...)))) (periods) (headers 1 2 3 4 5 6 0) (weeks ((5 6 2024) (5 7 2024) (5 8 2024) (5 9 2024) (5 10 2024) (5 11 2024) (5 12 2024)))) :view block-week :update-hooks nil :click-hooks nil) nil)
  apply(calfw-blocks--cfw-cp-update (#s(cfw:component :dest #s(cfw:dest :type buffer :buffer #<buffer *cfw-calendar*> :min-func point-min :max-func point-max :width 159 :height 50 :clear-func #f(compiled-function () #<bytecode 0x1593c80a510cf6f4>) :before-update-func nil :after-update-func nil :today-ol nil) :model ((init-date 5 10 2024) (contents-sources #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil)) (annotation-sources) (sorter . string-lessp) (begin-date 5 6 2024) (end-date 5 12 2024) (holidays ((4 1 2024) "April Fools' Day") ((4 21 2024) "First Day of Ridvan") ((4 23 2024) "Passover") ((4 29 2024) "Ninth Day of Ridvan") ((5 2 2024) "Twelfth Day of Ridvan") ((5 12 2024) "Mother's Day") ((5 23 2024) "Declaration of the Báb") ((5 27 2024) "Memorial Day") ((5 29 2024) "Ascension of Bahá’u’lláh") ((6 12 2024) "Shavuot") ((6 14 2024) "Flag Day") ((6 16 2024) "Father's Day") ((6 20 2024) "Summer Solstice 10:50pm (CEST)")) (annotations) (contents ((5 6 2024) #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (cfw:source ... keymap ... display nil org-category "tareas" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day nil duration nil breadcrumbs nil txt ... level "  " time "" extra "" format ... dotime ... org-not-done-regexp "\\(STARTED\\|TODO\\|WAITING\\)" org-todo-regexp "\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)" org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ \11]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \11]*$" mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/tareas.org" priority 1000 org-marker #<marker (moves after insertion) at 380 in tareas.org> org-hd-marker #<marker (moves after insertion) at 285 in tareas.org> date ... ...)))) (periods) (headers 1 2 3 4 5 6 0) (weeks ((5 6 2024) (5 7 2024) (5 8 2024) (5 9 2024) (5 10 2024) (5 11 2024) (5 12 2024)))) :view block-week :update-hooks nil :click-hooks nil) nil))
  cfw:cp-update(#s(cfw:component :dest #s(cfw:dest :type buffer :buffer #<buffer *cfw-calendar*> :min-func point-min :max-func point-max :width 159 :height 50 :clear-func #f(compiled-function () #<bytecode 0x1593c80a510cf6f4>) :before-update-func nil :after-update-func nil :today-ol nil) :model ((init-date 5 10 2024) (contents-sources #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil)) (annotation-sources) (sorter . string-lessp) (begin-date 5 6 2024) (end-date 5 12 2024) (holidays ((4 1 2024) "April Fools' Day") ((4 21 2024) "First Day of Ridvan") ((4 23 2024) "Passover") ((4 29 2024) "Ninth Day of Ridvan") ((5 2 2024) "Twelfth Day of Ridvan") ((5 12 2024) "Mother's Day") ((5 23 2024) "Declaration of the Báb") ((5 27 2024) "Memorial Day") ((5 29 2024) "Ascension of Bahá’u’lláh") ((6 12 2024) "Shavuot") ((6 14 2024) "Flag Day") ((6 16 2024) "Father's Day") ((6 20 2024) "Summer Solstice 10:50pm (CEST)")) (annotations) (contents ((5 6 2024) #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (cfw:source #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil) keymap (keymap ... ... ... ...) display nil org-category "tareas" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day nil duration nil breadcrumbs nil txt #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 ...) level "  " time "" extra "" format (... ...) dotime #("<%%(memq (calendar-day-of-week date) '(1))>" 0 43 ...) org-not-done-regexp "\\(STARTED\\|TODO\\|WAITING\\)" org-todo-regexp "\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)" org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ \11]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \11]*$" mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/tareas.org" priority 1000 org-marker #<marker (moves after insertion) at 380 in tareas.org> org-hd-marker #<marker (moves after insertion) at 285 in tareas.org> date (5 6 2024) ...)))) (periods) (headers 1 2 3 4 5 6 0) (weeks ((5 6 2024) (5 7 2024) (5 8 2024) (5 9 2024) (5 10 2024) (5 11 2024) (5 12 2024)))) :view block-week :update-hooks nil :click-hooks nil) nil)
  cfw:cp-new(#s(cfw:dest :type buffer :buffer #<buffer *cfw-calendar*> :min-func point-min :max-func point-max :width 159 :height 50 :clear-func #f(compiled-function () #<bytecode 0x1593c80a510cf6f4>) :before-update-func nil :after-update-func nil :today-ol nil) ((init-date 5 10 2024) (contents-sources #s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil)) (annotation-sources) (sorter . string-lessp)) block-week nil)
  cfw:create-calendar-component-buffer(:date nil :buffer nil :custom-map nil :contents-sources (#s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil)) :annotation-sources nil :view block-week :sorter nil)
  #f(compiled-function (&rest rest) "Open a calendar buffer simply.\nDATE is initial focus date. If it is nil, today is selected\ninitially.  This function uses the function\n`cfw:create-calendar-component-buffer' internally." (interactive nil) #<bytecode 0x1031cb70056b>)(:contents-sources (#s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil)) :view block-week)
  apply(#f(compiled-function (&rest rest) "Open a calendar buffer simply.\nDATE is initial focus date. If it is nil, today is selected\ninitially.  This function uses the function\n`cfw:create-calendar-component-buffer' internally." (interactive nil) #<bytecode 0x1031cb70056b>) (:contents-sources (#s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil)) :view block-week))
  cfw:open-calendar-buffer(:contents-sources (#s(cfw:source :name "org-agenda" :data cfw:org-schedule-period-to-calendar :update nil :color "green" :period-bgcolor nil :period-fgcolor nil :opt-face nil :opt-period-face nil :hidden nil)) :view block-week)
  me/open-calendar-agenda()
  funcall-interactively(me/open-calendar-agenda)
  command-execute(me/open-calendar-agenda record)
  execute-extended-command(nil "me/open-calendar-agenda" "me")
  funcall-interactively(execute-extended-command nil "me/open-calendar-agenda" "me")
  `command-execute(execute-extended-command)
haji-ali commented 2 months ago

@agenbite, thanks! I've added some code to try and debug this issue. Can you please update calfw-blocks and run it again. It should output a message "Wrong event" if this issue appears. It would be helpful if I can get that output.

agenbite commented 2 months ago

Thanks for your time!! I tried the new version and indeed I get "Wrong event":

Wrong event!? #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (cfw:source #s(cfw:source "org-agenda" cfw:org-schedule-period-to-calendar nil "green" nil nil nil nil nil) keymap (keymap (109 . cfw:org-jump-map) (3 keymap (15 . cfw:org-onclick)) (13 . cfw:org-onclick) (mouse-1 . cfw:org-onclick)) display nil org-category "tareas" tags nil org-priority-highest 65 org-priority-lowest 67 time-of-day nil duration nil breadcrumbs nil txt #("WAITING Sincronizar directorios (`unison -auto`)" 0 48 (org-heading t effort-minutes nil effort nil fontified nil)) level "  " time "" extra "" format (((org-prefix-has-time nil) (org-prefix-has-tag nil) (org-prefix-category-length nil) (org-prefix-has-effort nil) (org-prefix-has-breadcrumbs nil)) (format " ")) dotime #("<%%(memq (calendar-day-of-week date) '(1))>" 0 43 (fontified nil)) org-not-done-regexp "\\(STARTED\\|TODO\\|WAITING\\)" org-todo-regexp "\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)" org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(CANCELLED\\|DONE\\|OVER\\|STARTED\\|TODO\\|WAITING\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[    ]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[    ]*$" mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/tareas.org" priority 1000 org-marker #<marker (moves after insertion) at 380 in tareas.org> org-hd-marker #<marker (moves after insertion) at 285 in tareas.org> date (5 6 2024) effort nil effort-minutes nil ts-date 739012 todo-state #("WAITING" 0 7 (fontified nil)) warntime nil type "timestamp"))
haji-ali commented 2 months ago

@agenbite, thanks! This is very helpful.

I haven't been able to find the exact issue, but I added some checks which should bypass problematic events such as this one. Can you pull the changes and check if that works for you?

If it works great! In any case, it would help pin down this issue and others that might come up if you can share the calendar config you are using and the entry WAITING Sincronizar directorios (unison -auto) which is causing the problem.

agenbite commented 2 months ago

Hi, thanks! Now I can launch the calendar, although all events appear at the top and without blocks... So it's basically how :view week shows, but with horizontal lines for hours. But no blocks. Is this expected?

This here is the problematic (periodic) event:

** WAITING Sincronizar directorios (`unison -auto`)
/SCHEDULED: <%%(memq (calendar-day-of-week date) '(1))>/

And my config:

(setq org-agenda-sorting-strategy
 '((agenda habit-down time-up priority-down category-keep)
     (todo todo-state-up priority-down)
     (tags priority-down category-keep)
     (search category-keep)))

(setq org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t% s")
                 (todo . " %b")
                 (tags . " %i %-12:c")
                 (search . " %i %-12:c")))

(setq org-todo-keywords
 '((sequence "STARTED(s)" "TODO(t)" "WAITING(w)" "|"
         "DONE(d)" "OVER(o)" "CANCELLED(c)")))

(setq org-agenda-files #'(
              "~/org/tareas.org"
             ))
haji-ali commented 2 months ago

Hi, thanks! Now I can launch the calendar, although all events appear at the top and without blocks... So it's basically how :view week shows, but with horizontal lines for hours. But no blocks. Is this expected?

If the events are not day events, i.e., they have a time stamp, then they should appear as blocks. Only day events appear before the horizontal lines for time. Do your events have a time stamp? As an example, the "problematic event" you listed is seems like a day event without time.

The time stamp of the events is reported by calfw which calfw-blocks relies on, so I would check that first.

This here is the problematic (periodic) event: Oh, I will look into this example. Thanks for sharing.

agenbite commented 1 month ago

If the events are not day events, i.e., they have a time stamp, then they should appear as blocks. Only day events appear before the horizontal lines for time.

Yeah, that's what I was expecting, but I get all my events in the first block (before 8am in my config).

Do your events have a time stamp?

Yeah, they do, and they work just fine in the rest of org agenda views, also with calfw. I've tried removing all periodic and day events, and it's still the same.

What could be happening?