org-gcal.el
org-gcal.el copied to clipboard
Usage stability
Hey @myuhe,
Thank you very much for this package. I find it really useful in my daily flow. But unfortunately it's very unstable right now. I have to do several hacks every time I want to fetch events from calendar or post to calendar.
I have connected two calendars. Every time I want to fetch them I have to:
- Execute
rm -rf ~/.emacs.d/org-gcal
in terminal. - Run emacs.
- Call
org-gcal-fetch
. - Go through authorisation process where I have to allow access to calendar with copy-pasting access key. Note that this authorises only first account.
- Profit for first account.
- Call
org-gcal-request-token
and go through authorisation process for the second account. - Call
org-gcal-fetch
.
Here is content of *Messages*
.
org-gcal::/Users/d12frosted/.emacs.d/org-gcal/.org-gcal-token is not exists - Make/Users/d12frosted/.emacs.d/org-gcal/.org-gcal-token [2 times]
Got error: (error http 400) [2 times]
org-gcal::Status code: 400 - (error http 400)
org-gcal::Status code: 400 - (error http 400)
(New file)
Quit
[cl-struct-request-response nil nil nil nil nil "https://www.googleapis.com/oauth2/v3/token" nil (:type "POST" :data "client_id=CLIENT_ID&client_secret=CLIENT_SECRET&code=CODE&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code" :parser org-gcal--json-read :success #[128 "ÂÃ\"A@
I'm just a bystander who hasn't tried org-gcal in a while, but anyway... Does it work when you only connect one account, or do you still have to go through all those steps?
Hi @alphapapa,
Does it work when you only connect one account, or do you still have to go through all those steps?
Yes: I'm using org-gcal.el with a single account and I confirm that it is working for this use case:
- more precisely, I never use
M-x org-gcal-refresh-token
but every time I want to fetch updates from Gcal to org-mode I'm usingM-x org-gcal-fetch
, which is taking care of updating the token (warning:org-gcal-fetch
will delete and rewrite the selected org file with Gcal's events). - When I've added one new event or edited an existing one in the org file, I use
M-x org-gcal-post-at-point
which posts the change (then do a fetch). - Finally
M-x org-gcal-sync
is similar toM-x org-gcal-post-at-point
but is applicable when several events have been created or edited in the org file (it will post all detected changes in the org file before doing a fetch).
Hoping that this helps.
@alphapapa sorry for long delay,
Yes, when I use one account - everything is pretty fine.
@erikmd Thanks for that update. One question, you said:
more precisely, I never use M-x org-gcal-refresh-token but every time I want to fetch updates from Gcal to org-mode I'm using M-x org-gcal-fetch, which is taking care of updating the token (warning: org-gcal-fetch will delete and rewrite the selected org file with Gcal's events).
Does this mean what I think it means, that you have to be very careful to not run the fetch command on the wrong Org file?
Does this mean what I think it means, that you have to be very careful to not run the fetch command on the wrong Org file?
No, M-x org-gcal-fetch
won't erase the "currently-opened file", it will only overwrite the org files registered in org-gcal-file-alist.
However, regarding the other function M-x org-gcal-post-at-point
, if it would also be possible to run it on another org file, it wouldn't make sense in practice, as it is intended to edit (or create) an event being part of a registered org file.
it wouldn't make sense in practice
I would argue about that. Because usually I setup some timed todos where it makes sense and then if I see that I actually need that in my calendar as well, I just call org-gcal-post-at-point
. This is faster than moving it manually to registered org file. And added that I can do that quickly from agenda (SPC M-x org-gcal-post-at-point
) this is neat. 😸
Hi everyone! This repository is obsolete - the actively developed fork is now https://github.com/kidd/org-gcal.el, which is also the "org-gcal.el" on MELPA (see #115). I'm one of the maintainers of https://github.com/kidd/org-gcal.el. I can't directly close issues or PRs on this repo, but please download https://github.com/kidd/org-gcal.el and see if your issue or PR is still applicable. If so, open an issue or PR on https://github.com/kidd/org-gcal.el. In any case, you should close your issue or PR in this repo.