itchyny / calendar.vim

A calendar application for Vim
MIT License
1.97k stars 73 forks source link

[Question] Syncing with Google Calendar fail. #31

Closed lambdalisue closed 10 years ago

lambdalisue commented 10 years ago

Thanks for this life changing vim app. I love it.

Well but actually, recent commit might make syncing with Google Calendar fail in my environment ( my vimrc ) I said 'might' because it might worked correctly only once.

This is my current situation.

  1. I'm behind network proxy and $http_proxy and $https_proxy are correctly configured (wget works correctly).
  2. When I installed early version of calendar.vim and configured google accounts, it worked perfectly at first time.
  3. However, when I tried to add event in calendar.vim, it actually did not add event but say nothing (no error message). And also, it never receive events from Google Calendar even there are some new events.
  4. So today, I re-configured my vimrc and re-installed calendar.vim and removed ~/.cache/calendar.vim/ then calendar.vim could not sync with Google calendar even in the first time.

This is what I got in vim message window.

Error detected while processing function calendar#async#call..calendar#webapi#callback:
line   10:                                                                                                                                                                    
E684: list index out of range: 2
Press ENTER or type command to continue

Error detected while processing function calendar#async#call..calendar#webapi#callback:
line   10:
E15: Invalid expression: data[i] =~ '^HTTP/1.\d 3' || data[i] =~ '^HTTP/1\.\d 200 Connection established' || data[i] =~ '^HTTP/1\.\d 100 Continue'
Press ENTER or type command to continue

I tried to figure out what was going on but unfortunately I'm not really familiar with vim-script. So would you help me to solve this problem? Any help is welcome.

Thanks.

uname -s -r -v

Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1

vim --version

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 25 2013 22:50:51)
適用済パッチ: 1-41
Compiled by alisue@alisue-labdesk
Huge 版 with GTK2-GNOME GUI.  機能の一覧 有効(+)/無効(-)
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
+balloon_eval    +float           +mouse_urxvt     -tag_any_white
+browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
+clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      +toolbar
+cmdline_compl   +insert_expand   -perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con_gui  +lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      +X11
+dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     +xim
+emacs_tags      +mouseshape      -sniff           +xsmp_interact
+eval            +mouse_dec       +startuptime     +xterm_clipboard
+ex_extra        -mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    +xpm
      システム vimrc: "$VIM/vimrc"
        ユーザ vimrc: "$HOME/.vimrc"
     第2ユーザ vimrc: "~/.vim/vimrc"
         ユーザ exrc: "$HOME/.exrc"
     システム gvimrc: "$VIM/gvimrc"
       ユーザ gvimrc: "$HOME/.gvimrc"
    第2ユーザ gvimrc: "~/.vim/gvimrc"
    システムメニュー: "$VIMRUNTIME/menu.vim"
       省略時の $VIM: "/usr/local/share/vim"
コンパイル: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -pthread -D_REENTRANT -DORBIT2=1 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/libgnomeui-2.0 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0   -I/usr/local/include  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
リンク: gcc   -L. -Wl,-z,relro -rdynamic -Wl,-export-dynamic  -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0     -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl   -ldl  -L/usr/lib -llua5.2  -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions   -lruby-1.9.1 -lpthread -lrt -ldl -lcrypt -lm  -L/usr/lib   
itchyny commented 10 years ago

Sorry for inconvenience. Please pull the latest version.

lambdalisue commented 10 years ago

Now I could sync the local calendar with Google Calendar! Thank you very much :-)

Well If I'm not disturbing you, I would like to ask you two more questions.

  1. Is there a command or any way to tell calendar.vim to pull the data from Google Calendar? I'm guessing but if calendar.vim pulls data from Google Calendar every several minutes or so on, I would like to have a way to sync the calendar immediately
  2. Is it possible to show like a 'loading...' indicator to tell users that the calendar.vim is now loading data from Google Calendar? And if it's possible, are you planning to add that kind of feature?

Thanks again for fixing and this life changing vim app :-)

itchyny commented 10 years ago
  1. There's no command to sync explicitly. But if you remove ~/.cache/calendar.vim/timestamp/, the calendar downloads the events on its start. In the directory, the files save the date when the app downloaded the events from Google Calendar. On starting the calendar, it checks the date, and start downloading if it was older than two hours ago.
  2. There's no way and no plan to show 'loading...' indicator. Some apps have the feature but I think... 'Hey, too annoying! Come on. Download the contents silently!' That's why I will not implement such an indicator.
lambdalisue commented 10 years ago

Thank you for the reply :-)

1. Well I'll be really happy if calendar.vim have a command to download events additionally. If I understand your response correctly, I need to remove all downloaded events for updating right?

I prefer additional way because I noticed that calendar.vim failed to download some old or new events. With your last commit, now my calendar.vim downloaded events from my Google Calendar but only for the events from 2013/06 to 2013/12. The events before or after that are not downloaded (is it actually a bug?)

I understand that the most of calendar applications need to have some range limitations but not for new events. So I don't really think missing new events is an expected behavior. Well, it is my guess but there are some download size limitation for Google Calendar API? If so, downloading events from beginning again does not make sense. That's a one of reason why I prefer additional way to reduce the size of downloading. And also, even there are no such kind of limitation, I think loosing downloaded events for updating manually is not a good solution. I'm really sorry for bothering you with this. Tell me if there are anything I can help you, I'm willing to do it :-)

2. Haha, OK I got it ;-) I just wonder if calendar.vim have a some kind of animation indicator which you often found in terminal applications. But if you feel it is too annoying, I'm ready to follow you :-)