kiwanami / emacs-calfw

A calendar framework for Emacs
1.17k stars 101 forks source link

FIX: Events from org-mode lasting for more than one day are shown correctly in blocks (#11) #60

Closed cbourjau closed 9 years ago

cbourjau commented 9 years ago

Hello, this pull request fixes the issue of calfw not recognizing events lasting for several days as reported in issue #11. The problem arose because org mode apparently changed its behaviour with the "dotime" property of the event. In order to fix this issue, I check if an event has the "extra" property set with a value of something like eg. "(1/3): ". This "extra" property give the information of which day you are in in a multi day event, here its day one of three. You can see this extra property in action when you look at a multi day event in the Agenda view.

Anyhow, I am rather new to elisp so comments and suggestions are very welcome! This fix works well for me and I hope some other people will find it useful too!

kiwanami commented 9 years ago

Hi, @chrisboo Thank you for your PR! I checked this patch solves the problem with a small test org file. It's great! One thing, usually underscore is not used for symbol name in elisp. So, I prefer cur_day to cur-day.

@myuhe Do you have some comment?

cbourjau commented 9 years ago

ok, I changed the names and also made sure that dotime is actually a string

kiwanami commented 9 years ago

Merged. Thank you!

cbourjau commented 9 years ago

My pleasure.

myuhe commented 9 years ago

@chrisboo 's PR works fine on my environment. Thanks :+1: