org: Do not save org-contacts-files in desktop session

master
Pierre Neidhardt 2017-08-29 07:33:38 +01:00
parent 1feb0739a8
commit b1367de8ef
1 changed files with 5 additions and 1 deletions

View File

@ -33,6 +33,10 @@
(when (require 'org-contacts nil t)
(let ((contacts "~/personal/contacts/contacts.org"))
(when (file-exists-p contacts) (setq org-contacts-files (list contacts)))))
(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.
(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)))))
(provide 'init-org)