myuhe / org-gcal.el

Org sync with Google Calendar
452 stars 113 forks source link

Shared calendar events get duplicated #95

Open kevzettler opened 7 years ago

kevzettler commented 7 years ago

I have a shared calendar with my partner so they can see what I have scheduled. org-gcal-sync treats this as duplicate events

              12:08...... now - - - - - - - - - - - - - - - - - - - - - - - - -
              14:00...... ----------------
              16:00...... ----------------
  gcal:       17:30-18:30 Hair cut
  gcal:       17:30-18:30 Hair cut
              18:00...... ----------------
  gcal:       20:00...... (1/2):  Brick and Mortar
  gcal:       20:00...... (1/2):  Brick and Mortar

Any way to fix in the code? or anyway I can filter on the google side?

eglenn commented 7 years ago

I'm getting a similar problem -- did you ever work this out?

kevzettler commented 7 years ago

nope still trying to ignore it here. Haven't tried removing the shared calendar yet but suspect that is the culprit

squiter commented 6 years ago

I'm having this problem too... there are other two issues about duplication ( #49 #84 ) ... is anyone fixing or working in them?

In my case the duplication is continuous, every sync creates a new event in my google calendar... yesterday I deleted 84 duplication for a single event :(

RG9 commented 6 years ago

Hi, I'm using just one calendar, and I solved problem of duplicated events by fixing my .emacs config of org-agenda-files. I found out that emacs is creating some tmp file suffixed by ~. In my case my agenda file is called gcal.org and that appearing tmp file was gcal.org~. What if done was adjusting regexp in find-lisp-find-files to not include the tmp file gcal.org~. It currently looks like this:

(setq org-agenda-files
   (find-lisp-find-files "~/docs" "gcal.org$\\|planned.org$"))

EDIT: I also merged fix to issue #75 on my branch https://github.com/RG9/org-gcal.el, but I'm not sure if this helped for me.

dilzeem commented 6 years ago

I had an issue with duplication, but this was due not specifying ranges for my appointment times, but it seems you have ranges here.

ifitzpat commented 6 years ago

Still seeing this issue (not due to tmp files or ranges). Has anyone managed to find a workaround?

phrxmd commented 5 years ago

Are the events duplicated in the .org file? Or does org-gcal add a second timestamp to the same event, making it appear twice in the agenda?

phrxmd commented 5 years ago

@ifitzpat can you check whether https://github.com/myuhe/org-gcal.el/pull/122 fixes this?

ifitzpat commented 5 years ago

@phrxmd not in my case, which still has to do with multi-line locations. My fix didn't get rid of the problem entirely either. I can imagine #122 is a useful fix too though.

ifitzpat commented 5 years ago

Are the events duplicated in the .org file? Or does org-gcal add a second timestamp to the same event, making it appear twice in the agenda?

the events end up duplicated (or worse) in the .org file

gwotto commented 5 years ago

I had a similar problem events get duplicated after capture. In my .emacs file I had this line (not sure where it came from): (add-hook 'org-capture-after-finalize-hook (lambda () (org-gcal-sync) )) commenting it out solved the problem.

peschkaj commented 5 years ago

Can confirm, this happened to me. The calendar entries are duplicated locally in the .org file (with different properties blocks) and are duplicated in the google calendar. The duplicates do not contain any location data, so at least it's easy to find and remove them

thriveth commented 4 years ago

I have this problem, too.

I use this template:

* %^{Description}
:PROPERTIES:
:ETag: 
:calendar-id: XXX@gmail.com
:location: %^{Location:}
:ID:
:END:
:org-gcal:
%^{Date and time:}T

%?
:END:

And what happens is at sync, it creates a new :ID: and adds it in the entry. Next sync, it doubles the number of IDs again, etc., which can get out of hand really rapidly.

telotortium commented 4 years ago

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.