emacs-calfw icon indicating copy to clipboard operation
emacs-calfw copied to clipboard

calfw-ical through https proxy does not work

Open asyncmind0 opened this issue 9 years ago • 5 comments

This might be an issue with url-retreive but calfw cannot retreive google ical through a proxy

asyncmind0 avatar Apr 26 '15 04:04 asyncmind0

Yes. url package has some trouble about https communication under the proxy environment. Will you try following switch?

(setq cfw:ical-url-to-buffer-get 'cfw:ical-url-to-buffer-external)

This option lets calfw-ical use the external command which is defined cfw:ical-calendar-external-shell-command. The default value is wget -q -O -.

kiwanami avatar Apr 26 '15 07:04 kiwanami

This should work but it does not seem to

(call-process-shell-command cfw:ical-calendar-external-shell-command nil buf nil url)

"An old calling convention accepted any number of arguments after DISPLAY, which were just concatenated to COMMAND. This is still supported but strongly discouraged."

I can see the output in

(call-process-shell-command "wget -q -O- https://www.google.com/calendar/ical/.../basic.ics" nil (get-buffer "scratch"))

not sure whats going on but running wget -q -O- works outside of emacs

this also does not work

(call-process-shell-command (concat cfw:ical-calendar-external-shell-command url) nil buf nil)

asyncmind0 avatar Apr 26 '15 12:04 asyncmind0

Oh, it may be caused by version incompatibility. That code moves on my emacs: GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.10). Will you check M-x emacs-version?

kiwanami avatar Apr 27 '15 01:04 kiwanami

not working on GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2) of 2015-04-20 on bitzer.hoetzel.info

asyncmind0 avatar Aug 29 '15 12:08 asyncmind0

Hmm, it's difficult problem. In my environment, even on the current version GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.16.5), old calling convention is working.

I would determine which is wrong, Emacs implementation or the other. Will you evaluate following code on the scratch buffer to overwrite the current function declaration, and check again?

(defun cfw:ical-url-to-buffer-external (url)
  "Retrieve ICS file with an external command."
  (let ((buf (get-buffer-create cfw:ical-calendar-tmpbuf)))
    (buffer-disable-undo buf)
    (with-current-buffer buf
      (erase-buffer))
    (call-process-shell-command
     (concat cfw:ical-calendar-external-shell-command url) nil buf nil)
    buf))

And will you check proxy environment variable?

(getenv "http_proxy")

kiwanami avatar Sep 01 '15 05:09 kiwanami