diff --git a/.emacs.d/lisp/init-org.el b/.emacs.d/lisp/init-org.el index d92a8ab2..55522041 100644 --- a/.emacs.d/lisp/init-org.el +++ b/.emacs.d/lisp/init-org.el @@ -52,7 +52,8 @@ (when (file-exists-p contacts) ;; When used to auto-complete e-mail addresses, the file is automatically ;; loaded. The buffer usually need not be restored by a desktop session. - (when desktop-save-mode + (when (and desktop-save-mode + (string-match "\\\\|" desktop-files-not-to-save)) (setq desktop-files-not-to-save (concat (substring desktop-files-not-to-save 0 -2) "\\|" (regexp-quote (expand-file-name contacts)) "\\)"))) (setq org-contacts-files (list contacts)))))