Closed AtomicNess123 closed 2 years ago
The call to cfw:change-view-week should be after the one to cfw:open-calendar-buffer!
(defun my-week-calendar ()
(interactive)
(cfw:open-calendar-buffer
:contents-sources
(list
(cfw:org-create-source "Green")
(cfw:ical-create-source "gcal" "https://calendar.google.com/calendar/ical/XXXXXXXXX/basic.ics" "Red")))
(cfw:change-view-week))
The call to cfw:change-view-week should be after the one to cfw:open-calendar-buffer!
(defun my-week-calendar () (interactive) (cfw:open-calendar-buffer :contents-sources (list (cfw:org-create-source "Green") (cfw:ical-create-source "gcal" "https://calendar.google.com/calendar/ical/XXXXXXXXX/basic.ics" "Red"))) (cfw:change-view-week))
Unfortunately this is not working! I still get the monthly view. Have you tried yourself?
Unfortunately this is not working! I still get the monthly view. Have you tried yourself?
Hum... Where did you put this definition? Are you sure you eval'ed it? You can do that interactively by placing point (ie "cursor") after the last parenthesis and typing C-x C-e (or from menu Emacs-Lisp/Evaluate Last S-expression when in Emacs-lisp mode). Or just restart emacs with the definition in eg your init file.
Unfortunately this is not working! I still get the monthly view. Have you tried yourself?
Hum... Where did you put this definition? Are you sure you eval'ed it? You can do that interactively by placing point (ie "cursor") after the last parenthesis and typing C-x C-e (or from menu Emacs-List/Evaluate Last S-expression when in Emacs-lisp mode). Or just restart emacs with the definition in eg your init file.
I put it in my init.el file and I evaluated it, not so newbie at this point :D I see now a behaviour:
when I call M-x my-week-calendar
it works.
However, I have a keybinding: (global-set-key [f7] 'my-week-calendar)
When I call f7
I get the monthly view and this error in the minibuffer:
Not found cfw:component attribute...
I had the same problem, I am not sure why it happens. But this worked for me (specify the view type as an argument to cfw:open-calendar-buffer
):
(defun my-week-calendar ()
(interactive)
(cfw:open-calendar-buffer
:contents-sources
(list
(cfw:org-create-source "Green")
(cfw:ical-create-source "gcal" "https://calendar.google.com/calendar/ical/XXXXXXXXX/basic.ics" "Red"))
:view 'week))
Yes! It worked! How did you figured this one out? Wonderful, thanks!
Excellent package! Now... how to open in Week mode?
This does not work, it opens in month view. It seems that the
(cfw:change-view-week)
line is doing nothing.Thanks!