Do not use figlet fancy stuff on week agenda

master
Jacopo De Simoi 3 years ago
parent d6c837cec6
commit 28db0c70d8
  1. 59
      global.org

@ -1151,34 +1151,37 @@
"Format a DATE string for display in the daily/weekly agenda.
This function makes sure that dates are aligned for easy reading."
;(require 'cal-iso)
(let* ((dayname (calendar-day-name date))
(day (cadr date))
(day-of-week (calendar-day-of-week date))
(month (car date))
(monthname (calendar-month-name month))
(year (nth 2 date))nf
(iso-week (org-days-to-iso-week
(calendar-absolute-from-gregorian date)))
(weekyear (cond ((and (= month 1) (>= iso-week 52))
(1- year))
((and (= month 12) (<= iso-week 1))
(1+ year))
(t year)))
(weekstring (if (= day-of-week 1)
(format " W%02d" iso-week)
"")))
(format (concat "\n"
"%9s %s %4d%s\n"
"%9s \n"
"%9s %-10s\n"
"%9s \n"
"%9s %s\n")
(figlet-num day 0) monthname year weekstring
(figlet-num day 1)
(figlet-num day 2) dayname
(figlet-num day 3)
(figlet-num day 4) (sunrise-sunset))))
(if (not (eq 'day org-agenda-current-span))
(concat "\n" (org-agenda-format-date-aligned date)
" ────────────────────────────────────────────────────\n")
(let* ((dayname (calendar-day-name date))
(day (cadr date))
(day-of-week (calendar-day-of-week date))
(month (car date))
(monthname (calendar-month-name month))
(year (nth 2 date))nf
(iso-week (org-days-to-iso-week
(calendar-absolute-from-gregorian date)))
(weekyear (cond ((and (= month 1) (>= iso-week 52))
(1- year))
((and (= month 12) (<= iso-week 1))
(1+ year))
(t year)))
(weekstring (if (= day-of-week 1)
(format " W%02d" iso-week)
"")))
(format (concat "\n"
"%9s %s %4d%s\n"
"%9s \n"
"%9s %-10s\n"
"%9s \n"
"%9s %s\n")
(figlet-num day 0) monthname year weekstring
(figlet-num day 1)
(figlet-num day 2) dayname
(figlet-num day 3)
(figlet-num day 4) (sunrise-sunset)))))
(setq org-agenda-format-date #'org-agenda-format-date-figlet)
(setq org-agenda-prefix-format

Loading…
Cancel
Save