Skip to content

Commit

Permalink
protect kill-ring
Browse files Browse the repository at this point in the history
org-archive-subtree messes the kill-ring.  Wrapping it in a let binding
creating a copy of kill-ring and we restore the kill-ring after the messup.
  • Loading branch information
kidd committed Jul 15, 2018
1 parent 7ad5494 commit 5c246bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion org-gcal.el
Original file line number Diff line number Diff line change
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

0 comments on commit 5c246bc

Please sign in to comment.