Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid kill ring messup #114

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions org-gcal.el
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,14 @@
;; We got some 2xx response, but for some reason no
;; message body.
((and (> 299 status) (eq temp nil))
(org-gcal--notify
(concat "Received HTTP" (number-to-string status))
(org-gcal--notify
(concat "Received HTTP" (number-to-string status))
"Error occured, but no message body."))
((not (eq error-msg nil))
;; Generic error-handler meant to provide useful
;; information about failure cases not otherwise
;; explicitly specified.
(org-gcal--notify
(org-gcal--notify
(concat "Status code: " (number-to-string status))
(pp-to-string error-msg)))
;; Fetch was successful.
Expand Down Expand Up @@ -415,7 +415,9 @@ It returns the code provided by the service."
(plist-get tobj :month-end)
(plist-get tobj :year-end))))
(org-gcal--notify "Archived event." (org-element-property :title elem))
(org-archive-subtree))))
(let ((kill-ring kill-ring)
(select-enable-clipboard nil))
(org-archive-subtree)))))
(save-buffer)))

(defun org-gcal--save-sexp (data file)
Expand Down Expand Up @@ -452,7 +454,7 @@ It returns the code provided by the service."
(progn
(with-temp-buffer (insert-file-contents org-gcal-token-file)
(plist-get (plist-get (read (buffer-string)) :token) :refresh_token)))
(org-gcal--notify
(org-gcal--notify
(concat org-gcal-token-file " is not exists" )
(concat "Make" org-gcal-token-file))))))

Expand All @@ -464,7 +466,7 @@ It returns the code provided by the service."
(progn
(with-temp-buffer (insert-file-contents org-gcal-token-file)
(plist-get (plist-get (read (buffer-string)) :token) :access_token)))
(org-gcal--notify
(org-gcal--notify
(concat org-gcal-token-file " is not exists" )
(concat "Make " org-gcal-token-file))))))

Expand Down