Skip to content

Instantly share code, notes, and snippets.

@peccu
Forked from kiwanami/calfw-howm-fast.el
Created January 13, 2011 17:05
Show Gist options
  • Save peccu/778191 to your computer and use it in GitHub Desktop.
Save peccu/778191 to your computer and use it in GitHub Desktop.
;; cfw:howm-from-calendar-fast
(defun cfw:howm-from-calendar-fast ()
(interactive)
(let* ((mdy (cfw:cursor-to-nearest-date))
(m (calendar-extract-month mdy))
(d (calendar-extract-day mdy))
(y (calendar-extract-year mdy))
(key (format-time-string
howm-date-format
(encode-time 0 0 0 d m y)))
(items (cfw:howm-schedule-period mdy mdy)))
(cond
((= 0 (length items))
(when (fboundp 'my-cfw-open-schedule-buffer)
(my-cfw-open-schedule-buffer)))
((= 1 (length items))
(howm-view-open-item (car items)))
(t
(howm-view-summary (format "Schedules : %s" (cfw:strtime mdy))
items (list key))
(howm-view-summary-check t)))))
;; (define-key cfw:howm-schedule-map (kbd "RET") 'cfw:howm-from-calendar-fast)
;; (define-key cfw:howm-schedule-inline-keymap (kbd "RET") 'cfw:howm-from-calendar-fast)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment