Skip to content

Instantly share code, notes, and snippets.

@kiwanami
Created January 13, 2011 15:45
Show Gist options
  • Save kiwanami/778068 to your computer and use it in GitHub Desktop.
Save kiwanami/778068 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
((= 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