forked from myuhe/org-gcal.el
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200 from telotortium/oauth2-auto
Switch to oauth2-auto for Google Calendar OAuth2
- Loading branch information
Showing
7 changed files
with
699 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,9 @@ screen that says "This app isn't verified". You will need to click on the | |
- [[https://github.com/tkf/emacs-request][tkf/emacs-request]] | ||
- [[https://github.com/jwiegley/alert][jwiegley/alert]] | ||
- [[https://elpa.gnu.org/packages/persist.html][~persist~]] | ||
- [[https://github.com/skeeto/emacs-aio][skeeto/emacs-aio]] | ||
- [[https://github.com/rhaps0dy/emacs-oauth2-auto][rhaps0dy/emacs-oauth2-auto]] (actually using vendored fork | ||
[[https://github.com/telotortium/emacs-oauth2-auto/tree/main][telotortium/emacs-oauth2-auto]]) | ||
|
||
=org-gcal= is now available in the famous emacs package repo [[http://melpa.milkbox.net/][MELPA]], so the | ||
recommended way is to install it through Emacs package management system. | ||
|
@@ -92,19 +95,29 @@ on resolving this issue. | |
ICAL, and HTML tags, you will see your Calendar ID. | ||
|
||
14. Copy the Calendar ID for use in the settings below, where you will | ||
use it as the first element in the org-gcal-file-alist for | ||
use it as the first element in the org-gcal-fetch-file-alist for | ||
associating calendars with specific org files. You can associate | ||
different calendars with different org files, so repeat this for | ||
each calendar you want to use. | ||
|
||
** Setting example | ||
|
||
#+begin_src elisp | ||
(require 'org-gcal) | ||
(setq org-gcal-client-id "your-id-foo.apps.googleusercontent.com" | ||
org-gcal-client-secret "your-secret" | ||
org-gcal-fetch-file-alist '(("[email protected]" . "~/schedule.org") | ||
("[email protected]" . "~/task.org"))) | ||
(require 'org-gcal) | ||
#+end_src | ||
|
||
*** Note | ||
|
||
This package uses ~plstore~ as a dependency for storing OAuth tokens. In order | ||
to avoid getting prompted all the time for the password to your plstore, it is | ||
recommended that you put the following in your init.el: | ||
|
||
#+begin_src elisp | ||
(setq plstore-cache-passphrase-for-symmetric-encryption t) | ||
#+end_src | ||
|
||
** Multiple accounts | ||
|
@@ -247,12 +260,12 @@ in any way. | |
|
||
** Commands | ||
*** =org-gcal-fetch= | ||
Fetch Google calendar events for all calendar IDs in =org-gcal-file-alist= | ||
Fetch Google calendar events for all calendar IDs in =org-gcal-fetch-file-alist= | ||
occurring between =org-gcal-up-days= before today and =org-gcal-down-days= | ||
after today. If the events have already been retrieved and can be located | ||
using their Org-mode headline IDs, update the event in place. Otherwise, | ||
insert it at the end of the file corresponding to the event's calendar ID in | ||
=org-gcal-file-alist=. Does not update events on the server. | ||
=org-gcal-fetch-file-alist=. Does not update events on the server. | ||
*** =org-gcal-sync= | ||
Like =org-gcal-fetch=, but also update events on the server if they have | ||
changed locally. | ||
|
@@ -275,12 +288,6 @@ in any way. | |
If the event has changed on the server since it was last retrieved (detected | ||
using the =ETag= property), automatically update the headline using the | ||
event data from the server instead of updating the event on the server. | ||
*** =org-gcal-request-token= | ||
Request new OAuth access and refresh tokens. You should not need to call | ||
this function in normal use, since it is called automatically on the first | ||
run. However, you can call it again if for some reason the tokens stop | ||
working. This should be rare - =org-gcal= will automatically refresh the | ||
OAuth access token when it expires (every 3600 seconds). | ||
|
||
** Deleting events | ||
|
||
|
Oops, something went wrong.