Org: Fix desktop-files-not-to-save setting

master
Pierre Neidhardt 2017-12-10 20:12:51 +01:00
parent 916cee19fb
commit 501c511140
1 changed files with 3 additions and 1 deletions

View File

@ -57,7 +57,9 @@
(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 desktop-files-not-to-save (if (>= (length desktop-files-not-to-save) 2)
(concat (substring desktop-files-not-to-save 0 -2) "\\|" (regexp-quote (expand-file-name contacts)) "\\)")
(regexp-quote (expand-file-name contacts))))
(setq org-contacts-files (list contacts)))))
(provide 'init-org)