kidd / org-gcal.el

Org sync with Google Calendar. (active maintained project as of 2019-11-06)
432 stars 47 forks source link

org-gcal-fetch forces org files into active window (fix included) #202

Closed alanconway closed 2 years ago

alanconway commented 2 years ago

The problem is https://github.com/kidd/org-gcal.el/blob/396a30cf256c8b32a69fd73a081364937b43a1c7/org-generic-id.el#L242 The call switch-to-buffer should be set-buffer. To quote the emacs source:

(defun switch-to-buffer (buffer-or-name &optional norecord force-same-window)
  "Display buffer BUFFER-OR-NAME in the selected window.

WARNING: This is NOT the way to work on another buffer temporarily
within a Lisp program!  Use `set-buffer' instead.  That avoids
messing with the window-buffer correspondences.
beltrame commented 2 years ago

I can confirm the issue and that the fix works. Perhaps @alanconway should make a PR and link it here?

alanconway commented 2 years ago

PR https://github.com/kidd/org-gcal.el/pull/205

telotortium commented 2 years ago

Resolved by #205