haji-ali / calfw-blocks

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

Visual time blocks and more for the [[https://github.com/haji-ali/emacs-calfw][Emacs Calendar Framework (calfw)]].

The following features are implemented:

This fork must be installed with my fork of calfw, otherwise it will not work.

Transposed two week view: [[screenshot-transpose.png]]

And add its path to `'load-path':

+begin_src emacs lisp

(add-to-list 'load-path "~/.emacs.d/site-lisp/calfw-blocks")

+end_src

Make sure this package is loaded after calfw.

The package also includes two-column transposed versions of the original calfw views (credit to @novoid for the [[https://github.com/kiwanami/emacs-calfw/issues/22][design]]), where days of the week are displayed vertically rather than horizontally:

+begin_src

'transpose-8-day 'transpose-10-day 'transpose-12-day 'transpose-14-day 'transpose-two-weeks

+end_src

The ~transpose--day~ views always start on the current day, and ~transpose-two-weeks~ always starts on the most recent Sunday. The top right buttons labelled ~W^T~ and ~2W^T~ use ~transpose-8-day~ and ~transpose-14-day~, respectively.

You can use these to define functions that directly open calfw with these views. Examples:

+begin_src emacs lisp

;; Calendar showing org-agenda entries (defun my-open-calendar-agenda () (interactive) (cfw:open-calendar-buffer :contents-sources (list (cfw:org-create-source "medium purple")) :view 'block-week))

;; Calendar showing org entries from files (defun my-open-calendar-files () (interactive) (cfw:open-calendar-buffer :contents-sources (list (cfw:org-create-file-source "Todos" "~/stuff/todos.org" "green") (cfw:org-create-file-source "Events" "~/stuff/events.org" "blue")) :view 'block-3-day))

+end_src