kiwanami / emacs-calfw

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

No display for multi-day Org events #72

Open mankoff opened 9 years ago

mankoff commented 9 years ago

I updated calfw from elpa yesterday (to calfw-20150831.1847) and lost some functionality.

The previous version displayed multi-day Org events as a block. The current version does not.

This may be related to #11, #60, and #63.

kiwanami commented 9 years ago

Thank you for your bug report! Hmm, I have checked the displaying block event at #60. But, because I'm not a heavy user for orgmode, I might miss an another bug. Will you show the small sample org file which can reproduce the bug?

mankoff commented 9 years ago

Here is how I can reproduce the bug.

1) My test.el init file.


(add-to-list 'load-path "~/local/src/org-mode/lisp")
(add-to-list 'load-path "~/local/src/org-mode/contrib" t)
(require 'org)
(setq org-agenda-files '("test.org"))

(add-to-list 'load-path "~/.emacs.d/elpa/calfw-20150831.1847")
(add-to-list 'load-path "~/.emacs.d/elpa/calfw-20150824.2347")

(require 'calfw)
(require 'calfw-org)
(cfw:open-org-calendar)

I am opening with emacs -Q test.el, and evaluating only one of add-to-list calfw lines. Date ranges are shown as a range in the elpa 0824 version, and not the elpa 0831 version.

2) My test.org file:


* TODO Test Item
  <2015-09-07 Lun>--<2015-09-10 Jeu>

3) Here are two screenshots. The first from version 0824, shows a date range. The second does not.

capture d ecran 2015-09-07 a 11 20 18 -04 00 capture d ecran 2015-09-07 a 11 16 47 -04 00
kiwanami commented 9 years ago

@mankoff Thank you for your detailed report! I'll check it.

kiwonum commented 8 years ago

@kiwanami This issue might be able to get fixed as follows: in the cfw:org-get-timerange function (calfw-org.el):

from (if (string-match "(\\([0-9]+)/\\([0-9]+\\)): " extra) to (if (string-match "(\\([ 0-9]+)/\\([ 0-9]+\\)): " extra)

I hope this fix is applied to the main branch (and melpa as well) as soon as possible.

mankoff commented 7 years ago

Fixed in elpa version 20170320.506

kiwonum commented 7 years ago

@mankoff I just tested; but, this has not been solved yet in the version you mentioned.

mankoff commented 7 years ago

Weird. It does for me. Here is my DEBUG.el

(require 'org)
(setq org-agenda-files '("test.org"))

(add-to-list 'load-path "~/.emacs.d/elpa/calfw-20170320.506")

(require 'calfw)
(require 'calfw-org)
(cfw:open-org-calendar)

Here is test.org

* TODO Test Item
<2017-03-31 Fri>--<2017-04-03 Mon>

I launch emacs (OS X, v 25.2.2) with /Applications/Emacs.app/Content/MacOS/Emacs -Q DEBUG.el and then manually evaluate (C-x C-e) each line, then T for two-week view.

And here is what the calendar looks like:

screen shot 2017-03-31 at 10 24 53

If you can't replicate this, we should probably re-open the bug and figure out why.

kiwonum commented 7 years ago

Interesting... I quickly tested your scripts; it works with Org-mode version 8.2.10 but doesn't work with Org mode version 9.0.5 (the current melpa version). From an additional test, I found the patch I posted above works for both.

mankoff commented 7 years ago

This is getting complicated. I first noticed it worked in my default config, which is Org 9.0.5. The MWE example above uses the Emacs version, which is older (not sure what version). So... on my computer, I have it working (as above) with current calfw and old Org, but also current calfw and Org 9.0.5 but also my large and complicated init.el...

mankoff commented 7 years ago

I just added (add-to-list 'load-path "~/.emacs.d/elpa/org-20170210") to the DEBUG.el (and load it before (require 'org)) and it works on my system. Latest calfw and Org from elpa.

kiwonum commented 7 years ago

Hm... it seems a problem on my side. I retested and it works for both. I need to figure out the problem. Thank you for your time.

kiwonum commented 7 years ago

I got it. This is because of the string format of an agenda entry.

For example, if the multiple-day entry looks like "(1/4): TODO Test Item", it perfectly works. But, I use a different setting for org-agenda-timerange-leaders (e.g., "" "(%3d/%-3d): "), which shows the same entry differently like "( 1/4 ): TODO Test Item"; here, there exist some spaces in the entry.

This is the reason why my patch works for my case.