org-gcal.el icon indicating copy to clipboard operation
org-gcal.el copied to clipboard

Usage stability

Open d12frosted opened this issue 7 years ago • 7 comments

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:

  1. Execute rm -rf ~/.emacs.d/org-gcal in terminal.
  2. Run emacs.
  3. Call org-gcal-fetch.
  4. Go through authorisation process where I have to allow access to calendar with copy-pasting access key. Note that this authorises only first account.
  5. Profit for first account.
  6. Call org-gcal-request-token and go through authorisation process for the second account.
  7. 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@‰…

d12frosted avatar Sep 22 '16 07:09 d12frosted

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?

alphapapa avatar Sep 23 '16 01:09 alphapapa

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 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).
  • 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 to M-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.

erikmd avatar Sep 26 '16 22:09 erikmd

@alphapapa sorry for long delay,

Yes, when I use one account - everything is pretty fine.

d12frosted avatar Sep 27 '16 04:09 d12frosted

@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?

alphapapa avatar Sep 28 '16 04:09 alphapapa

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.

erikmd avatar Sep 28 '16 08:09 erikmd

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. 😸

d12frosted avatar Sep 28 '16 09:09 d12frosted

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.

telotortium avatar Jun 11 '20 18:06 telotortium