.emacs-my
changeset 1336 7c93663d44f3
parent 1335 c8606339804e
child 1337 a0eadfd4cff0
--- a/.emacs-my	Fri Feb 12 17:55:01 2016 +0200
+++ b/.emacs-my	Fri Feb 12 18:04:15 2016 +0200
@@ -1643,12 +1643,13 @@
           (let ( (last-command 'kill-region) )
             (kill-region entry-beg entry-end))
           )
-        (with-current-buffer (find-file-noselect archive)
-          (goto-char (point-max))
-          (insert ?\n)
-          (yank)
-          (save-buffer))
-        (save-buffer) ))))
+        (when (> (length (car kill-ring)) 0)
+          (with-current-buffer (find-file-noselect archive)
+            (goto-char (point-max))
+            (insert ?\n)
+            (yank)
+            (save-buffer))
+          (save-buffer) )))))
 
 (defun my/org-archive (&optional prefix)
   "Move all entries marked by `org-done-keywords' to archive