From 8f994551d4f18d60dc69f64ce1a1cf58de78a80f Mon Sep 17 00:00:00 2001 From: Max Schlueter Date: Wed, 29 Jul 2020 11:55:44 +0200 Subject: [PATCH 1/2] Add cfw:org-create-file-source to list of commands Also show how to use it in README. --- modules/app/calendar/README.org | 3 ++- modules/app/calendar/config.el | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/app/calendar/README.org b/modules/app/calendar/README.org index 7a216aff6..11ded2d22 100644 --- a/modules/app/calendar/README.org +++ b/modules/app/calendar/README.org @@ -34,7 +34,8 @@ calendar data from: (cfw:open-calendar-buffer :contents-sources (list - (cfw:org-create-source "Green") ; orgmode source + (cfw:org-create-source "Green") ; org-agenda source + (cfw:org-create-file-source "cal" "/path/to/cal.org" "Cyan") ; other org source (cfw:howm-create-source "Blue") ; howm source (cfw:cal-create-source "Orange") ; diary source (cfw:ical-create-source "Moon" "~/moon.ics" "Gray") ; ICS source1 diff --git a/modules/app/calendar/config.el b/modules/app/calendar/config.el index b058337d1..53fefdbd9 100644 --- a/modules/app/calendar/config.el +++ b/modules/app/calendar/config.el @@ -33,6 +33,7 @@ (use-package! calfw-org :commands (cfw:open-org-calendar cfw:org-create-source + cfw:org-create-file-source cfw:open-org-calendar-withkevin my-open-calendar)) From 87d0fff2fdeb0c04630f572bb73e3dfec14d36f3 Mon Sep 17 00:00:00 2001 From: Max Schlueter Date: Wed, 29 Jul 2020 12:01:25 +0200 Subject: [PATCH 2/2] Example doesn't work in general For example, when the calendar view is refreshed. Use cfw:org-create-file-source when wanting to show org files from other sources. --- modules/app/calendar/README.org | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/modules/app/calendar/README.org b/modules/app/calendar/README.org index 11ded2d22..073e20fa0 100644 --- a/modules/app/calendar/README.org +++ b/modules/app/calendar/README.org @@ -43,23 +43,6 @@ calendar data from: ))) #+END_SRC -To control what org files ~clfw:org-create-source~ will use, ~let~-bind -~org-agenda-files~ around a call to ~+calendar/open-calendar~ like so: - -#+BEGIN_SRC emacs-lisp -;;;###autoload -(defun cfw:open-org-calendar-with-cal1 () - (interactive) - (let ((org-agenda-files '("/path/to/org/" "/path/to/cal1.org"))) - (call-interactively #'+calendar/open-calendar))) - -;;;###autoload -(defun cfw:open-org-calendar-with-cal2 () - (interactive) - (let ((org-agenda-files '("/path/to/org/" "/path/to/cal2.org"))) - (call-interactively #'+calendar/open-calendar))) -#+END_SRC - The [[https://github.com/kiwanami/emacs-calfw][kiwanami/emacs-calfw]] project readme contains more examples. ** Synchronizing Org and Google Calendar