euro 2012 games in your org-mode agenda






Things have been rather quiet at emacs-fu - reason for this is that most of my
emacs hacking time has been spent on mu4e, the emacs e-mail client I
wrote. It's been shaping up pretty nicely, I should probably write some
emacs-fu posts about it :)



Another interesting pastime (esp. in Europe) is football/soccer, in particular
the Euro2012 games; long-time readers will remember the schedule for world cup games; I made a new one for Euro2012: https://github.com/djcb/org-euro2012.



In order to have the games show up in your agenda, make sure the file is in
your org-agenda-files. If needed, you could add it with something like this in
your org-mode settings (change the directory path to wherever you have put
euro2012.org):





(add-to-list 'org-agenda-files "~/org/euro2012.org")




One small issue with the schedule is that it uses the central-european summer
time (UTC+2), and there is no automatic way to adjust times for the local time
zone. As a work-around, Juan Pechiar provided the following function which makes
it easy to update all org-timestamps in a file:





(defun update-org-hours (n)
"Change all org-mode timestamps in the current buffer by N hours."
(interactive "nAdd hours: ")
(save-excursion
(goto-char (point-min))
(while (re-search-forward "[[<]" nil t)
(when (org-at-timestamp-p t)
(org-timestamp-change n 'hour)))))




Evaluate this function. After that, you can go to the file with the schedule,
and give an M-x update-org-hours, provide the offset for your timezone, compared to
UTC+2.



Let the games begin!


No comments:

Post a Comment

Followers

Popular Posts